Sending mail with Exim from 'dialup' IP
Posted by phoenix on Wed 4 Jan 2006 at 07:36
I've been using Exim4 for a while now as a mail server on my home cable connection. Unfortunaly my IP is listed as a dynamic IP which means some mail servers refuse to accept mail from me as I am in blacklists for dialup users.
I'm sure it must be possible to tell exim to try and deliver directly, and if that fails send it through smtp.myISPmail.server.
Can anyone suggest how I can do this?
Many thanks,
-Jeff
I don't think it's possible with the stock Exim (athough patches may exist). What you would normally do in this situation is either maintain a list of recipient domains that you wish to send through the smarthost (or alternatively send everything through a smarthost and manually maintain a list of domains you want to send directly).
Search for "exim smarthost route_list" and you should turn up some examples.
Untested, and off the top of my head:
Create /etc/exim4/conf.d/router/180_local_rbl_smarthost (assuming an exim4 split config)
domainlist rbl_blockers = example.com:example.org rbl_blockers_via_smarthost: debug_print = "R: rbl_blockers_via_smarthost for $local_part@$domain" driver = manualroute domains = rbl_blockers transport = remote_smtp route_list = rbl_blockers your.smarthost.com
Obviously you can use a lookup (file, dbm, mysql, etc) for the domainlist data.
[ Parent | Reply to this comment ]
Thanks for your suggestion. I have been playing about with this, but not having much (any luck).
I'm using a single config file, this is what I've tried:
at the very top of the exim4.conf I've got the line
domainlist rbl_blockers = leeds.ac.uk
Then within the routers section I have:
rbl_blockers_via_smarthost:
driver = manualroute
domains = +rbl_blockers
transport = ntlworld
route_list = rbl_blockers smtp.ntlworld.com byname
debug_print = "R: rbl_blockers_via_smarthost for $local_part@$domain"
no_more
and finally within transports section I have:
ntlworld:
driver = smtp
hosts = smtp.ntlworld.com
I have also tried (as you suggested) transport=remote_smtp as well as various other incarnations of route_list and domains.
When sending an e-mail, exim shows R=dnslookup T=remote_smtp I have ensured my routers section entry is above the dnslookup entry.
Google hasn't been much help either :/
Any more suggestions?
Cheers,
-Jeff
[ Parent | Reply to this comment ]
I've tested the following on my system with "domainlist rbl_blockers = example.com"
rbl_blockers_via_smarthost: driver = manualroute domains = +rbl_blockers transport = remote_smtp route_list = rbl_blockers my.smarthost debug_print = "R: rbl_blockers_via_smarthost for $local_part@$domain" no_more
And it does do what I'd expect. (My "smarthost" isn't configured as such)
2006-01-12 16:46:24 1Ex5ag-000476-Gf ** test@example.com R=rbl_blockers_via_smarthost T=remote_smtp: SMTP error from remote mailer after RCPT TO:: host my.smarthost [10.1.2.3]: 550 relay not permitted
You've specified "byname" in the route_list - is it in /etc/hosts ?
[ Parent | Reply to this comment ]
I was running mailscanner with exim, which means I need 2 exim config files, and typically I was editing the wrong one! At least I now have a better understanding of how mail actually passes through exim.
Many thanks Lee.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
But the answer to the question above is yes.
Ive seen somewhere in the net that it is possible to define a alternative routing if one route fails.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
I'm a total newbie to email server stuff. I use mutt as my email client and I love it. Mutt uses the local mail server and therefore my mail sources from my home box. So I'm trying to config the 'smarthost' thing *AND* authentication to my ISPs mail server. I assume that Yahoo requires auth as well.
I'm just not having any luck in doing so. All the info I find is confusing and nothing I've tried seems to work.
Is there anything/anyone that can tell me step by step how to accomplish this?
thanks,
corp.mule@gmail.com
[ Parent | Reply to this comment ]
http://www.wlug.org.nz/EximSmtpAuth
(from the 1st page of google results for "exim smtp smarthost authentication")
And yes, Yahoo SMTP requires auth.
HTH!
[ Parent | Reply to this comment ]
It has these docs - http://www.hserus.net/exim.html (also http://www.hserus.net/postfix.html and http://www.hserus.net/sendmail.html)
These should help you route email to a smarthost
srs
[ Parent | Reply to this comment ]