Συντάκτης: Dean Brooks Ημερομηνία: Προς: exim-users Αντικείμενο: Re: [exim] Dealing with Yahoo mail RFC violations
On Wed, Jan 19, 2011 at 08:16:35PM +0200, Stuart Gall wrote:
> Ideally I would like to set a size limit for the yahoo.com domain so
> that I immediately reject any mail > 5M with a yahoo recipient (and
> possibly others throwing the baby out with the bath water etc)
>
> Is there a more sensible way to do this, or a better way all
> together to deal with the problem.
The difficult part in doing this with ACLs is that you wont often know
the message size until SMTP DATA time, but by then your only choice
would be to reject the entire message even if it meant rejecting all
the other non-yahoo recipients.
In my opinion, a better alternative might be to use a router to handle
this. This has the positive side effect of automatically meshing with
normal RCPT verification in the event that the SIZE attribute was
given in the MAIL command, not throwing out all the recipients because
of one Yahoo recipient, and being easy to read without the use of
extra variables.
Something like this right before your remote_smtp router:
limit_size:
driver = redirect
domains = yahoo.com
condition = ${if >{$message_size}{5M}}
allow_fail
data = :fail: message too large
fail_verify
The only other side effect I can think of is that it will generate a
bounce instead of an immediate rejection at SMTP time (if SIZE isn't
given in the MAIL command and thus caught by RCPT verification).
This isn't a bad thing though since this would only apply to your
authenticated relay users and you generally dont want to do SMTP-time
rejection to mail clients. Some clients like Outlook will simply
retry delivery over and over from the outbox when it gets an SMTP
rejection.