Local Mailer: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Sample to install postfix as local mailer on a standard Debian VM. *Note: Install postfix with "no config" root@vm-debian01:~# apt-get install postfix mailutils libsasl2-mod...") |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
cp /usr/share/postfix/main.cf.debian /etc/postfix/main.cf | cp /usr/share/postfix/main.cf.debian /etc/postfix/main.cf | ||
*Configure postfix | *Configure postfix - NEED TO CHANGE RELAYHOST | ||
postconf -e "relayhost = [mail.server.com]:587" | postconf -e "relayhost = ['''mail.server.com''']:587" | ||
postconf -e "smtp_sasl_auth_enable = yes" | postconf -e "smtp_sasl_auth_enable = yes" | ||
postconf -e "smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd" | postconf -e "smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd" | ||
postconf -e "smtp_sasl_security_options = " | postconf -e "smtp_sasl_security_options = " | ||
postconf -e "smtp_sasl_mechanism_filter = login" | postconf -e "smtp_sasl_mechanism_filter = login" | ||
postconf -e "inet_protocols = ipv4" | |||
*Create Account File: /etc/postfix/sasl_passwd | *Create Account File: /etc/postfix/sasl_passwd | ||
Line 26: | Line 27: | ||
*Restart Postfix | *Restart Postfix | ||
systemctl reload postfix.service | systemctl reload postfix.service | ||
*Keywords: mta smtp mail sendmail satellite |
Latest revision as of 17:49, 16 August 2021
Sample to install postfix as local mailer on a standard Debian VM.
- Note: Install postfix with "no config"
root@vm-debian01:~# apt-get install postfix mailutils libsasl2-modules
- Copy template:
cp /usr/share/postfix/main.cf.debian /etc/postfix/main.cf
- Configure postfix - NEED TO CHANGE RELAYHOST
postconf -e "relayhost = [mail.server.com]:587" postconf -e "smtp_sasl_auth_enable = yes" postconf -e "smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd" postconf -e "smtp_sasl_security_options = " postconf -e "smtp_sasl_mechanism_filter = login" postconf -e "inet_protocols = ipv4"
- Create Account File: /etc/postfix/sasl_passwd
mail.server.com smtpuser:smtppass
- Create mapfile
postmap /etc/postfix/sasl_passwd
- Reload Postfix
postfix reload
- Restart Postfix
systemctl reload postfix.service
- Keywords: mta smtp mail sendmail satellite