×

Warning

JUser: :_load: Unable to load user with ID: 43

JUser: :_load: Unable to load user with ID: 40

Postfix mail server

 


By default, the SMTP server is configured in the way that it is only possible to send mail from localhost, so the server may be put onto a public IP address and nobody will be able to send their mail through it (spam). So ISPadmin does not send mail out (only locally).
Mail server configuration is done in /etc/postfix/main.cf:

 

nano /etc/postfix/main.cf

 

myhostname = identification name of your server for public identification - it should be identical to reverse DNS
mydestination = domains to be accepted by your server
relayhost = superior SMTP server
mynetworks = networks accepted by postfix for receiving emails without authentication for further processing (relay, local, etc.).


Postfix service must be restarted every time you modify configuration file:


/etc/init.d/postfix restart

To set up mail via external SMTP server, you have to enter IP address of this server to Postfix SMTP service configuration in ISPadmin. Authentication is not possible in Postfix so you have to enable ISPadmin for sending mail without authentication to superior SMTP server.
Edit relayhost in /etc/postfix/main.cf configuration file of Postfix server:


relayhost = SMTP_SERVER # IP address of superior mail server

 

Now restart the service:


/etc/init.d/postfix restart

 

From now on, all emails from ISPadmin will be forwarded to the Internet via superior SMTP server.

First of all, test if target mail server answers where it should by telnet command. In other words, if the service is available. It may happen that server becomes unavailable due to firewall congestion, domain names collision etc.
These are the most common reasons for problems with sending/receiving emails.


telnet mail_server 25

 

Console listings in case of server availability:

admin.ispadmin.cz:~# telnet demo.ispadmin.eu 25
Trying 95.173.193.36...
Connected to demo.ispadmin.eu.


Console listings in case of server unavailability: it is likely that some firewall on the route blocks port 25 used for mail.
 
admin.ispadmin.cz:~# telnet mail.test.cz 25
Trying 81.2.194.128...
telnet: Unable to connect to remote host: Connection timed out


So if SMTP server is available then check mail server log. Based on it, you can identify a specific problem, and rectify it. You can display Postfix service log, or mail queue with the following commands:

This listing will show you that record A on DNS server is wrong or not configured - Host or domain name not found.


tail /var/log/mail.log
admin.ispadmin.cz:~# tail /var/log/mail.log
Apr 1 11:18:01 admin postfix/pickup[11262]: 3AF4961C850: uid=0 from=
Apr 1 11:18:01 admin postfix/cleanup[12439]: 3AF4961C850: message-id=<This email address is being protected from spambots. You need JavaScript enabled to view it.>
Apr 1 11:18:01 admin postfix/qmgr[2225]: 3AF4961C850: from=<This email address is being protected from spambots. You need JavaScript enabled to view it.>, size=610, nrcpt=1 (queue active)
Apr 1 11:18:01 admin postfix/smtp[12441]: 3AF4961C850: to=<This email address is being protected from spambots. You need JavaScript enabled to view it.>, orig_to=, relay=none, delay=0.01,
delays=0.01/0/0/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=admin.ispadmin.cz type=A: Host not
found)
Apr 1 11:18:01 admin postfix/cleanup[12439]: 3C4D961C858: message-id=<This email address is being protected from spambots. You need JavaScript enabled to view it.>
Apr 1 11:18:01 admin postfix/bounce[11699]: 3AF4961C850: sender non-delivery notification: 3C4D961C858
Apr 1 11:18:01 admin postfix/qmgr[2225]: 3C4D961C858: from=<>, size=2552, nrcpt=1 (queue active)
Apr 1 11:18:01 admin postfix/qmgr[2225]: 3AF4961C850: removed
Apr 1 11:18:01 admin postfix/smtp[12441]: 3C4D961C858: to=<This email address is being protected from spambots. You need JavaScript enabled to view it.>, relay=none, delay=0.01, delays=0.01/0/0/0, dsn=5.4.4,
status=bounced (Host or domain name not found. Name service error for name=admin.ispadmin.cz type=A: Host not found)
Apr 1 11:18:01 admin postfix/qmgr[2225]: 3C4D961C858: removed

 

Check the queue with


mailq
Mail queue is empty

 

or with


postqueue -p
Mail queue is empty

 

You delete the queue with


postsuper -d ALL

If domain name translation does not work, neither sending mail can work. If you find the following record in mail server log you will have to configure domain name translation correctly:


tail -f /var/log/mail.log

 

Mar 4 10:25:46 admin postfix/error[19238]: A10D08A487A: to=<This email address is being protected from spambots. You need JavaScript enabled to view it.>, orig_to=, relay=none, delay=30,
delays=29/0.26/0/0.06, dsn=4.4.3, status=deferred (delivery temporarily suspended:
Host or domain name not found. Name service error for name=admin.ispadmin.cz type=MX: Host not found, try again)


You can check correct DNS translation with the following command. If DNS server does not respond to the query, yet IP does, the problem is here.

 

telnet mail.test.cz 25
Trying 81.2.194.128...
 
Modify configuration file:

nano /etc/resolv.conf
 
