Last active
July 27, 2022 13:53
-
-
Save douglascrp/d08b2ded5b9a29c3a91c8b909d66df59 to your computer and use it in GitHub Desktop.
Install and configure postfix on ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
flowable.mail.server.host=localhost | |
flowable.mail.server.port=25 | |
flowable.mail.server.username=email | |
flowable.mail.server.password=password | |
flowable.mail.server.default-from=email |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install Packages | |
# apt update | |
# apt install postfix mailutils -y | |
When asked, select "Satellite system" | |
Setup postfix and password database | |
# vim /etc/postfix/sasl_passwd | |
Insert the line | |
[smtp.mymail.com]:25 [email protected]:mysecretpassword | |
# postmap /etc/postfix/sasl_passwd | |
# ls -l /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db | |
# rm /etc/postfix/sasl_passwd | |
# vim /etc/postfix/main.cf | |
# specify SMTP relay host | |
relayhost = [smtp.mymail.com]:587 | |
# enable SASL authentication | |
smtp_sasl_auth_enable = yes | |
# disallow methods that allow anonymous authentication. | |
smtp_sasl_security_options = noanonymous | |
# where to find sasl_passwd | |
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd | |
## for office 365 | |
smtp_use_tls = yes | |
mydestination = $mydomain, localhost.$mydomain, localhost | |
# service postfix restart | |
Testing Your Postfix Configuration | |
echo "body of your email" | mail -s "This is a subject" -a "From: [email protected]" [email protected] | |
Logs | |
/var/log/mail.log | |
Mail queue | |
mailq | |
Reprocess queue | |
postqueue -f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.masterkenneth.com/2018/08/configuring-postfix-relay-for-mail-sending-ubuntu-16-04/ | |
https://www.linode.com/docs/guides/postfix-smtp-debian7/ | |
https://www.wirehive.com/thoughts/5-top-tips-reviewing-postfix-mail-queue/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment