[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postfix-users
Subject:    Re: Replace semicolon in recipient list
From:       Wietse Venema <wietse () porcupine ! org>
Date:       2019-10-23 14:52:10
Message-ID: 46ytd60RWSzJrNv () spike ! porcupine ! org
[Download RAW message or body]

lucas2@dds.nl:
> > So, you could rewrite the "To:" list into "," separated.
> 
> That sounds like what I am looking for, thanks!
> How do I do that? I did not get it to work with a REPLACE in the 
> header_checks...

header_checks are based on first-match-wins, so you would need
different regexps for different numbers of ' ;', with the longest
match first, for example:

- one pattern+result for To: headers with 10 ';'
- one pattern+result for To: headers with 9 ';'
..
- one pattern+result for To: headers with 1 ';'

Only one of these rules will match (Postfix header_checks
are not recursive, for safety reasons).

Another possibility is to use smtpd_proxy_filter with a little
smtpprox script that copies SMTP commands from Postfix to Postfix,
while munging some headers on the fly. But this requires careful
code to handle multiline headers correctly, something that header_checks
already does.

Good luck with parsing RFC5322 address syntax.

	Wietse
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic