Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Message size limit per user

67 views
Skip to first unread message

Alejandro Cabrera Obed

unread,
Jul 24, 2007, 1:36:53 PM7/24/07
to
Dear all, I have Postfix 2.3.8 and Courier/LDAP as my mail server.

I need to define a message size limit per user, for example:

j...@mydomain.com ---- 2 MB message size limit
br...@mydomain.com ----- 10 MB message size limit
etc....

I know the line "message_size_limit = xxx " from main.cf sets in xxx the
message size limit for all the mail system users, but not per user.

Where can I configure this feature ???

Thanks a lot,

alejandro

mouss

unread,
Jul 24, 2007, 3:26:27 PM7/24/07
to
Alejandro Cabrera Obed wrote:
> Dear all, I have Postfix 2.3.8 and Courier/LDAP as my mail server.
>
> I need to define a message size limit per user, for example:
>
> j...@mydomain.com ---- 2 MB message size limit
> br...@mydomain.com ----- 10 MB message size limit
> etc....
>

what would you do if the message is sent to multiple recipients, with
different limits?

> I know the line "message_size_limit = xxx " from main.cf sets in xxx the
> message size limit for all the mail system users, but not per user.
>
> Where can I configure this feature ???
>

a policy service that is called at recipient and data stages and that
"keeps state" may help, but this is somewhat cumbersome. The reason is
that clienst may not advertize the size (and even if they advertize it,
you can trust this), so you need to wait until mail was actually read,
that is end of data, but at this time, you have many recipients...


Magnus Bäck

unread,
Jul 24, 2007, 2:10:45 PM7/24/07
to
On Tuesday, July 24, 2007 at 19:36 CEST,

You can't, because

a) the message size isn't known until the whole message has been
received, and
b) when the whole message has been received you cannot reject the
message for some users but allow it for others. It's either
accept or reject for all recipients.

This has been discussed several times before, so you can find more
elaborate discussions in the archives.

--
Magnus Bäck
mag...@dsek.lth.se

Andrzej Adam Filip

unread,
Jul 26, 2007, 6:49:33 PM7/26/07
to
Magnus Bäck wrote:
> On Tuesday, July 24, 2007 at 19:36 CEST,
> Alejandro Cabrera Obed <acab...@sintys.gov.ar> wrote:
>
>> Dear all, I have Postfix 2.3.8 and Courier/LDAP as my mail server.
>>
>> I need to define a message size limit per user, for example:
>>
>> j...@mydomain.com ---- 2 MB message size limit
>> br...@mydomain.com ----- 10 MB message size limit
>> etc....
>>
>> I know the line "message_size_limit = xxx " from main.cf sets in xxx the
>> message size limit for all the mail system users, but not per user.
>>
>> Where can I configure this feature ???
>
> You can't, because
>
> a) the message size isn't known until the whole message has been
> received, and

Sending host *MAY* provide "size hint" in "MAIL FROM:".

> b) when the whole message has been received you cannot reject the
> message for some users but allow it for others. It's either
> accept or reject for all recipients.

SMTP have been designed long time ago and "the requirements has changed"

> This has been discussed several times before, so you can find more
> elaborate discussions in the archives.

--
[pl>en: Andrew] Andrzej Adam Filip : an...@priv.onet.pl : an...@xl.wp.pl
Home site: http://anfi.homeunix.net/

Rod Dorman

unread,
Jul 26, 2007, 7:27:41 PM7/26/07
to
On Thursday, July 26, 2007, 18:49:33, Andrzej Adam Filip wrote:
> Magnus Bäck wrote:
>> ...

>> b) when the whole message has been received you cannot reject the
>> message for some users but allow it for others. It's either
>> accept or reject for all recipients.
>
> SMTP have been designed long time ago and "the requirements has changed"

What are these "requirements" that you are referencing?

Please give the RFC number and section number that supports your claim.

--
ro...@polylogics.com "The avalanche has already started, it is too
Rod Dorman late for the pebbles to vote." - Ambassador Kosh

Andrzej Adam Filip

unread,
Jul 27, 2007, 6:03:44 AM7/27/07
to
Rod Dorman wrote:
> On Thursday, July 26, 2007, 18:49:33, Andrzej Adam Filip wrote:
>> Magnus Bäck wrote:
>>> ...
>>> b) when the whole message has been received you cannot reject the
>>> message for some users but allow it for others. It's either
>>> accept or reject for all recipients.
>> SMTP have been designed long time ago and "the requirements has changed"
>
> What are these "requirements" that you are referencing?

The environment (E)SMTP has to face has changed a lot during 25 years.

When SMTP was designed ability to face spam/abuse as we see day was not
on the (informal/assumed) requirements lists. *For years* every mail
server had been an open relay.

* RFC822 is dated August 13, 1982
* "relay control hooks" in sendmail-8.8.0 are dated November 26, 1996

> Please give the RFC number and section number that supports your claim.

Common sense and logic had lived for long before any RFC.

P.S.
In my opinion bare minimum required consists of:
a) "asynchronous break" so server can break session an *any* time
[with variants: 'try later' and 'try no more']
b) ability to selectively reject recipient(s) *after* the final dot

mouss

