message size bounce template

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

message size bounce template

Erick Calder
I've been asking at the google groups mailing list with no results so  
I figure I'd try this list:

how can I customise the notice sent to a user when hir messages  
exceeds my (or hir) size limit?  I'd like to inform them they can use  
a dropbox
Reply | Threaded
Open this post in threaded view
|

Re: message size bounce template

Victor Duchovni
On Thu, Sep 24, 2009 at 01:40:58PM -0700, Erick Calder wrote:

> I've been asking at the google groups mailing list with no results so I
> figure I'd try this list:
>
> how can I customise the notice sent to a user when hir messages exceeds my
> (or hir) size limit?  I'd like to inform them they can use a dropbox

You can't. Most SMTP clients give up after you reply to EHLO reporting
your message size limit. They never attempt to send the message, and
you never get to say "no, but try this instead"...

--
        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:[hidden email]?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.
Reply | Threaded
Open this post in threaded view
|

Re: message size bounce template

Erick Calder
On Sep 24, 2009, at 1:41 PM, Victor Duchovni wrote:

> On Thu, Sep 24, 2009 at 01:40:58PM -0700, Erick Calder wrote:
>
>> I've been asking at the google groups mailing list with no results  
>> so I
>> figure I'd try this list:
>>
>> how can I customise the notice sent to a user when hir messages  
>> exceeds my
>> (or hir) size limit?  I'd like to inform them they can use a dropbox
>
> You can't. Most SMTP clients give up after you reply to EHLO reporting
> your message size limit. They never attempt to send the message, and
> you never get to say "no, but try this instead"...

odd because I've received rejection messages from servers that my mail  
was not accepted on account of the attachment size and that I can use  
a dropbox.

if your statement is true, what about increasing the message size  
acceptable (or removing the limit if possible) and handling the limit  
in some other way?
Reply | Threaded
Open this post in threaded view
|

Re: message size bounce template

@lbutlr
On 24-Sep-2009, at 15:34, Erick Calder wrote:

> On Sep 24, 2009, at 1:41 PM, Victor Duchovni wrote:
>
>> On Thu, Sep 24, 2009 at 01:40:58PM -0700, Erick Calder wrote:
>>
>>> I've been asking at the google groups mailing list with no results  
>>> so I
>>> figure I'd try this list:
>>>
>>> how can I customise the notice sent to a user when hir messages  
>>> exceeds my
>>> (or hir) size limit?  I'd like to inform them they can use a dropbox
>>
>> You can't. Most SMTP clients give up after you reply to EHLO  
>> reporting
>> your message size limit. They never attempt to send the message, and
>> you never get to say "no, but try this instead"...
>
> odd because I've received rejection messages from servers that my  
> mail was not accepted on account of the attachment size and that I  
> can use a dropbox.

Then they first accepted the mail and THEN rejected it or they are not  
using postfix.

> if your statement is true, what about increasing the message size  
> acceptable (or removing the limit if possible) and handling the  
> limit in some other way?

You can do that. Read up on Policy Servers

http://www.google.com/search?q=policy&sitesearch=www.postfix.org


--
Can I borrow your underpants for 10 minutes?

Reply | Threaded
Open this post in threaded view
|

Re: message size bounce template

Wietse Venema
In reply to this post by Erick Calder
Erick Calder:

> On Sep 24, 2009, at 1:41 PM, Victor Duchovni wrote:
>
> > On Thu, Sep 24, 2009 at 01:40:58PM -0700, Erick Calder wrote:
> >
> >> I've been asking at the google groups mailing list with no results  
> >> so I
> >> figure I'd try this list:
> >>
> >> how can I customise the notice sent to a user when hir messages  
> >> exceeds my
> >> (or hir) size limit?  I'd like to inform them they can use a dropbox
> >
> > You can't. Most SMTP clients give up after you reply to EHLO reporting
> > your message size limit. They never attempt to send the message, and
> > you never get to say "no, but try this instead"...
>
> odd because I've received rejection messages from servers that my mail  
> was not accepted on account of the attachment size and that I can use  
> a dropbox.
>
> if your statement is true, what about increasing the message size  
> acceptable (or removing the limit if possible) and handling the limit  
> in some other way?

If Postfix announces a size limit of X, many SMTP clients won't
attempt to send larger messages, and Postfix won't accept a larger
message (and thus Postfix will not generate a bounce email message).

