Hi, On 23.08.2016 18:44, Viktor Dukhovni wrote:
> A more general approach may be to replace "_slow" with "/slow" and > ignore any additional / delimited components between the instance > name and the program name. That would require you to set a syslog_name > along the lines of postfix-sec/slow or postfix-sec/submission, ... > > and the RE then becomes (untested): > > my $instre = qr{(?x) # Ignore whitespace and comments > \A # Absolute line start > (?:\S+ \s+){3} # Timestamp, adjust for other time formats > \S+ \s+ # Hostname > (postfix(?:-[^/\s]+)?) # Capture instance name stopping before first > '/' > (?:/\S+)* # Optional non-captured '/'-delimited > qualifiers > / # Final '/' before the daemon program name > }; > I just wanted to report that this works great. I now have faster unix - - y - - smtp -o syslog_name=postfix/faster slower unix - - y - - smtp -o syslog_name=postfix/slower # Re-Injection from Amavis localhost:10025 inet n - y - - smtpd -o LOTS_OF_STUFF -o syslog_name=postfix/10025 and it happily keeps things together: postfix/smtpd[29227]: connect from ... postfix/smtpd[29227]: 3CBF336A259: client=... postfix/cleanup[6001]: 3CBF336A259: prepend: header From: ... postfix/cleanup[6001]: 3CBF336A259: message-id=... postfix/qmgr[4757]: 3CBF336A259: from=... postfix/smtpd[29227]: disconnect from ... postfix/smtp[6046]: 3CBF336A259: to=... postfix/qmgr[4757]: 3CBF336A259: removed postfix/10025/smtpd[6075]: connect from localhost[127.0.0.1] postfix/10025/smtpd[6075]: B637D36A25A: client=... postfix/cleanup[6001]: B637D36A25A: message-id=... postfix/qmgr[4757]: B637D36A25A: from=... postfix/10025/smtpd[6075]: disconnect from ... postfix/slower/smtp[6077]: Trusted TLS connection ... postfix/slower/smtp[6077]: B637D36A25A: to=... postfix/qmgr[4757]: B637D36A25A: removed Because it does no harm to anything existing I propose that attached patch gets into the distribution. Kind regards, Robert
--- collate.pl.orig 2016-08-23 17:35:19.000000000 +0200 +++ collate.pl 2016-08-29 11:42:51.000000000 +0200 @@ -10,7 +10,9 @@ \A # Absolute line start (?:\S+ \s+){3} # Timestamp, adjust for other time formats \S+ \s+ # Hostname - (postfix(?:-\S+)?)/ # postfix instance + (postfix(?:-[^/\s]+)?) # Capture instance name stopping before first '/' + (?:/\S+)* # Optional non-captured '/'-delimited qualifiers + / }; my $cmdpidre = qr{(?x)