From 153b094dcd2ece8697a8d16808936d4c45c1aae5 Mon Sep 17 00:00:00 2001 From: Julien Valroff Date: Sun, 17 Jun 2012 10:01:09 +0200 Subject: Add patch from Pascal Volk to deal with Postfix enable_long_queue_ids paramater (Closes: #677747) --- debian/changelog | 2 + debian/patches/103_postfix-long-queue-IDs.diff | 56 ++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 59 insertions(+) create mode 100644 debian/patches/103_postfix-long-queue-IDs.diff diff --git a/debian/changelog b/debian/changelog index 5434605..b4c52eb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ mailgraph (1.14-11) unstable; urgency=low * Update copyright file as per DEP-5 1.0 format + * Add patch from Pascal Volk to deal with Postfix enable_long_queue_ids + paramater (Closes: #677747) -- Julien Valroff Tue, 28 Feb 2012 18:44:18 +0100 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 + +--- 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'); + } + } diff --git a/debian/patches/series b/debian/patches/series index 73a941e..843aec2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ 050_greylist.diff 101_dspam-virus-notifications.diff 102_clamav-milter.diff +103_postfix-long-queue-IDs.diff -- cgit v1.2.3