Re: How to add message-id to In-Reply-to header in bounce template
On 04 Mar 2021, at 05:54, Wietse Venema wrote: > enable_threaded_bounces (default: no) Oooo, nice! Looking forward to 3.6. -- She hated everything that predestined people, that fooled them, that made them slightly less than human. --Witches Abroad
Re: How to add message-id to In-Reply-to header in bounce template
Manu: > > All DSNs are produced by the same message generating code, they > > just use different templates. So it would really be a WTF if some > > aded reply-to and some not. > > > NDRs do sound misleading, but yes, doing this for all DSNs makes sense :) Point taken. I'll update the docs. I expect it also includes the linkage with "sendmail -bv" probes. > Now waiting for the 3.6 release ;) Wietse
Re: How to add message-id to In-Reply-to header in bounce template
> Manu: >> I am tasked to configure a customized bounce message. It is clear how to >> reference variables that correspond to postfix settings, like $myhostname. >> >> I have not found a way how to add the message-id of the original >> message. It should be added to the In-Reply-To: header. > > Wietse: >> http://www.postfix.org/postconf.5.html#enable_threaded_bounces >> >> enable_threaded_bounces (default: no) > > Manu: >> Thank you for this, now I'm half way done :) >> >> They want this for the DSN "successful delivery" as well. If I >> understand the enable_threaded_bounces correctly, this will only apply >> for NDRs. Any other tipps on how to get the In-Reply-To: header for the >> other DSNs? > > All DSNs are produced by the same message generating code, they > just use different templates. So it would really be a WTF if some > aded reply-to and some not. > > Wietse > NDRs do sound misleading, but yes, doing this for all DSNs makes sense :) Now waiting for the 3.6 release ;) Manu signature.asc Description: OpenPGP digital signature
Re: How to add message-id to In-Reply-to header in bounce template
Manu: > I am tasked to configure a customized bounce message. It is clear how to > reference variables that correspond to postfix settings, like $myhostname. > > I have not found a way how to add the message-id of the original > message. It should be added to the In-Reply-To: header. Wietse: > http://www.postfix.org/postconf.5.html#enable_threaded_bounces > > enable_threaded_bounces (default: no) Manu: > Thank you for this, now I'm half way done :) > > They want this for the DSN "successful delivery" as well. If I > understand the enable_threaded_bounces correctly, this will only apply > for NDRs. Any other tipps on how to get the In-Reply-To: header for the > other DSNs? All DSNs are produced by the same message generating code, they just use different templates. So it would really be a WTF if some aded reply-to and some not. Wietse
Re: How to add message-id to In-Reply-to header in bounce template
>> Hi all, >> >> I am tasked to configure a customized bounce message. It is clear how to >> reference variables that correspond to postfix settings, like $myhostname. >> >> I have not found a way how to add the message-id of the original >> message. It should be added to the In-Reply-To: header. > > http://www.postfix.org/postconf.5.html#enable_threaded_bounces > > enable_threaded_bounces (default: no) > > Enable non-delivery notifications (bounce messages) that link > to the original message by including a References: and In-Reply-To: > header with the original Message-ID value. There are advantages > and disadvantages to consider. > > advantage > This allows mail readers to present a non-delivery notification > in the same email thread as the original message. > disadvantage > This makes it easy for users to mistakenly delete the whole > email thread (all related messages), instead of deleting > only the non-delivery notification. > > This feature is available in Postfix 3.6 and later. > > Wietse > Thank you for this, now I'm half way done :) They want this for the DSN "successful delivery" as well. If I understand the enable_threaded_bounces correctly, this will only apply for NDRs. Any other tipps on how to get the In-Reply-To: header for the other DSNs? All the Best, Manu
Re: How to add message-id to In-Reply-to header in bounce template
Manu Zurm?hl: > Hi all, > > I am tasked to configure a customized bounce message. It is clear how to > reference variables that correspond to postfix settings, like $myhostname. > > I have not found a way how to add the message-id of the original > message. It should be added to the In-Reply-To: header. http://www.postfix.org/postconf.5.html#enable_threaded_bounces enable_threaded_bounces (default: no) Enable non-delivery notifications (bounce messages) that link to the original message by including a References: and In-Reply-To: header with the original Message-ID value. There are advantages and disadvantages to consider. advantage This allows mail readers to present a non-delivery notification in the same email thread as the original message. disadvantage This makes it easy for users to mistakenly delete the whole email thread (all related messages), instead of deleting only the non-delivery notification. This feature is available in Postfix 3.6 and later. Wietse
How to add message-id to In-Reply-to header in bounce template
Hi all, I am tasked to configure a customized bounce message. It is clear how to reference variables that correspond to postfix settings, like $myhostname. I have not found a way how to add the message-id of the original message. It should be added to the In-Reply-To: header. failure_template = < If you do so, please include this problem report. You can delete your own text from the attached returned message. The mail system EOF postconf does not even like the header :) postconf -b bounce.cf postfix/bounce: warning: bounce.cf: unknown "In-Reply-To" header label in failure template -- ignoring this template ... Can I access the original message-id? Is it all possible to add headers to the template? Is there another, more elegant way to solve this? All the best, Manu
Re: Bounce template
Thanks for the response. Since I can not specify the MAIL FROM address for bounce emails, how can I log theirs headers and content to give them to my dedicated server provider ? Baptiste On 24/09/2015 12:25, Wietse Venema wrote: Baptiste Lhoste: Hi everybody, First of all, sorry for my bad english. Since yesterday, I have an issue with my dedicated server provider. They consider my bounce emails as spam. They said that my bounces have an empty "from" so they are considered as spam by their "anti-spam" system. You may refer them to the SMTP standard, RFC 5321, section 4.5.5, titled "Messages with a Null Reverse-Path". You can't specify the MAIL FROM address with the bounce template. Wietse
Bounce template
Hi everybody, First of all, sorry for my bad english. Since yesterday, I have an issue with my dedicated server provider. They consider my bounce emails as spam. They said that my bounces have an empty "from" so they are considered as spam by their "anti-spam" system. They ask me to define a "from" like postmas...@mydomain.com. I tried to define a bounce template like : # # The failure template is used when mail is returned to the sender; # either the destination rejected the message, or the destination # could not be reached before the message expired in the queue. # failure_template = < If you do so, please include this problem report. You can delete your own text from the attached returned message. The mail system EOF # # The delay template is used when mail is delayed. Note a neat trick: # the default template displays the delay_warning_time value as hours # by appending the _hours suffix to the parameter name; it displays # the maximal_queue_lifetime value as days by appending the _days # suffix. # # Other suffixes are: _seconds, _minutes, _weeks. There are no other # main.cf parameters that have this special behavior. # # You need to adjust these suffixes (and the surrounding text) if # you have very different settings for these time parameters. # delay_template = < If you do so, please include this problem report. You can delete your own text from the attached returned message. The mail system EOF # # The success template is used when mail is delivered to mailbox, # when an alias or list is expanded, or when mail is delivered to a # system that does not announce DSN support. It is an error to specify # a Postmaster-Subject: here. # success_template = <by adding entry bounce_template_file = /etc/postfix/bounce.cf in /etc/postfix/main.cf. Then I restart the postfix service. But I can still see bounce emails with empty "from". Can someone help me on this ? Thanks in advance. Best regards, Baptiste Lhoste
Re: Bounce template
Baptiste Lhoste: > Hi everybody, > > First of all, sorry for my bad english. > > Since yesterday, I have an issue with my dedicated server provider. > > They consider my bounce emails as spam. > > They said that my bounces have an empty "from" so they are considered as > spam by their "anti-spam" system. You may refer them to the SMTP standard, RFC 5321, section 4.5.5, titled "Messages with a Null Reverse-Path". You can't specify the MAIL FROM address with the bounce template. Wietse
Re: Bounce template
Tell them that the SMTP protocol requires support for the MAIL FROM null sender. https://tools.ietf.org/html/rfc5321#section-4.5.5 Wietse Baptiste Lhoste: > Thanks for the response. > > Since I can not specify the MAIL FROM address for bounce emails, how can > I log theirs headers and content to give them to my dedicated server > provider ? > > Baptiste > > On 24/09/2015 12:25, Wietse Venema wrote: > > Baptiste Lhoste: > >> Hi everybody, > >> > >> First of all, sorry for my bad english. > >> > >> Since yesterday, I have an issue with my dedicated server provider. > >> > >> They consider my bounce emails as spam. > >> > >> They said that my bounces have an empty "from" so they are considered as > >> spam by their "anti-spam" system. > > You may refer them to the SMTP standard, RFC 5321, section 4.5.5, > > titled "Messages with a Null Reverse-Path". > > > > You can't specify the MAIL FROM address with the bounce template. > > > > Wietse > > > >
Bounce template file
Hi All, I am using a custom template for bounce_template_file variable. This template is used by sending to another postfix instance a success delivery notification. Below the file used in main.cf of the sender site smtpd_command_filter=pcre:/etc/postfix/dsn_command_filter /etc/postfix/dsn_command_filter /^(RCPT\s+TO:.*?\s+(?:.*?\s+)?)NOTIFY=\S+(.*)/${1}NOTIFY=SUCCESS${2} /^(RCPT\s+TO:.*)/$1 NOTIFY=SUCCESS The receiver postfix sends successfully e-mail to the sender, but with a full header of the original e-mail. Is it possible to remove all the header lines from the original e-mail except the 1. recipient lines and 2. the subject All other header lines are not useful for the sender. Thanks Andreas
Re: Bounce template file
Andreas Haralambopoulos: Hi All, I am using a custom template for bounce_template_file variable. This template is used by sending to another postfix instance a success delivery notification. Below the file used in main.cf of the sender site smtpd_command_filter=pcre:/etc/postfix/dsn_command_filter /etc/postfix/dsn_command_filter /^(RCPT\s+TO:.*?\s+(?:.*?\s+)?)NOTIFY=\S+(.*)/${1}NOTIFY=SUCCESS${2} /^(RCPT\s+TO:.*)/$1 NOTIFY=SUCCESS You are aware that this violates RFC 5322, because it does not inform the sender of delivery failures. The receiver postfix sends successfully e-mail to the sender, but with a full header of the original e-mail. As per the RFC for delivery status notifications, specify RET=FULL or RET=HDRS to be explicit about what content should be returned. Is it possible to remove all the header lines from the original e-mail except the No. Postfix implements delivery status notifications according to the RFC. HDRS and FULL are the only available options. Wietse
Bounce template
Hi all, I have a question about bounce template. My problem is that when the bounce is sent Charset, From, Subject and Postmaster (as indicated in http://www.postfix.org/bounce.5.html) are inserted in the body of mail and not used for the respective funciont on the sent mail. I only configured this in my /etc/postfix/main.cf bounce_template_file = /etc/postfix/bounce.cf which contains failure_template = EOF Charset: utf-8 From: mail-robot (Mail Delivery System) Subject: Error in mail delivery Postmaster-Subject: Postmaster Copy: Undelivered Mail This is the mail system at host $myhostname. I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below. For further assistance, please send mail to postmaster. If you do so, please include this problem report. You can delete your own text from the attached returned message. The mail system EOF The subject of the bounce is set to Undelivered Mail Returned to Sender and the sender is Mail Delivery System MAILER-DAEMON@$myhostname Surely I'm missing something but I can't figure what? Anyone has a similar issue? -- Andrea Cappelli Asidev s.r.l.
Re: Bounce template
Andrea Cappelli: Hi all, I have a question about bounce template. My problem is that when the bounce is sent Charset, From, Subject and Postmaster (as indicated in http://www.postfix.org/bounce.5.html) are inserted in the body of mail and not used for the respective funciont on the sent mail. First, test with postconf -b. If the result is right then something down-stream is messing up Postfix's bounces. Wietse
Re: Bounce template
Il 11/09/2012 12:58, Wietse Venema ha scritto: First, test with postconf -b. If the result is right then something down-stream is messing up Postfix's bounces. Wietse The test with postconf -b shows no error and expand the variable $myhostname to the right value, but Charset and and other template header variables are shown within the body. # postconf -b /etc/postfix/bounce.cf expanded_failure_text = EOF Charset: utf-8 From: mail-robot (Mail Delivery System) Subject: Error in mail delivery Postmaster-Subject: Postmaster Copy: Undelivered Mail This is the mail system at host $myhostname. I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below. For further assistance, please send mail to postmaster. If you do so, please include this problem report. You can delete your own text from the attached returned message. The mail system EOF I forget to mention that I'm using postfix 2.9.3 on Ubuntu 12.04 -- Andrea Cappelli Asidev s.r.l.
Re: Bounce template
Andrea Cappelli: Il 11/09/2012 12:58, Wietse Venema ha scritto: First, test with postconf -b. If the result is right then something down-stream is messing up Postfix's bounces. Wietse The test with postconf -b shows no error and expand the variable $myhostname to the right value, but Charset and and other template header variables are shown within the body. # postconf -b /etc/postfix/bounce.cf expanded_failure_text = EOF Charset: utf-8 Basic Internet email: no whitespace before a header label. Wietse
Re: Bounce template
Il 11/09/2012 14:15, Wietse Venema ha scritto: Basic Internet email: no whitespace before a header label. Wietse Thank you for your support, now works as expected Best regards -- Andrea Cappelli Asidev s.r.l.
Re: Odd warning about delay_warning_time_hours in bounce template in logs...
On 2011-12-23 6:04 PM, Wietse Venema wie...@porcupine.org wrote: I'm confused about this warning I just saw in my logs (never seen it before): Dec 23 12:03:24 myhost postfix/bounce[19970]: warning: [built-in]: zero result in delay template conversion of parameter delay_warning_time_hours Dec 23 12:03:24 myhost postfix/bounce[19970]: warning: please reduce time unit hours of delay_warning_time_hours in delay template Dec 23 12:03:24 myhost postfix/bounce[19970]: warning: for instructions see the bounce(5) manual It found a parameter delay_warning_time with a suffix _hours. Postfix is not clever enough to make these up. Most likely, your delay template has a mis-typed EOF marker. Ahh - no, but after a little googling, I discovered the problem (I think)... I had changed the delay_warning_time to 15m and customized my bounce template a long time ago, but I guess I forgot to tell postfix about the new custom template (hadn't added bounce_template_file = /etc/postfix/bounce.cf to main.cf) Just did, so hopefully that will take care of it... Thanks, -- Best regards, Charles
Odd warning about delay_warning_time_hours in bounce template in logs...
Hello, I'm confused about this warning I just saw in my logs (never seen it before): Dec 23 12:03:24 myhost postfix/bounce[19970]: warning: [built-in]: zero result in delay template conversion of parameter delay_warning_time_hours Dec 23 12:03:24 myhost postfix/bounce[19970]: warning: please reduce time unit hours of delay_warning_time_hours in delay template Dec 23 12:03:24 myhost postfix/bounce[19970]: warning: for instructions see the bounce(5) manual The problem is, there is no parameter delay_warning_time_hours used in the delay_template (from bounce.cf): delay_template = EOF Charset: us-ascii From: MAILER-DAEMON (Mail Delivery System) Subject: Delayed Mail (still being retried) Postmaster-Subject: Postmaster Warning: Delayed Mail This is the mail system at host $myhostname. # THIS IS A WARNING ONLY. YOU DO NOT NEED TO RESEND YOUR MESSAGE. # Your message could not be delivered for more than $delay_warning_time_minutes minutes. No more warnings will be forthcoming. It will be retried until it is $maximal_queue_lifetime_days days old, after which you will get a permanent delivery failure notification. For further assistance, please send mail to postmaster If you do so, please include this problem report. You can delete your own text from the attached returned message. The mail system EOF Anyone know why I got that warning? -- Best regards, Charles
Re: Odd warning about delay_warning_time_hours in bounce template in logs...
Charles Marcus: Hello, I'm confused about this warning I just saw in my logs (never seen it before): Dec 23 12:03:24 myhost postfix/bounce[19970]: warning: [built-in]: zero result in delay template conversion of parameter delay_warning_time_hours Dec 23 12:03:24 myhost postfix/bounce[19970]: warning: please reduce time unit hours of delay_warning_time_hours in delay template Dec 23 12:03:24 myhost postfix/bounce[19970]: warning: for instructions see the bounce(5) manual It found a parameter delay_warning_time with a suffix _hours. Postfix is not clever enough to make these up. Most likely, your delay template has a mis-typed EOF marker. Wietse
Re: Odd warning about delay_warning_time_hours in bounce template in logs...
Charles Marcus: Hello, I'm confused about this warning I just saw in my logs (never seen it before): Dec 23 12:03:24 myhost postfix/bounce[19970]: warning: [built-in]: zero result in delay template conversion of parameter delay_warning_time_hours Dec 23 12:03:24 myhost postfix/bounce[19970]: warning: please reduce time unit hours of delay_warning_time_hours in delay template Dec 23 12:03:24 myhost postfix/bounce[19970]: warning: for instructions see the bounce(5) manual The problem is, there is no parameter delay_warning_time_hours used in the delay_template (from bounce.cf): The error message refers to the *built-in* template. Wietse
How can I get original subject in bounce template
Can I configure the bounce template to include the original subject inside the subject of the NDR. The bounce man page does not mention original subject anywhere. Thanks Ram
Re: How can I get original subject in bounce template
Ramprasad: Can I configure the bounce template to include the original subject inside the subject of the NDR. The bounce man page does not mention original subject anywhere. If it is not in the documentation, then it is not supported. As you correctly observed, the subject and more is in the returned email message that sits at the bottom of the bounce message. Wietse
Re: message size bounce template
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=policysitesearch=www.postfix.org -- Can I borrow your underpants for 10 minutes?
Re: message size bounce template
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=policysitesearch=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.
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? 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
Re: message size bounce template
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
Re: message size bounce template
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
bounce template question
Which $variables are available in a bounce template? The second portion of a bounce template consists of message text. As the above example shows, template message text may contain main.cf $parameters. Besides the parameters that are defined in main.cf, the following parameters are treated spe- cially depending on the suffix that is appended to their name. I wonder if something like orig_recipient_domain is available :) -- Ralf Hildebrandt ([EMAIL PROTECTED]) [EMAIL PROTECTED] Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 570-155 http://www.arschkrebs.de I'm looking for a job ASCII and ye shall receive.
Re: bounce template question
* Wietse Venema [EMAIL PROTECTED]: Ralf Hildebrandt: Which $variables are available in a bounce template? main.cf parameters, including some main.cf parameters with special suffixes as listed in the bounce(5) manual page. The second portion of a bounce template consists of message text. As the above example shows, template message text may contain main.cf $parameters. Besides the parameters that are defined in main.cf, the following parameters are treated spe- cially depending on the suffix that is appended to their name. I wonder if something like orig_recipient_domain is available :) That is not a main.cf parameter, and it is not a main.cf parameter with a special suffix as listed in the bounce(5) manual page. Indeed. Recipient information would have to be stored into an array (there can be more than one) of structures that also contain the reason and other status information. The bounce template would look like a PHP script. Not sure if it is a good idea to put a PHP processor into Postfix. Probably not. -- Ralf Hildebrandt ([EMAIL PROTECTED]) [EMAIL PROTECTED] Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 570-155 http://www.arschkrebs.de I'm looking for a job Redmond WA -- Microsoft announced today that the official release date for the new operating system Windows 2000 will be delayed until the second quarter of 1901. -- seen in Brian Hatch's sig