![]() ![]() If the syslog is empty and you still haven’t received any test email, it’s possible that the test email was rejected by the recipient server. sudo tail -f -n 50 /var/log/syslog | grep postfix This will return the last 50 entries for postfix. If the mail log is empty or doesn’t exist, try parsing the syslog. If you still haven’t received any mail, check the mail error log. echo "Test Email message body" | mail -s "Email test subject" forget to check your spam folder. Make sure to replace with your own email address. There should now be a certificate file called cacert.pem in /etc/postfix 5. cat /etc/ssl/certs/thawte_Primary_Root_CA.pem | sudo tee -a /etc/postfix/cacert.pem Now we are going to create the certificate. There should now be a file called sasl_passwd.db in the /etc/postfix/ directory.įor added security, we will only allow root user to read and write to sasl_passwd and sasl_passwd.db sudo chown root:root /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db sudo chmod 0600 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db 4. (Press CTRL + X, press Y and then press ENTER)Ĭreate a hash database file for Postfix with the postmap command. The username is sometimes the email address. Replace username and password with your own. Make sure to replace with your own SMTP server. etc/postfix/sasl_passwd :587 username:password The default SMTP port is 587, make sure you get the right one. sudo nano /etc/postfix/main.cfįind the following line relayhost = about 6 lines up from the bottom of the file and delete it.Īdd the following to the end of the file. ![]() Configure PostfixĮdit the Postfix configuration file. System mail name should be your domain name eg. On the first Postfix configuration screen, select OK by pressing TAB and ENTER Install mailutils, which will automatically install Postfix. If you’ve already installed Postfix, skip to Step 2. ![]() Your SMTP port should be 587, though this may be different depending on your host. You’ll need the address and port of your SMTP server, and the username and password of your email account. My recommendation now is to relay all Postfix/PHP mail() email via an external, trusted email provider in order to guarantee delivery. ![]() Sending mail via Postifx has become increasingly more difficult due to the spam filters and restrictions put in place by email providers over the past few years. This has its advantages if you are having spam issues sending mail directly from your own server. In this article we are going to configure Postfix to relay mail through an external SMTP server. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |