-
Notifications
You must be signed in to change notification settings - Fork 179
AuthenticatedSmtpSmartHost
Nigel Metheringham edited this page Nov 25, 2012
·
1 revision
This in a situation where you need to use an outgoing mail relay (smarthost) that requires authentication. ISPs sometimes need this, they may block outgoing SMTP to force you to use their MTAs and then require authentication.
- Exim 4.x
You will need to configure a router, a transport and the authenticator sections. You will also need to configure a file to contain the password.
In this example, the smarthost is at smarthost.isp.com
Add a router like this:
outgoing:
driver = manualroute
domains = ! +local_domains
transport = IspSmarthost
route_list = * smarthost.isp.com
IspSmarthost:
driver = smtp
hosts_try_auth = isp_auth
begin authenticators
cram_md5:
driver = cram_md5
public_name = CRAM-MD5
client_name = "${extract{auth_name}{${lookup{$host}lsearch{/etc/exim/smtp_users}{$value}fail} }}"
client_secret = "${extract{auth_pass}{${lookup{$host}lsearch{/etc/exim/smtp_users}{$value}fail} }}"
plain:
driver = plaintext
public_name = PLAIN
client_send = "${extract{auth_plain}{${lookup{$host}lsearch{/etc/exim/smtp_users}{$value}fail} }}"
The file /etc/exim/smtp_users will contain lines like:
isp_auth: auth_name=my_username auth_pass=secret auth_plain=^my_username^secret
You substitute appropriate values for my_username and secret.
http://www.tgunkel.de/docs/exim_smarthosts.en
http://www.hserus.net/wiki/index.php/Exim
http://linux.derkeiler.com/Mailing-Lists/Debian/2005-02/1926.html