postfix smtp Must issue a STARTTLS command first

postfix mail server

When sending an email to a server, mail bounced with the following error message. Action: failed Status: 5.7.0 Remote-MTA: dns; mail01.riedelbau.de Diagnostic-Code: smtp; 530 5.7.0 Must issue a STARTTLS command first To fix the error, first enabled debug in postfix for the Remote-MTA, for this, edit file vi /etc/postfix/main.cf Add the following lines. You need … Read more

How to stop SPAM with Postfix RBL

To stop spam using RBL in postfix, edit main.cf vi /etc/postfix/main.cf Add smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_invalid_hostname, reject_unauth_pipelining, reject_non_fqdn_sender, reject_unknown_sender_domain, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_rbl_client cbl.abuseat.org, reject_rbl_client bl.spamcop.net, reject_rbl_client sbl.spamhaus.org, reject_rbl_client zen.spamhaus.org, permit Restart postfix systemctl restart postfix See postfix

Postfix enable Maildir

To enable postfix, run postconf -e “home_mailbox = Maildir/” systemctl restart postfix You can do it by editing /etc/postfix/main.cf vi /etc/postfix/main.cf Add home_mailbox = Maildir/ if home_mailbox entry already in main.cf file, then modify instead of adding a new entry. Virtual Mailbox If you are using virtual mailbox, make sure you spedify folder in your … Read more

Plesk Mail not working amavis error

When sending email from a Plesk server, i get error Aug 11 19:49:28 vmi274961 postfix/smtp[29276]: E413C3320265: to=, relay=none, delay=0.47, delays=0.47/0/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused) This is beccause amavis service is not running. It is supposed to be run in port 10024 When i try to start amavis service, i get error Aug … Read more

fatal: open /etc/postfix/main.cf: Permission denied

On a CentOS server, when sending mail from PHP scripts, mail failed to work. On checking postfix log file (/var/log/maillog), i see following error. Aug 11 01:41:53 forums postfix/sendmail[44463]: fatal: open /etc/postfix/main.cf: Permission denied To fix this, disable selinux setenforce 0 To permanantly disable SELinux, run sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/’ /etc/selinux/config

Postfix email forward

postfix mail server

On an Ubuntu Server, i done following to setup email forwarding. Install postfix apt -y install postfix Edit /etc/postfix/main.cf, add following vi /etc/postfix/main.cf Add virtual_mailbox_domains = YOUR-DOMAIN_HERE.com virtual_mailbox_base = /var/mail/vhosts virtual_mailbox_maps = hash:/etc/postfix/vmailbox virtual_minimum_uid = 100 virtual_uid_maps = static:5000 virtual_gid_maps = static:5000 virtual_alias_maps = hash:/etc/postfix/virtual Create Virtual mailbox vi /etc/postfix/vmailbox Add user1@YOUR-DOMAIN_HERE.com YOUR-DOMAIN_HERE.com/user1 Create alias … Read more

iredmail increase mail attachment size

Default mail attachment size in iredmail is 10 MB. To increase mail attachment size, login to server as user root, run following commands postconf -e message_size_limit=104857600 postconf -e mailbox_size_limit=104857600 systemctl restart postfix Here 104857600 is 100 MB in bytes (100 * 1024 * 1024). Change this as required. Sending very large file using mail attachment … Read more

Postfix disable IPv6

To disable IPv6 on the postfix mail server, edit vi /etc/postfix/main.cf Find inet_protocols = all Replace with inet_protocols = ipv4 Restart postfix systemctl restart postfix Method 2 postconf -e inet_protocols=ipv4 systemctl restart postfix To see the current configuration, run [root@server ~]# postconf inet_protocols inet_protocols = ipv4 [root@server ~]#

Configure postfix to relay mails using Gmail

Install postfix apt update apt install postfix libsasl2-modules Create file touch /etc/postfix/sasl_passwd chmod 600 /etc/postfix/sasl_passwd vi /etc/postfix/sasl_passwd Add [smtp.gmail.com]:587 user@gmail.com:password Save and exit editor. Run postmap /etc/postfix/sasl_passwd Edit postfix configuration file vi /etc/postfix/main.cf Find and remove relayhost = At end of the file, add relayhost = [smtp.gmail.com]:587 smtp_use_tls = yes smtp_sasl_auth_enable = yes smtp_sasl_security_options = … Read more

Configure Postfix to use Amazon SES

Install postfix with apt-get update && apt-get install postfix libsasl2-modules -y Update postfix config with sed -i “s/default_transport = error/# default_transport = error/g” /etc/postfix/main.cf sed -i “s/relay_transport = error/# relay_transport = error/g” /etc/postfix/main.cf sed -i “s/relayhost =/# relayhost =/g” /etc/postfix/main.cf Edit vi /etc/postfix/main.cf Add to end of the file relayhost = [SMTP_SERVER_NAME]:587 smtp_tls_security_level = encrypt … Read more

postconf

postconf allow you to list/change postfix configuration. To list current config, run postconf -n To change a configuration, run postconf -e home_mailbox=Maildir/ postfix