Mainly for the benefit of those on dynamic IPs (was RE: [Exi…

Página Inicial
Delete this message
Reply to this message
Autor: Mike 'Fraz' White
Data:  
Para: exim-users
Tópicos Antigos: RE: [Exim] BACKUP smart host?
Assunto: Mainly for the benefit of those on dynamic IPs (was RE: [Exim] BACKUP smart host?)
Ok after a little while perusing my log files last night I've come up
with the following shell script which automatically adds (via a cron job
run every 10 minutes) any domains that blacklist mails sent directly
from my dynamic IP. It's not a perfect solution but it works. If I get a
bounce message all I need to do is wait 10 minutes before resending it.

If anyones got a more elegant solution then all suggestions taken on
board.

/me waits for the cries of:

"use your ISPs server for all your outgoing mail"

;o)




#exim_updatedynisps
cat </path/to/isplist> > </path/to/temp/file>
grep ' \*\* ' </path/to/exim/mainlog>|grep -i 'black'| \
awk '{print $5}' |sed 's/@/ /' | \
awk '{print $2}'|sed '/^$/ d' \
>></path/to/temp/file>

sort -u </path/to/temp/file> > </path/to/isplist>
rm -rf </path/to/temp/file>


Just for reference the router that goes with this is as follows

dynisp_router:
driver = manualroute
domains = </path/to/isplist>
route_list = * <isps.server.address>:<your.server.address>
transport = remote_smtp


And is the first router in your config file.

--
Mike 'Fraz' White
www.smartowner.co.uk