diff options
Diffstat (limited to 'debian/patches/103_postfix-long-queue-IDs.diff')
-rw-r--r-- | debian/patches/103_postfix-long-queue-IDs.diff | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/debian/patches/103_postfix-long-queue-IDs.diff b/debian/patches/103_postfix-long-queue-IDs.diff new file mode 100644 index 0000000..183a9a2 --- /dev/null +++ b/debian/patches/103_postfix-long-queue-IDs.diff @@ -0,0 +1,56 @@ +Description: Add Postfix long, non-repeating, queue ID support. + The long queue IDs are encoded in a 52-character alphabet that contains: + - digits (0-9) + - upper-case letters (B-Z) w/o AEIOU + - lower-case letters (b-z) w/o aeiou + + Additionally it corrects the regular expression for the short queue IDs. + The short queue IDs are encoded in hexadecimal alphabet that contains: + - digits (0-9) + - upper-case letters (A-F) +Author: Pascal Volk <user@localhost.localdomain.org> + +--- a/mailgraph.pl ++++ b/mailgraph.pl +@@ -620,7 +620,7 @@ + } + } + elsif($prog eq 'smtpd') { +- if($text =~ /^[0-9A-Z]+: client=(\S+)/) { ++ if($text =~ /^(?:[\dA-F]+|[\dB-DF-HJ-NP-TV-Zb-df-hj-np-tv-z]+): client=(\S+)/) { + my $client = $1; + return if $opt{'ignore-localhost'} and + $client =~ /\[127\.0\.0\.1\]$/; +@@ -628,19 +628,19 @@ + $client =~ /$opt{'ignore-host'}/oi; + event($time, 'received'); + } +- elsif($opt{'virbl-is-virus'} and $text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: .*: 554.* blocked using virbl.dnsbl.bit.nl/) { ++ elsif($opt{'virbl-is-virus'} and $text =~ /^(?:[\dA-F]+: |[\dB-DF-HJ-NP-TV-Zb-df-hj-np-tv-z]+: |NOQUEUE: )?reject: .*: 554.* blocked using virbl.dnsbl.bit.nl/) { + event($time, 'virus'); + } +- elsif($opt{'rbl-is-spam'} and $text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: .*: 554.* blocked using/) { ++ elsif($opt{'rbl-is-spam'} and $text =~ /^(?:[\dA-F]+: |[\dB-DF-HJ-NP-TV-Zb-df-hj-np-tv-z]+: |NOQUEUE: )?reject: .*: 554.* blocked using/) { + event($time, 'spam'); + } + elsif($text =~ /Greylisted/) { + event($time, 'greylisted'); + } +- elsif($text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: /) { ++ elsif($text =~ /^(?:[\dA-F]+: |[\dB-DF-HJ-NP-TV-Zb-df-hj-np-tv-z]+: |NOQUEUE: )?reject: /) { + event($time, 'rejected'); + } +- elsif($text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?milter-reject: /) { ++ elsif($text =~ /^(?:[\dA-F]+: |[\dB-DF-HJ-NP-TV-Zb-df-hj-np-tv-z]+: |NOQUEUE: )?milter-reject: /) { + if($text =~ /Blocked by SpamAssassin/) { + event($time, 'spam'); + } +@@ -655,7 +655,7 @@ + } + } + elsif($prog eq 'cleanup') { +- if($text =~ /^[0-9A-Z]+: (?:reject|discard): /) { ++ if($text =~ /(?:[\dA-F]+|[\dB-DF-HJ-NP-TV-Zb-df-hj-np-tv-z]+): (?:reject|discard): /) { + event($time, 'rejected'); + } + } |