Re: [Exim] Max mail size per user?

Top Page
Delete this message
Reply to this message
Author: Marc MERLIN
Date:  
To: Philip Hazel
CC: 'exim-users@exim.org'
Subject: Re: [Exim] Max mail size per user?
On Fri, Jul 21, 2000 at 08:41:49PM +0100, Philip Hazel wrote:
> On Thu, 20 Jul 2000, Marc MERLIN wrote:
>
> > I can set the maximum mail size with message_size_limit, but is there a way
> > to disable it for a specific user or group of users?
> > Better yet, a database of From emails and associated max allowable mail
> > size to override the default.
>
> max_size_per_user:
>   driver = smartuser
>   condition = ${if >{$message_size}\
>     {${lookup{$local_part}lsearch{/some/file}{$value}{5M}}}{yes}{no}} 
>   new_address = :fail: Message too big for $local_part

>
> This does mean you have to accept the message, because this happens 
> during delivery. The global message_size_limit will block mail from 
> entering your host.    


Thanks for this trick, I may end up using that too.

I apologize for not being more specific, what I was initially trying to do
was to prevent people from sending big Emails.
I suppose I can hack something up in the remote_smtp transport, but I'm
guessing that the message will be accepted and then bounced.
It'd be better if I could reject a message that's too big while it's being
sent to my SMTP server by the client (either by looking at SIZE if it's
there, or after DATA has been transmitted) so that the offending user knows
about the problem right away and doesn't leave and bitch the next day that
his/her important Email didn't go through.

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