On Sat, Jul 22, 2000 at 10:16:14AM +0100, Philip Hazel wrote:
> On Fri, 21 Jul 2000, Marc MERLIN wrote:
>
> > I apologize for not being more specific, what I was initially trying to do
> > was to prevent people from sending big Emails.
>
> Ah that's very different. There is only one sender of a message, but
> many recipients. However, unless SIZE is used, you don't know the size
> of the message at the time the MAIL command is received, so making it
> check at that point, in general, is not possible.
Correct. As I suggested, barf on SIZE if available, and otherwise wait for
the end of DATA to see how big the message is and whether we accept it or
not (just like the message headers can be checked)
> I suppose I could change Exim so that, if SIZE has been used, then when
> verifying the sender, $message_size is set (it currently isn't). If I
> did that, you could cause the sender not to verify if the size was too
> big (by a suitable messy configuration). But it wouldn't catch the
> non-SIZE case (and locally sent emails), so I don't really like the idea.
Can't you tell the size of the message once it's been entirely received?
It'd still be ok for me to receive the whole message and then drop it on the
floor as long as I get to tell the SMTP client about it at the same time.
It's better in my eyes than to accept it, let the SMTP session end and then
bounce it back as a separate transaction (and for a pop user, the person
could leave on vacation and bitch 2 weeks later that his/her important Email
never went through)
> A better plan is probably to put something like this in a system filter:
>
> if $message_size is above 10M and $sender_address matches ....
> then fail "Message larger than $sender_address is allowed to send"
> endif
>
> You could replace 10M with a lookup on $sender_address to get per-sender
> limits.
I'll have to try that.
Thanks,
Marc
--
Microsoft is to software what McDonalds is to gourmet cooking
Home page:
http://marc.merlins.org/ (friendly to non IE browsers)
Finger marc_f@??? for PGP key and other contact information