Testing ESMTP-SIZE patch for qmail

February 14, 2012 Roberto Puzzanghera 0 comments

The patch allows the qmail-smtpd to reject the message if it's too big according to its accepted databytes before it has been received.

Try to send a test message that is bigger than your accepted databytes (file qmail/control/databytes):

2012-02-07 22:34:07.465743500 tcpserver: status: 1/20
2012-02-07 22:34:07.465990500 tcpserver: pid 27748 from 111.222.333.444
2012-02-07 22:34:07.466128500 tcpserver: ok 27748 0: :111.222.333.444::46290
2012-02-07 22:41:52.648280500 qmail-smtpd: message too big: root@qmail.domain.xyz from 111.222.333.444 to rcpt@domain.abc helo qmail.domain.xyz

As you can see the message required almost 8 minutes to be downloaded before the decision to reject has been taken by qmail.

Installing the esmtp-size patch solves the problem:

2012-02-07 23:08:02.433522500 tcpserver: status: 1/20
2012-02-07 23:08:02.476457500 tcpserver: pid 13161 from 111.222.333.444
2012-02-07 23:08:34.216799500 qmail-smtpd: message too big: root@mail.domain.xyz from 555.666.777.888 to postmaster@domain.abc helo mail.domain.xyz
2012-02-07 23:08:34.239482500 tcpserver: end 13161 status 0
2012-02-07 23:08:34.239487500 tcpserver: status: 0/20

The message was rejected according to the ESMTP-SIZE, before the download, saving cpu and bandwidth. And infact this is what qmail-send of the sender says:

2012-02-07 23:19:43.001229500 delivery 771: failure: 444.333.222.111_failed_after_I_sent_the_message./Remote_host_said:_552_sorry,_that_message_size_exceeds_my_databytes_limit_(#5.3.4)/

I think this is important even though nowadays almost all clients refuse to send messages exceeding ESMTP-SIZE

Add a comment