[pfx] Re: smtp_header_checks and opendkim
Note: OpenDKIM does not require the (ancient, obsolete) setting ‘milter_protocol = 2’. It’s a cargo cult setting. Just drop it and leave it at the default. ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: smtp_header_checks and opendkim
Wietse Venema via Postfix-users: > Danil Smirnov via Postfix-users: > > Hi all, > > > > I want to manipulate the headers (add and replace) of the outgoing mail > > before the message is signed by Opendkim. If using smtp_header_checks I see > > that the signature is broken - probably because Opendkim has signed the > > message earlier in the pipeline. > > > > The signing is configured via the following code: > > > > postconf -e milter_protocol=2 > > postconf -e milter_default_action=accept > > postconf -e smtpd_milters=inet:localhost:12301 > > postconf -e non_smtpd_milters=inet:localhost:12301 > > > > Is there a way to put my headers manipulation logic before the point when > > the message is being signed? Corrected for some typos. Is there any reason why you cannot use canonical_maps? They transform addresses before your signing milter (smtpd propagates its milters into the cleanup daemon). network -> smtpd(with smtpd_milters) -> cleanup(uses canonical_maps then smtpd_milters) -> smtp -> network sendmail -> postdrop -> pickup -> cleanup(uses canonical_maps then non_smtpd_milters) -> smtp -> network Thst should work with your main.cf settings above, plus a canonical_maps setting instead of smtp_header_checks. Otherwise, use a null content filter, do the address mapping in the SMTP client before the filter, and sign DKIM in the path after the filter. network -> smtpd -> cleanup -> smtp(with smtp_header_checks -> smtpd(with smtpd_milters) -> cleanup(with smtpd_milters) -> smtp -> network sendmail -> postdrop -> pickup -> cleanup > smtp(with smtp_header_checks -> smtpd(with smtpd_milters) -> cleanup(with smtpd_milters) -> smtp -> network main.cf: content_filter = smtp-with-header_checks:127.0.0.1:10027 milter_protocol = 2 milter_default_action = accept # no smtpd_milters # no non_smtpd_milters # no smtp_header_checks master.cf: smtp-with-header_checksunix - - n - - smtp -o { smtp_header_checks = maptype:mapname } 127.0.0.1:10027inet n - n - - smtpd -o { smtpd_milters = inet:localhost:12301 } The example is s little messy, from memory, not tested. Wietse ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: smtp_header_checks and opendkim
Danil Smirnov via Postfix-users: > Hi all, > > I want to manipulate the headers (add and replace) of the outgoing mail > before the message is signed by Opendkim. If using smtp_header_checks I see > that the signature is broken - probably because Opendkim has signed the > message earlier in the pipeline. > > The signing is configured via the following code: > > postconf -e milter_protocol=2 > postconf -e milter_default_action=accept > postconf -e smtpd_milters=inet:localhost:12301 > postconf -e non_smtpd_milters=inet:localhost:12301 > > Is there a way to put my headers manipulation logic before the point when > the message is being signed? Is there any reason why you cannot use canical_maps? The transform addresses before your signing milter (smtpd propagates its milters into the cleanup daemon). network -> smtpd(with smtpd_milters) -> cleanup(uses canonical_maps then smtpd_milters) -> smtp -> network sendmail -> postdrop -> pickup -> cleanup(uses canonical_maps then non_smtpd_milters) -> smtp -> network Thst should work with your main.cf settings above, plus a canonical_maps setting instead of smtp_header_checks. Otherwise, use a null content filter, do the address mapping in the SMTP client before the filter, and sign DKIM in the path after the filter. network -> smtpd -> cleanup -> smtp(with smtpd_header_checks -> smtpd(with smtpd_milters) -> cleanup(with smtpd_milters) -> smtp -> network sendmail -> postdrop -> pickup -> cleanup > smtp(with smtpd_header_checks -> smtpd(with smtpd_milters) -> cleanup(with smtpd_milters) -> smtp -> network main.cf: content_filter = smtp-with-header_checks:127.0.0.1:10027 milter_protocol = 2 milter_default_action = accept # no smtpd_milters # no non_smtpd_milters # no smtp_header_checks master.cf: smtp-with-header_checksunix - - n - - smtp -o { smtp_header_checks = maptype:mapname } 127.0.0.1:10027inet n - n - - smtpd -o { smtpd_milters = inet:localhost:12301 } The example is s little messy, from memory, not tested. Wietse ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: smtp_header_checks and opendkim
On 18.11.23 18:16, Danil Smirnov via Postfix-users wrote: I want to manipulate the headers (add and replace) of the outgoing mail before the message is signed by Opendkim. If using smtp_header_checks I see that the signature is broken - probably because Opendkim has signed the message earlier in the pipeline. smtp_header_checks is run when mail is being delivered to remote systems, it's hard to do anything after this. Especially when opendkim runs when mail is being received, before anything other is done locally (I think everything except smtpd_proxy_filter). Other milter(s) running before before opendkim can do that, since milter interface supports adding and removeing headers. The signing is configured via the following code: postconf -e milter_protocol=2 postconf -e milter_default_action=accept postconf -e smtpd_milters=inet:localhost:12301 postconf -e non_smtpd_milters=inet:localhost:12301 Is there a way to put my headers manipulation logic before the point when the message is being signed? I have worked around this issue by using separate postfix instance used for outgoing mail, running opendkim milter. My main instance routes mail to this instance via alternative port on localhost and the other instance signs the mail by calling opendkim. I have shortly described ther process here: https://marc.info/?l=postfix-users&m=169860220412496&w=2 (I did srs as well, also implemented at the time mail was received) There are other alternatives, e.g. using combined filter like amavis that supports dkim signing and adding headers, perhaps combined with altermime. I have no experience with this. -- Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/ Warning: I wish NOT to receive e-mail advertising to this address. Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. I just got lost in thought. It was unfamiliar territory. ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] smtp_header_checks and opendkim
Hi all, I want to manipulate the headers (add and replace) of the outgoing mail before the message is signed by Opendkim. If using smtp_header_checks I see that the signature is broken - probably because Opendkim has signed the message earlier in the pipeline. The signing is configured via the following code: postconf -e milter_protocol=2 postconf -e milter_default_action=accept postconf -e smtpd_milters=inet:localhost:12301 postconf -e non_smtpd_milters=inet:localhost:12301 Is there a way to put my headers manipulation logic before the point when the message is being signed? Thank you for any hint. Danil ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
Re: smtp_header_checks INFO chops long subjects while logging
Many thanks for the reply. In fact I found a small workaround, which of course adds more text to the log file. But it serves the purpose. smtp_header_checks /^Subject:(.*)/ INFO $1 Best Regards Dhammika Gunawardena On Thu, Jan 19, 2023 at 7:15 PM Wietse Venema wrote: > Dhammika Gunawardena: > > Hi > > I have setup smtp_header_checks to log subject lines in my mail log. > > However the issue is messages are truncated to about 50 characters. > > Is there any method to get the full Subject into log? > > I suspect that you would like to have no limit on the amount of > header text that will be logged, but that is not going to happen. > > All logging must be limited in size, so that it cannot be abused > to bloat buffers or to spam logfiles. This is not a hypothetical > problem: some logging systems are so inefficient that they use up > more resources than the entire Postfix mail system. > > If you want to log headers longer than 200 bytes, then I suggest > that you use a Milter (C/C++, Perl, Python, Rust, ...). Be aware > that Postfix limits all header content with header_size_limit > (default 102400 byes). > > Wietse >
Re: smtp_header_checks INFO chops long subjects while logging
Dhammika Gunawardena: > Hi > I have setup smtp_header_checks to log subject lines in my mail log. > However the issue is messages are truncated to about 50 characters. > Is there any method to get the full Subject into log? I suspect that you would like to have no limit on the amount of header text that will be logged, but that is not going to happen. All logging must be limited in size, so that it cannot be abused to bloat buffers or to spam logfiles. This is not a hypothetical problem: some logging systems are so inefficient that they use up more resources than the entire Postfix mail system. If you want to log headers longer than 200 bytes, then I suggest that you use a Milter (C/C++, Perl, Python, Rust, ...). Be aware that Postfix limits all header content with header_size_limit (default 102400 byes). Wietse
smtp_header_checks INFO chops long subjects while logging
Hi I have setup smtp_header_checks to log subject lines in my mail log. However the issue is messages are truncated to about 50 characters. Is there any method to get the full Subject into log? smtp_header_checks /^Subject:/ INFO Many thanks and Best Regards Dhammika Gunawardena
Re: smtp_header_checks INFO action truncating logged line below any known limit
Thank you Viktor and Wietse for the help. I decided to go through the milter approach. Cheers, Leandro On 3/24/22 12:07, Viktor Dukhovni wrote: On Thu, Mar 24, 2022 at 11:31:12AM -0300, Leandro Santiago wrote: Maybe this is a limitation in the smtp logging and not on header_checks? Correct. Any clues of where such limit might be configured https://github.com/vdukhovni/postfix/blob/master/postfix/src/smtp/smtp_proto.c#L1140-L1155 and how I can change it? The limit is not configurable. To record message headers in detail, you'll need to do on input via a milter or content_filter. On output, your choices are more limited. OpenPGP_0xAB5F702209190A96.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: smtp_header_checks INFO action truncating logged line below any known limit
On Thu, Mar 24, 2022 at 11:31:12AM -0300, Leandro Santiago wrote: > Maybe this is a limitation in the smtp logging and not on header_checks? Correct. > Any clues of where such limit might be configured https://github.com/vdukhovni/postfix/blob/master/postfix/src/smtp/smtp_proto.c#L1140-L1155 > and how I can change it? The limit is not configurable. To record message headers in detail, you'll need to do on input via a milter or content_filter. On output, your choices are more limited. -- Viktor.
Re: smtp_header_checks INFO action truncating logged line below any known limit
Leandro Santiago: -- Start of PGP signed section. > Hey list, > > I created the following smtp_header_checks rule: > > smtp_header_checks = pcre:/etc/postfix/maps/header_checks > > and /etc/postfix/maps/header_checks: > > /^In-Reply-To:/ INFO > /^References:/ INFO > > > As I aim to have such header logged on syslog. As a matter of principle, all Postfix logging is size-limited, to prevent an attacker from flooding the file system even if Postfix never accepts their email. If there were no limits, then your logfile would basically be world-writable from the network. That would not be desirable from a reliability point of view. In reality, different logging systems enforce their own size limits. Postfix attempts to stay well under those limits so that it stays in control over what is logged. > header_size_limit [is] configured to 102400. Indeed, and that is an amount that should never be logged without some sanity check inplace. Wietse
smtp_header_checks INFO action truncating logged line below any known limit
Hey list, I created the following smtp_header_checks rule: smtp_header_checks = pcre:/etc/postfix/maps/header_checks and /etc/postfix/maps/header_checks: /^In-Reply-To:/ INFO /^References:/ INFO As I aim to have such header logged on syslog. The issue I'm facing is that all messages there are being truncated on 86 characters, even when the header is longer. And it's not the header content that's being chopped, but the line itself (I noticed that by also logging another header which has a longer name and the chopping happened in the same 86th character. header_size_limit if configured to 102400. Maybe this is a limitation in the smtp logging and not on header_checks? This is an example of what's logged (line breaks added by my mail client): Mar 23 13:51:24 mail postfix/smtp[2795]: 11FB814206E: info: header References: <7d7d874b-3be8-bce5-b621-e9aae4b3fd4e@a. Mar 23 13:51:24 mail postfix/smtp[2795]: 11FB814206E: info: header In-Reply-To: <7d7d874b-3be8-bce5-b621-e9aae4b3fd4e@a Whereas this is is how the original headers look like in reality: References: <7d7d874b-3be8-bce5-b621-e9aae4b3f...@a.org> In-Reply-To: <7d7d874b-3be8-bce5-b621-e9aae4b3f...@a.org> Might it be a limit imposed by `postfix/smtp`? I definitely see longer lines logged by it. When using `WARN` instead of `INFO`, I get a line which is three chars longer (as `warning` is 3 chars longer than `info`) which suggests me that the truncating is happening before the line is logged, Any clues of where such limit might be configured and how I can change it? Using 3.4.14 on Debian 10. -- Regards, Leandro Santiago Software Craftsman at Lightmeter https://calendly.com/leandro-santiago https://lightmeter.io OpenPGP_0xAB5F702209190A96.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: smtp_header_checks vs header_checks: subject header length
Clemens Mayer: > Hello Wietse & Friends, > > /etc/postfix/main.cf looks like this: > header_checks = regexp:/etc/postfix/header_checks > smtp_header_checks = regexp:/etc/postfix/header_checks > > /etc/postfix/header_checks looks like this: > /^Subject:/ WARN > > Two issues: > 1. I have a really long subject. For saftey reasons Postfix programs will log only a limited amount of mesasage content, to avoid logfile spamming. > -cleanup logs the whole thing just fine, 110 characters, but smtp only logs > 52 characters of it. The cleanup_act_log() function logs logs up to 200 characters. The SMTP client's smtp_hbc_logger() function was added 10 years later, and it logs only 60. It does not matter what the number is, you just cannot asume that Postfix will log all headers in their full glory. It just is NOT SAFE. > 2. I cannot figure out if there is a way to log email subject on the same > smtp log line with delivery status. There is no such feature. Fortunately, computers can do the work for you and combine different logfile records from the same mail transaction. In Postfiox source code there is a collate tool that can serve as a starting point. Wietse
smtp_header_checks vs header_checks: subject header length
Hello Wietse & Friends, /etc/postfix/main.cf looks like this: header_checks = regexp:/etc/postfix/header_checks smtp_header_checks = regexp:/etc/postfix/header_checks /etc/postfix/header_checks looks like this: /^Subject:/ WARN Two issues: 1. I have a really long subject. -cleanup logs the whole thing just fine, 110 characters, but smtp only logs 52 characters of it. 2. I cannot figure out if there is a way to log email subject on the same smtp log line with delivery status.
Re: smtp_header_checks WARN chops long subjects while logging
Ramprasad: > > If you need precise control over content logging, for example > > because you use it to maintain a database of some sorts, then > > Postfix built-in logging is not designed for that purpose. > > > > Instead, you need a more focused tool. Sahil Tandon posted a > > tcp-based header_checks tool a while ago. > > > > Sahil Tandon's header_checks works at smtpd level ( I assume). Can the No, it does the header_checks. Wietse
Re: smtp_header_checks WARN chops long subjects while logging
On 1/8/2011 12:13 AM, Ramprasad wrote: On Fri, 2011-01-07 at 09:18 -0500, Wietse Venema wrote: Wietse: Postfix truncates EVERYTHING, especially when it is logged. The intention is to protect your file system against logfile flooding attack. Ram: That seems absolutely reasonable from a tech point of view. Unfortunately people have designed business processes based on reports of mails from applications that send mails. If this max_size_limit can be set to 100 chars then that should be enough. Anyway these are app generated mails sending transaction receipt info inside the Subject. So there is no security issue of log flooding in this controlled environment. I wont mind a recompile of postfix. I was also wondering ... If there a truncation of subject logging via smtpd/cleanup too, Apparently there seems to be none. You could ask your users to put the ticket number at the beginning of the Subject: line. I know, but making a change to the system when it has been working for most of the times is a pain to say the least. If you need precise control over content logging, for example because you use it to maintain a database of some sorts, then Postfix built-in logging is not designed for that purpose. Instead, you need a more focused tool. Sahil Tandon posted a tcp-based header_checks tool a while ago. Sahil Tandon's header_checks works at smtpd level ( I assume). Can the same be implemented at smtp level when the mail is actually sent. The idea is the mail may be queued and the syslog of the transaction info should happen when the mail is being sent not when received. Or would you suggest writing a custom smtp milter to do the same job Milters run on input. You should be able to use Sahil's tcp header checks service with smtp_header_checks, which works on output. http://www.postfix.org/postconf.5.html#smtp_header_checks But note that delivery is not guaranteed at that point; the message can still be rejected or deferred by the remote site after the header has been logged, or there could be several minutes delay between when the message is logged and final delivery is accepted. Consider this a stop-gap measure until you can implement a better design that doesn't depend on an ID at the end of the Subject line. -- Noel Jones
Re: smtp_header_checks WARN chops long subjects while logging
On Sat, Jan 08, 2011 at 11:43:42AM +0530, Ramprasad wrote: > Sahil Tandon's header_checks works at smtpd level ( I assume). Can the > same be implemented at smtp level when the mail is actually sent. > The idea is the mail may be queued and the syslog of the transaction > info should happen when the mail is being sent not when received. If you put the unique message-instance identifiers int the Message-Id instead of the Subject header, then Postfix logs will contain the queue-id <-> message-id mapping, and also the delivery time of each queue-id. Logging the Subject in smtp(8) headers does not accurately disclose the time of delivery, since the delivery may fail (Yahoo, for example, often tempfails at ".")... The design you describe is I think flawed, and you really should use the logs in a more natural way. -- Viktor.
Re: smtp_header_checks WARN chops long subjects while logging
On Fri, 2011-01-07 at 09:18 -0500, Wietse Venema wrote: > Wietse: > > Postfix truncates EVERYTHING, especially when it is logged. The > > intention is to protect your file system against logfile flooding > > attack. > > Ram: > > That seems absolutely reasonable from a tech point of view. > > > > Unfortunately people have designed business processes based on > > reports of mails from applications that send mails. > > > > If this max_size_limit can be set to 100 chars then that should be enough. > > Anyway these are app generated mails sending transaction receipt info > > inside the Subject. > > So there is no security issue of log flooding in this controlled > > environment. > > > > I wont mind a recompile of postfix. > > I was also wondering ... If there a truncation of subject logging via > > smtpd/cleanup too, Apparently there seems to be none. > > You could ask your users to put the ticket number at the beginning > of the Subject: line. > I know, but making a change to the system when it has been working for most of the times is a pain to say the least. > If you need precise control over content logging, for example > because you use it to maintain a database of some sorts, then > Postfix built-in logging is not designed for that purpose. > > Instead, you need a more focused tool. Sahil Tandon posted a > tcp-based header_checks tool a while ago. > Sahil Tandon's header_checks works at smtpd level ( I assume). Can the same be implemented at smtp level when the mail is actually sent. The idea is the mail may be queued and the syslog of the transaction info should happen when the mail is being sent not when received. Or would you suggest writing a custom smtp milter to do the same job
Re: smtp_header_checks WARN chops long subjects while logging
Wietse: > Postfix truncates EVERYTHING, especially when it is logged. The > intention is to protect your file system against logfile flooding > attack. Ram: > That seems absolutely reasonable from a tech point of view. > > Unfortunately people have designed business processes based on > reports of mails from applications that send mails. > > If this max_size_limit can be set to 100 chars then that should be enough. > Anyway these are app generated mails sending transaction receipt info > inside the Subject. > So there is no security issue of log flooding in this controlled > environment. > > I wont mind a recompile of postfix. > I was also wondering ... If there a truncation of subject logging via > smtpd/cleanup too, Apparently there seems to be none. You could ask your users to put the ticket number at the beginning of the Subject: line. If you need precise control over content logging, for example because you use it to maintain a database of some sorts, then Postfix built-in logging is not designed for that purpose. Instead, you need a more focused tool. Sahil Tandon posted a tcp-based header_checks tool a while ago. http://people.freebsd.org/~sahil/scripts/checkdbl.pl.txt Instead of talking to a DNSBL server you could change it to always reply "DUNNO" to Postfix, and write the Subject: to your database. Wietse
Re: smtp_header_checks WARN chops long subjects while logging
On 01/07/2011 06:25 PM, Wietse Venema wrote: Ram: I am using postfix smtp_header_checks to log subjects of mails I have enabled WARN inside smtp_header_checks But If I send a mail with a long subject then the subject gets chopped at some length (approx 50 chars ) Postfix truncates EVERYTHING, especially when it is logged. The intention is to protect your file system against logfile flooding attack. Wietse That seems absolutely reasonable from a tech point of view. Unfortunately people have designed business processes based on reports of mails from applications that send mails. If this max_size_limit can be set to 100 chars then that should be enough. Anyway these are app generated mails sending transaction receipt info inside the Subject. So there is no security issue of log flooding in this controlled environment. I wont mind a recompile of postfix. I was also wondering ... If there a truncation of subject logging via smtpd/cleanup too, Apparently there seems to be none. Thanks Ram
Re: smtp_header_checks WARN chops long subjects while logging
Ram: > I am using postfix smtp_header_checks to log subjects of mails > I have enabled WARN inside smtp_header_checks > But If I send a mail with a long subject then the subject gets chopped > at some length (approx 50 chars ) Postfix truncates EVERYTHING, especially when it is logged. The intention is to protect your file system against logfile flooding attack. Wietse
smtp_header_checks WARN chops long subjects while logging
I am using postfix smtp_header_checks to log subjects of mails I have enabled WARN inside smtp_header_checks But If I send a mail with a long subject then the subject gets chopped at some length (approx 50 chars ) Is this documented somewhere (max length of WARN). ? header_checks via cleanup dont seem to have any limit For eg. > MAIL FROM: < 250 2.1.0 Ok > RCPT TO: < 250 2.1.5 Ok > DATA < 354 End data with . > MIME-Version: 1.0 > Content-Disposition: inline > Content-Transfer-Encoding: 8bit > Content-Type: text/plain > X-Mailer: MIME::Lite 3.027 (F2.77; T1.28; A2.04; B3.07_01; Q3.07) > Subject: This is a long subject of mail from ram to test if smtp_header_checks is working fine for 1 > Message-Id: > To: r...@netcore.co.in > Date: Fri, 07 Jan 2011 17:40:01 +0530 > From: r...@netcore.co.in > > This is a Test Mail > Please Ignore > . < 250 2.0.0 Ok: queued as DE2CC49A3E > QUIT < 221 2.0.0 Bye - But the logs dont have the complete subject [...@darkstar ~]$ grep DE2CC49A3E /var/log/maillog Jan 7 17:40:01 darkstar postfix/smtpd[5934]: DE2CC49A3E: client=darkstar.netcore.co.in[127.0.0.1] Jan 7 17:40:01 darkstar postfix/cleanup[5943]: DE2CC49A3E: message-id= Jan 7 17:40:01 darkstar postfix/qmgr[5930]: DE2CC49A3E: from=, size=649, nrcpt=1 (queue active) Jan 7 17:40:02 darkstar postfix/smtp[5946]: DE2CC49A3E: warning: header Subject: This is a long subject of mail from ram to test if Jan 7 17:40:03 darkstar postfix/smtp[5946]: DE2CC49A3E: to=, relay=192.168.2.1[192.168.2.1]:25, delay=1.6, delays=0.08/0/0.01/1.5, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 9F46C6CE0261) Jan 7 17:40:03 darkstar postfix/qmgr[5930]: DE2CC49A3E: removed [...@darkstar ~]$
Re: smtp_header_checks
Alvaro Marín a écrit : > Hello, > > I'm trying to delete/discard an emai if it has a header with one value. > I've to do it after it is accepted (and after one content filter > execution) so I thought in smtp_header_checks but I see that it doesn't > support actions like DISCARD. > Any idea of how to do this? > why not do that in the smtpd that runs after the content filter? this may require that you create a specific cleanup for this smtpd.
Re: smtp_header_checks
On Wed, May 13, 2009 at 03:39:32PM +, Duane Hill wrote: > On Wed, 13 May 2009, Alvaro Mar?n wrote: > >> Duane Hill escribi?: >>> On Wed, 13 May 2009, Alvaro Mar?n wrote: >>> >>>> Hello, >>>> >>>> I'm trying to delete/discard an emai if it has a header with one value. >>>> I've to do it after it is accepted (and after one content filter >>>> execution) so I thought in smtp_header_checks but I see that it doesn't >>>> support actions like DISCARD. >>>> Any idea of how to do this? >>> >>> According to: >>> >>> http://www.postfix.org/header_checks.5.html >>> >>> there is definitely a DISCARD action. Actions that change the destination of a message are not available with smtp_header_checks. All you can do is IGNORE or REPLACE headers. -- 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:majord...@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.
Re: smtp_header_checks
On Wed, 13 May 2009, Alvaro Mar?n wrote: Duane Hill escribi?: On Wed, 13 May 2009, Alvaro Mar?n wrote: Hello, I'm trying to delete/discard an emai if it has a header with one value. I've to do it after it is accepted (and after one content filter execution) so I thought in smtp_header_checks but I see that it doesn't support actions like DISCARD. Any idea of how to do this? According to: http://www.postfix.org/header_checks.5.html there is definitely a DISCARD action. And, it's header_checks, not smtp_header_checks: http://www.postfix.org/postconf.5.html#header_checks http://www.postfix.org/postconf.5.html#smtp_header_checks Oops! Missed that one. Ahh... It's new as of v2.5 and I've never had a need to use it.
Re: smtp_header_checks
Ralf Hildebrandt escribió: > * Alvaro Marín : > >>>> I'm trying to delete/discard an emai if it has a header with one value. >>>> I've to do it after it is accepted (and after one content filter >>>> execution) so I thought in smtp_header_checks but I see that it doesn't >>>> support actions like DISCARD. >>>> Any idea of how to do this? >>> According to: >>> >>> http://www.postfix.org/header_checks.5.html >>> >>> there is definitely a DISCARD action. >>> >>> And, it's header_checks, not smtp_header_checks: >>> >>> http://www.postfix.org/postconf.5.html#header_checks >> http://www.postfix.org/postconf.5.html#smtp_header_checks > > Do you want to do this on INCOMING or OUTGOING mail? > I want it for OUTGOING mail. Thanks. Regards, -- Alvaro Marín Illera Hostalia Internet www.hostalia.com
Re: smtp_header_checks
* Alvaro Marín : > >> I'm trying to delete/discard an emai if it has a header with one value. > >> I've to do it after it is accepted (and after one content filter > >> execution) so I thought in smtp_header_checks but I see that it doesn't > >> support actions like DISCARD. > >> Any idea of how to do this? > > > > According to: > > > > http://www.postfix.org/header_checks.5.html > > > > there is definitely a DISCARD action. > > > > And, it's header_checks, not smtp_header_checks: > > > > http://www.postfix.org/postconf.5.html#header_checks > > http://www.postfix.org/postconf.5.html#smtp_header_checks Do you want to do this on INCOMING or OUTGOING mail? -- Ralf Hildebrandt Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 570-155 http://www.computerbeschimpfung.de postfix-users@postfix.org: The list that makes you think!
Re: smtp_header_checks
Duane Hill escribió: > On Wed, 13 May 2009, Alvaro Mar?n wrote: > >> Hello, >> >> I'm trying to delete/discard an emai if it has a header with one value. >> I've to do it after it is accepted (and after one content filter >> execution) so I thought in smtp_header_checks but I see that it doesn't >> support actions like DISCARD. >> Any idea of how to do this? > > According to: > > http://www.postfix.org/header_checks.5.html > > there is definitely a DISCARD action. > > And, it's header_checks, not smtp_header_checks: > > http://www.postfix.org/postconf.5.html#header_checks http://www.postfix.org/postconf.5.html#smtp_header_checks Regards, -- Alvaro Marín Illera Hostalia Internet www.hostalia.com
Re: smtp_header_checks
On Wed, 13 May 2009, Alvaro Mar?n wrote: Hello, I'm trying to delete/discard an emai if it has a header with one value. I've to do it after it is accepted (and after one content filter execution) so I thought in smtp_header_checks but I see that it doesn't support actions like DISCARD. Any idea of how to do this? According to: http://www.postfix.org/header_checks.5.html there is definitely a DISCARD action. And, it's header_checks, not smtp_header_checks: http://www.postfix.org/postconf.5.html#header_checks
smtp_header_checks
Hello, I'm trying to delete/discard an emai if it has a header with one value. I've to do it after it is accepted (and after one content filter execution) so I thought in smtp_header_checks but I see that it doesn't support actions like DISCARD. Any idea of how to do this? Thanks! Regards, -- Alvaro Marín Illera Hostalia Internet www.hostalia.com