1,592 bytes added
, 12:24, 29 July 2014
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.
== Setting up Postfix ==
Add '''[[Postfix]]''' Mail Transfer Agent as satellite smarthosting through Google, install mail utilities, setup an alias for root's mail and test it all
<ol>
<li><source lang="bash"> sudo su - </source>
<li><source lang="bash"> apt-get install postfix </source>
<li><source lang="bash"> apt-get install bsd-mailx </source>
<li><pre>cat <<HERE | sudo tee /etc/postfix/main.cf > /dev/null
# 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
</pre>
<li><source lang="bash"> echo "smtp.gmail.com me@example.com:PASSWORD" > /etc/postfix/sasl_passwd </source>
<li><source lang="bash"> postmap /etc/postfix/sasl_passwd </source>
<li><source lang="bash"> chmod 640 /etc/postfix/sasl_passwd* </source>
<li><source lang="bash"> chown postfix:postfix /etc/postfix/sasl_passwd* </source>
<li><source lang="bash"> /etc/init.d/postfix restart </source>
<li><source lang="bash"> echo "root: me@example.com" >> /etc/aliases && newaliases </source>
<li><source lang="bash"> echo test |mail -s "test mail sent to external" greg.rundlett@gmail.com </source>
<li><source lang="bash"> echo test |mail -s "test mail sent to root" root </source>
</ol>
{{References}}
[[Category:Email]]