For example, I’ll take the installed iRedMail-1.6.8 and change the maximum size of the mail attachment.
Continue reading “iRedMail. Changing the size of a mail attachment”Tag Archives: Postfix
Solution “SMTPUTF8 is required, but was not offered by host”
Once on one mail server I noticed a message delivery error:
Continue reading “Solution “SMTPUTF8 is required, but was not offered by host””Undelivered Mail Returned to Sender
SMTPUTF8 is required, but was not offered by host
Configuring ClamAV + Postfix
I will give an example of installing and configuring the free ClamAV antivirus for checking email messages for viruses.
Continue reading “Configuring ClamAV + Postfix”Redirecting mail for the root user
Open the aliases in the text editor:
Continue reading “Redirecting mail for the root user”Monitoring Postfix in Zabbix
First, configure the Zabbix agent.
Create a file (in the nano editor, press Ctrl+X to exit, and y/n to save or discard changes):
nano /etc/zabbix/zabbix_agentd.d/userparameter_postfix.conf
Add to it:
UserParameter=postfix.maildrop, find /var/spool/postfix/maildrop -type f | wc -l UserParameter=postfix.deferred, find /var/spool/postfix/deferred -type f | wc -l UserParameter=postfix.incoming, find /var/spool/postfix/incoming -type f | wc -l UserParameter=postfix.active, find /var/spool/postfix/active -type f | wc -l UserParameter=postfix.queue, mailq | grep -v "Mail queue is empty" | grep -c '^[0-9A-Z]'
Alternatively, you can simply add the lines above to the Zabbix agent configuration file.
Also open the Zabbix agent configuration file:
nano /etc/zabbix/zabbix_agentd.conf
We will allow Zabbix agent to work as root with the user specifying:
AllowRoot=1
Restart the Zabbix agent to apply the changes:
sudo /etc/init.d/zabbix-agent restart
Now go to the Zabbix server.
Create a Postfix template, add data items to it, specifying the type – Zabbix agent, and the keys: postfix.maildrop, postfix.deferred, postfix.incoming, postfix.active, postfix.queue.
Create graphics for the created data items.
You can also create a data item that counts the number of Postfix processes by specifying the type – Zabbix agent, and the key:
proc.num[,postfix]
Also create a trigger that tells when processes 0.
Download the ready template here – Zabbix шаблон для Postfix
Zabbix template for Postfix
Size: ~ 2Kb
Info: Exported from Zabbix 3.2, also suitable for other versions.
Instruction: Monitoring Postfix in Zabbix
Download link: Download Template App Postfix
Installing and Configuring Postfix
Postfix — mail transfer agent (MTA) with open source.
Assume that the IP address of the server is configured with a domain name, from which the mail will be sent in the future.
Continue reading “Installing and Configuring Postfix”How to enable SMTP without SSL on port 25 in iRedMail / Postfix
To allow the sending of messages on the mail server without encryption via port 25, you need to open the Postfix configuration file, for example, in the nano editor (in which Ctrl+X to exit, y/n to save or cancel changes):
sudo nano /etc/postfix/main.cf
And uncomment two lines:
smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous
And leave the commented line:
#smtpd_tls_auth_only=yes
Reload Postfix to apply the changes:
sudo service postfix restart
After that it will be possible to send messages via SMTP through port 25 without SSL, and as usual through 587 with SSL.
See also:
Allow insecure connections to POP3 / IMAP iRedMail
How to fix error “host NAME greeted me with my own hostname NAME”
I noticed once on one server that Postfix does not always send mail, the logs had the following error:
warning: host NAME[192.168.5.5]:25 greeted me with my own hostname NAME
After seeing the host name:
hostname -f
Found that it is not correct and coincides with that on which the mail is sent!
Changed the host name to the correct one in the following files (in the nano editor Ctrl+X to exit, y/n to save or cancel changes):
sudo nano /etc/hostname sudo nano /etc/postfix/main.cf sudo nano /etc/hosts
Done, after that the error did not appear and the mail was successfully delivered.