[Mimedefang] accept, then scan?

Tomasz Ostrowski tometzky at batory.org.pl
Fri Sep 21 02:05:21 EDT 2007

On Thu, 20 Sep 2007, Andy Lyttle wrote:

> As I understood it, once we've accepted HELO, RCPT FROM, MAIL TO
> and gotten to the DATA part, we're committed to delivering the
> message and cannot change our minds and reject it after we get to
> look at the headers or body.

No. This is wrong.

> However, it looks like connecting MTAs are waiting  
> for an acknowledgment that the message has been successfully received  
> after they've delivered the message contents, so maybe that isn't  
> entirely true?

Yes. Only after an MTA accepts a DATA phase it takes a responsibility
for delivering it.

> Anyway, if it is true, what I'd like to do is to accept the
> message, close the connection, and THEN scan the message with
> SpamAssassin.  Is that possible?

Of course, but you should not delete the message afterwards. Or, God
forbid, create some kind of delivery status notification. You can
save it to a spam folder, but nobody checks it and a false positive
will not be noticed by anyone.

> The reason is, on old slow hardware, certain large messages are
> taking too long to scan (two minutes or more).

1. Limit a message size for spamassassin.
2. Disable or at least limit the number of DNSBL queries.
3. Maybe it is bayes journal syncing that long - consider turning
   automatic syncing off and syncing it for example from cron. Or
   real database bayes backend (ie. PostgreSQL).

I'm using MIMEdefang on PentiumII 350Mhz, 256MB RAM. Beat that ;-)

> I'll be upgrading the hardware at the end of next month.  What are  
> some ideas until then?

It will not help it it is DNS blacklist check taking so long.

...although Eating Honey was a very good thing to do, there was a
moment just before you began to eat it which was better than when you
                                                      Winnie the Pooh

More information about the MIMEDefang mailing list