options single-request
nameserver 8.8.8.8
nameserver IP_DNS_of_used_server

And then restart service:

/etc/init.d/bind9 restart

Not only does DNS system support mechanism for translation of domain names to IP addresses but also for translation of IP addresses to domain names. Nowadays, this is primarily used for delivering of e-mail, when mail server, which receives a message from the client, firstly translates client IP address to a name (thus it can find out at least approximately who might that be) and then it will translate the acquired name back to IP address. If the real and acquired IP address does not correspond, it can consider the mail source untrustworthy and refuse it.
PTR records are important namely in the mail area, because some mail server presume and demand setting of PTR record. If PTR record is not set, the mail can be refused, classified as spam, or the score of tools of spam-assassin type will increase.
You usually set PTR records at your ISP, which either delegates you specific DNS branch to your own DNS server or which sets you PTR records on its own server.

For correct mail forwarding it is necessary to have correct MX records on your mail server, otherwise the mail does not have to be delivered to you.
How to find missing MX record:

 

# nslookup
> set q=mx
> net-service.cz
net-service.cz MX preference = 10, mail exchanger = sentinel.net-service.cz

 

If the reverse record does not work “Unauthorised response” notification is displayed.

If no emails go out from your network and you are sure the settings of a superior server is correct, check the following ID in Settings System Settings General:

 

  • smtp_restriction - SMTP port 25 blocking ISPadmin supports blocking outgoing mail via SMTP protocol on port 25 globally for your entire network. This setting is suitable to use as a defence against spam sending from infected client computers, when there is a thread of your inclusion to worldwide blacklists, superior provider can even disconnect you.
  • smtp_trust_servers - Allowed SMTP servers in network. Add trustworthy SMTP servers to the list of authorized servers. These servers will not be restricted when sending mail. You should see your main mail server as the first record. Other addresses usually are company mail servers of your clients.

Configuration of POSTFIX, which in ISPadmin and LK serves as SMTP server, does not require verification. For access control, however, a method "pop before smtp" is used.
So to make a client capable of sending mail correctly, he has to first log into pop3 account (this way mail clients such as MS Outlook and etc. behave). Otherwise smtp server takes over only post from localhost, that is why even on a public address there is no problem with spam. In configuration file, it is also possible to set, for which sub-networks smtp will not be verified, so that your clients can use it as smtp server without verification. Otherwise it is possible to set in the mail server configuration a superior smtp server, through which all emails created in ISPadmin will be sent.

System back-ups

ISPadmin has an automatic data back-up functionality. It is possible to store...

MySQL database

Restart of MySQL service /etc/init.d/mysqld restart Recovery of database...

ISPadmin update

Switch to new system version using the following command from command line (logi...

Postfix mail server

By default, the SMTP server is configured in the way that it is only possible...

System Variables

System variables are used for replacing items such as client's name, address,...

System migration

The information contained in this manual pertains to the migration of ISPadmin ...

Emails cannot be sent because of their size

Check and modify the settings of the following parameters: upload_max_f...

Ramdisk and RRD backup-data restoration

More on RAM disk here (index.php?option=com_content view=article id=508:4-11-bet...

HTTPS Certificates

These are instructions on how to create and set up trustworthy certificates (h...

Crashed table repair

these instructions (index.php?option=com_content view=article id=1284:system-bac...

Moving graphs to RAMDISK

The main usage load for disks, on which the system is installed on, is the gener...

Forgotten root password

You can try two ways: First procedure 1. Insert installation DVD of ISPa...

Text editors

Nano text editor is always used in this documentation. If you don&rsquo;t...

Linux update

For reasons of compatibility and availability of future versions of ISPadmin,...

ISPadmin serving as SMTP server

By default, the SMTP server is configured in the way that it is only possible to...

Cache-only DNS server

Caching-only is ready after installation of ISPadmin. It is sufficient to use IP...

Technical support status cannot be verified

If technical support cannot be verified, most likely it is due to DNS malfunc...

Administration of running processes

We recommend using htop program for easier monitoring of running process inst...

Timezone settings

"Europe/Prague” timezone is set by default. To change it, do the following:...

IPv6

ISPadmin does not currently support IPv6, it only supports IPv4. It is, of cours...

Configuration / update of IP Address

A) Temporary setting of IP address (until next Linux restart).Just add the fo...

High CPU load of ISPadmin server

Run htop command from the Linux console to determine the problems. With this ...

ISPadmin operation behind NAT

If you have your ISPadmin located on private network and wish to access it from ...

Manual update

If the Error 404: Not Found message appears during an update, it will be necessa...

Inner/outer address on ISPadmin server

The system is typically connected to the network by one network card only. Both ...

Running service check

If you need to find out if a certain process is running use the following comman...

Error "Allowed memory size of ... bytes exhausted ..."

Fatal error: Allowed memory size of ... bytes exhausted (tried to allocate ... b...

What is the directory structure in /usr/local/script/ispadmin/rrd_data?

headend ipaccount modem routers snmp switches user_devices wifi

«
»

CONTACT

NET service solution, s.r.o.
Žerotínova 3056/81a
787 01 Šumperk
Czech Republic