[exim] Solution to EXIM Retry Problem FINALLY

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Khurram Shahzad
Dátum:  
Címzett: exim-users
Tárgy: [exim] Solution to EXIM Retry Problem FINALLY
Hello Folks,


About a year ago a very heated thread was started on this list

http://www.mail-archive.com/exim-users@exim.org/msg32887.html


Let me tell you that my carrier as a sys admin is as old as 1 month. My Sys
admin recently left and I had no choice but to do it myself. I hardly know
key commands of linux yet.

But I was able to find why my subscribers on yahoo were not getting my
emails, the problem was same as Catalin Constantin faced and mentioned on
that thread

ie the BLOODY error

2010-04-12 10:08:37 1O14L8-00068Z-4z == xxxx@??? R=dk_lookuphost
T=dk_remote_smtp defer (-53): retry time not reached for any host



my exim logs would show that 1 or 2 messages would go just fine and then
thousands of lines of these temp defer error


So searching for solution I came across this thread, but after reading each
and every thread I came to know that nobody was able to solve the problem
and it was a total waist of time (despite there being many smart Sys admins
who posted very useful tips there)

So being a programmer, i thought I should try something out of box and here
is what finally worked for me.

Since the problem with defer messages is per IP basis, I thought why not
randomize your outgoing IP interfaces to see what happens.

So I did the following


First, you need a function that pick a random IP from a list. Add it to
/etc/exim.pl (somwhere at the end, above last line)

sub randinet {
@inet = ("x.x.x.1", "x.x.x.2", "x.x.x.3", "x.x.x.4");
return $inet[int rand($#inet)];
}


Then edit /etc/exim.conf and search for a line that start with “interface=”

remote_smtp:
driver = smtp
interface = ${if exists
{/etc/mailips}{${lookup{$sender_address_domain}lsearch*{/etc/mailips}{$value}{}}}{}}

replace last line with

interface = "${perl{randinet}}"

You can do the same for dk_remote_smtp section (this is used for sending
signed mails). Restart exim and search the logs for possible errors.


BTW, for the record, i coped those lines from following link

http://linux-faq.co.cc/exim-rotate-ip-addresses


I restarted Exime and BRAVO

Gone were all those retry errors. Offcourse you can add more than 4 IPs to
the randomize pool and I guarantee it will work.


As I said I am not a regular sys admin but I thought this should help the
community and they can benifit. I may be wrong so please excuse me for that.



With regards,

Khurram Shahzad

from Islamabad Pakistan.