unread,
Jul 27, 2007, 6:21:51 AM7/27/07
to
Andrzej Adam Filip wrote:
> Magnus Bäck wrote:
>
>> On Tuesday, July 24, 2007 at 19:36 CEST,
>> Alejandro Cabrera Obed <acab...@sintys.gov.ar> wrote:
>>
>>
>>> Dear all, I have Postfix 2.3.8 and Courier/LDAP as my mail server.
>>>
>>> I need to define a message size limit per user, for example:
>>>
>>> j...@mydomain.com ---- 2 MB message size limit
>>> br...@mydomain.com ----- 10 MB message size limit
>>> etc....
>>>
>>> I know the line "message_size_limit = xxx " from main.cf sets in xxx the
>>> message size limit for all the mail system users, but not per user.
>>>
>>> Where can I configure this feature ???
>>>
>> You can't, because
>>
>> a) the message size isn't known until the whole message has been
>> received, and
>>
>
> Sending host *MAY* provide "size hint" in "MAIL FROM:".
>

Then I'll patch the code to claim a small hint :{

>
>> b) when the whole message has been received you cannot reject the
>> message for some users but allow it for others. It's either
>> accept or reject for all recipients.
>>
>
> SMTP have been designed long time ago and "the requirements has changed"
>

ask the IETF to replace SMTP with LMTP
and if you are rich, pay the whole world to "upgrade". :-)

Andrzej Adam Filip

unread,
Jul 27, 2007, 7:03:33 AM7/27/07
to

As you pointed out (E)SMTP is so widespread that any attempt to change
it without backward compatibility would be "*very* challenging".

(E)SMTP is loosing ground so do not *joke* about "worldwide upgrade".
I am a postmaster, for me it is not funny.

Victor Duchovni

unread,
Jul 27, 2007, 11:42:32 AM7/27/07
to
On Fri, Jul 27, 2007 at 01:03:33PM +0200, Andrzej Adam Filip wrote:

> (E)SMTP is loosing ground so do not *joke* about "worldwide upgrade".
> I am a postmaster, for me it is not funny.

This is hype. Legitimate mail volumes (even after spam is filtered out)
continue to grow. The fact that in some cases users have additional
ways to communicate is not contrary to pundit opinion a sure sign of
the decline of email.

What teens do with their cell phones when they are roaming malls is not
indicative of what they will do ten years later when some of them have
a job that involves communicating with remote peers.

--
Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majo...@postfix.org?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.

Adam Jacob Muller

unread,
Jul 27, 2007, 10:17:04 PM7/27/07
to


Is it even something desirable to have everyone talking LMTP? I can't
find the link at the moment but I had read a site recently that had
some arguments that LMTP was designed as a local mail transport and
wasn't designed for usage over the greater internet (for reasons that
escape me now).


Assuming that LMTP IS something that would be nice to move to the
greater internet, why not put LMTP in our SMTP banners like ESMTP?

Just a random thought, but can you 4xx fail some recipients on a
mail? What if I consistently 4xx the 2nd 3rd etc recipients, then
accepted or rejected the mail based on the contents, then later the
remote MTA would retry with only the other recipients for that mail,
keep doing that until I have accepted and rejected all recipients
individually. There are 1000 things wrong with this idea, so just
ignore it but is it technically possible?


-Adam

Andrzej Adam Filip

unread,
Jul 28, 2007, 7:16:50 AM7/28/07
to

It would not make real difference without being *required* from sending
party.

> Just a random thought, but can you 4xx fail some recipients on a mail?
> What if I consistently 4xx the 2nd 3rd etc recipients, then accepted or
> rejected the mail based on the contents, then later the remote MTA would
> retry with only the other recipients for that mail, keep doing that
> until I have accepted and rejected all recipients individually. There
> are 1000 things wrong with this idea, so just ignore it but is it
> technically possible?

It sacrifices delivery speed.

Andrzej Adam Filip

unread,
Jul 28, 2007, 7:17:10 AM7/28/07
to
Victor Duchovni wrote:
> On Fri, Jul 27, 2007 at 01:03:33PM +0200, Andrzej Adam Filip wrote:
>
>> (E)SMTP is loosing ground so do not *joke* about "worldwide upgrade".
>> I am a postmaster, for me it is not funny.
>
> This is hype. Legitimate mail volumes (even after spam is filtered out)
> continue to grow. The fact that in some cases users have additional
> ways to communicate is not contrary to pundit opinion a sure sign of
> the decline of email.
>
> What teens do with their cell phones when they are roaming malls is not
> indicative of what they will do ten years later when some of them have
> a job that involves communicating with remote peers.

I am talking about "market shares" and trends.

You may be right, you may be wrong. We can no longer take *for granted*
what you seem to optimistically assume.

mouss

unread,
Jul 30, 2007, 6:58:11 AM7/30/07
to


There is also an issue of client timeout at end of data that may result
in a message being sent mutliple times. with lmtp (over the internet),
you are multiplying this risk by the number of recipients. Also, you are
giving a remote client more work (and this is not a local client, where
you generally have some level of administrative control at both "sides"
of the lmtp connections).

>
>
> Assuming that LMTP IS something that would be nice to move to the
> greater internet, why not put LMTP in our SMTP banners like ESMTP?

you need an lmtpd for that.

>
> Just a random thought, but can you 4xx fail some recipients on a mail?
> What if I consistently 4xx the 2nd 3rd etc recipients, then accepted
> or rejected the mail based on the contents, then later the remote MTA
> would retry with only the other recipients for that mail, keep doing
> that until I have accepted and rejected all recipients individually.
> There are 1000 things wrong with this idea, so just ignore it but is
> it technically possible?
>

asking the client MTA to resend the same data more than once is abuse of
the bandwidth and of the system resources of that MTA (cpu, disk, ... etc).

0 new messages