Mail Relay

From SackWiki

Jump to: navigation, search
See the discussion page for some proposed changes

Currently (July 2006) haybaler/mail.sackheads.org has SMTP authentication enabled.  The authentication "database" is simply a pass through to the IMAP user database, so your IMAP userid and password are your SMTP userid and password.
SMTP auth is preferred over our existing pop-before-smtp, as you don't need to check for mail before sending it.  (Useful if you compose a lot of mail offline, and your mail client tries to send as soon as it gets connectivity).
There are 2 main ways of making use of this feature.

  1. From your mail client
  2. From your local mail relay

SMTP Auth from your mailclient

This is very simple, depending on your mail client!  All you have to do is tell your client to send mail via
mail.sackheads.org
on
port 587
and make sure
TLS or SSL or STARTTLS
is turned on.  Then use your IMAP userid and password where it asks for your SMTP userid and password.

SMTP Auth from your mail relay

I'm only going to document postfix here because it's what you should be running :)
Install postfix with SASL2 and TLS.  This probably requires rebuilding postfix.
In main.cf you need to set the following config:

relayhost = [mail.sackheads.org]:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtp_sasl_password_maps = hash:/usr/local/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous

Create /usr/local/etc/postfix/sasl_passwd owned and only readable by root:

[mail.sackheads.org]:587  <imap user>:<imap passwd>

The run postmap /usr/local/etc/postfix/sasl_passwd and you should be

all set! 

Personal tools