exim rejected RCPT not dropping smtp connection afterwards

skez

Registered
Feb 22, 2003
4
0
151
Hey all,

I have a server that keeps having problems with "refused: too many connections" errors. After installing dictionary attack ACLs which helped somewhat, I kept investigating why there were so many concurrent connections to smtp port 25.

What I found is that when a connection is opened and then the potential email rejected with a 'rejected RCPT' message that the smtp connection of the sender is not closed - I'm not sure if that is because the sender is not closing it, or because something is wrong with exim, although it seems that after the connection and the rejected RCPT that exim would close the connection.

As an example, a message that just came in:

2006-03-14 14:16:59 SMTP connection from [82.226.146.173]:3114 I=[xx.xx.xx.xx]:25 (TCP/IP connection count = 17)
2006-03-14 14:17:01 H=(yahoo.com) [82.226.146.173]:3114 I=[xx.xx.xx.xx]:25 F=<[email protected]> rejected RCPT <[email protected]>: no such address here


The problem is that 5 minutes later the SMTP connection is still ESTABLISHED as per netstat:

Tue Mar 14 14:21:10 PST 2006
tcp 0 0 xx.xx.xx.xx:25 82.226.146.173:3114 ESTABLISHED

It takes until a little bit longer than that for it even to hit a FIN_WAIT2 which it hangs on still for a long time:

Tue Mar 14 14:22:08 PST 2006
tcp 0 0 xx.xx.xx.xx:25 82.226.146.173:3114 FIN_WAIT2


If the exim server could drop the connection immediately after the rejected RCPT it would free up the connection for others and would eliminate my connection refused errors due to open connections running out.

Anyone know how to get that accomplished?

Thanks!