If you must configure Postfix to accept messages larger than X,
(and then return it to the sender) then you would have to use a
content filter to return the message with custom text.  Postfix
does not have different templates for different error types; it
only distinguishes between delayed mail and other errors. Generally
one message can have more than one recipient and each of them may
have different errors, so error-dependent templates don't scale well.

If the files are large, then I would suggest sending the users a
temporary password for a website upload link. This gives the user
immediate feedback.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: message size bounce template

Erick Calder
In reply to this post by @lbutlr
On Sep 24, 2009, at 4:01 PM, LuKreme wrote:

> On 24-Sep-2009, at 15:34, Erick Calder wrote:
>
>> On Sep 24, 2009, at 1:41 PM, Victor Duchovni wrote:
>>
>>> On Thu, Sep 24, 2009 at 01:40:58PM -0700, Erick Calder wrote:
>>>
>>>> I've been asking at the google groups mailing list with no  
>>>> results so I
>>>> figure I'd try this list:
>>>>
>>>> how can I customise the notice sent to a user when hir messages  
>>>> exceeds my
>>>> (or hir) size limit?  I'd like to inform them they can use a  
>>>> dropbox
>>>
>>> You can't. Most SMTP clients give up after you reply to EHLO  
>>> reporting
>>> your message size limit. They never attempt to send the message, and
>>> you never get to say "no, but try this instead"...
>>
>> odd because I've received rejection messages from servers that my  
>> mail was not accepted on account of the attachment size and that I  
>> can use a dropbox.
>
> Then they first accepted the mail and THEN rejected it or they are  
> not using postfix.
>
>> if your statement is true, what about increasing the message size  
>> acceptable (or removing the limit if possible) and handling the  
>> limit in some other way?
>
> You can do that. Read up on Policy Servers
>
> http://www.google.com/search?q=policy&sitesearch=www.postfix.org

that's it! I guess when I have the time (rare) I'll write up a policy  
delegate to do the above and publish it.  though it occurs to me it'll  
only be half as interesting since I can't do anything about size  
limits for the sender.

Reply | Threaded
Open this post in threaded view
|

Re: message size bounce template

Erick Calder
In reply to this post by Wietse Venema
On Sep 24, 2009, at 4:21 PM, Wietse Venema wrote:

> If Postfix announces a size limit of X, many SMTP clients won't
> attempt to send larger messages, and Postfix won't accept a larger
> message (and thus Postfix will not generate a bounce email message).
>
> If you must configure Postfix to accept messages larger than X,
> (and then return it to the sender) then you would have to use a
> content filter to return the message with custom text.  Postfix
> does not have different templates for different error types; it
> only distinguishes between delayed mail and other errors.

that had been my hope: that I could just find the template used to  
reject mail on the basis of size.  I imagine Postfix does do that  
(reject on the basis of size) since it would be unsafe to assume the  
clients respect the stated limit.
>

> Generally one message can have more than one recipient and each of  
> them may
> have different errors, so error-dependent templates don't scale well.

yes but only one sender and it's the sender we're concerned with here  
(who needs to be notified)

> If the files are large, then I would suggest sending the users a
> temporary password for a website upload link. This gives the user
> immediate feedback.

yeah.  I have a dropbox for that purpose

Reply | Threaded
Open this post in threaded view
|

Re: message size bounce template

Wietse Venema
Erick Calder:

> On Sep 24, 2009, at 4:21 PM, Wietse Venema wrote:
>
> > If Postfix announces a size limit of X, many SMTP clients won't
> > attempt to send larger messages, and Postfix won't accept a larger
> > message (and thus Postfix will not generate a bounce email message).
> >
> > If you must configure Postfix to accept messages larger than X,
> > (and then return it to the sender) then you would have to use a
> > content filter to return the message with custom text.  Postfix
> > does not have different templates for different error types; it
> > only distinguishes between delayed mail and other errors.
>
> that had been my hope: that I could just find the template used to  
> reject mail on the basis of size.  I imagine Postfix does do that  
> (reject on the basis of size) since it would be unsafe to assume the  
> clients respect the stated limit.

The Postfix SMTP server discards mail that exceeds the configured
size limit, and responds with a 5XX status at end-of-data, meaning
that it did not accept the message.

        Wietse