Difference between revisions of "Postfix"
Jump to navigation
Jump to search
(might need the CA file) |
(Adds DO hack) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
Notes on using Postfix <ref>loosely following the info at http://braiden.org/?p=15</ref>. Quick and dirty procedure for setting up Postfix on a new machine that needs email. | Notes on using Postfix <ref>loosely following the info at http://braiden.org/?p=15</ref>. Quick and dirty procedure for setting up Postfix on a new machine that needs email. | ||
Line 9: | Line 7: | ||
<li><source lang="bash"> sudo su - </source> | <li><source lang="bash"> sudo su - </source> | ||
<li><source lang="bash"> apt-get install postfix </source> | <li><source lang="bash"> apt-get install postfix </source> | ||
− | <li><source lang="bash"> apt-get install bsd-mailx | + | <li><source lang="bash"> apt-get install bsd-mailx </source> |
− | |||
− | |||
− | </source> | ||
<li><pre>cat <<HERE | sudo tee /etc/postfix/main.cf > /dev/null | <li><pre>cat <<HERE | sudo tee /etc/postfix/main.cf > /dev/null | ||
# work-around for Digital Ocean's blocking of IPv6 for email | # work-around for Digital Ocean's blocking of IPv6 for email | ||
smtp_bind_address = 0.0.0.0 | smtp_bind_address = 0.0.0.0 | ||
− | |||
# satellite configuration | # satellite configuration | ||
smtp_use_tls = yes | smtp_use_tls = yes | ||
Line 23: | Line 17: | ||
smtp_sasl_security_options = noanonymous | smtp_sasl_security_options = noanonymous | ||
smtp_sasl_tls_security_options = noanonymous | smtp_sasl_tls_security_options = noanonymous | ||
− | |||
− | |||
HERE | HERE | ||
Line 38: | Line 30: | ||
</ol> | </ol> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{{References}} | {{References}} | ||
[[Category:Email]] | [[Category:Email]] | ||
− |
Revision as of 22:29, 11 August 2015
Notes on using Postfix [1]. Quick and dirty procedure for setting up Postfix on a new machine that needs email.
Setting up Postfix[edit | edit source]
Add Postfix Mail Transfer Agent as satellite smarthosting through Google, install mail utilities, setup an alias for root's mail and test it all
sudo su -
apt-get install postfix
apt-get install bsd-mailx
cat <<HERE | sudo tee /etc/postfix/main.cf > /dev/null # work-around for Digital Ocean's blocking of IPv6 for email smtp_bind_address = 0.0.0.0 # satellite configuration smtp_use_tls = yes smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_sasl_tls_security_options = noanonymous HERE
echo "smtp.gmail.com me@example.com:PASSWORD" > /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd
chmod 640 /etc/postfix/sasl_passwd*
chown postfix:postfix /etc/postfix/sasl_passwd*
/etc/init.d/postfix restart
echo "root: me@example.com" >> /etc/aliases && newaliases
echo test |mail -s "test mail sent to external" greg.rundlett@gmail.com
echo test |mail -s "test mail sent to root" root
References[edit source]
- ↑ loosely following the info at http://braiden.org/?p=15