postfix-mailgraph/postfix-mailgraph.patch

Sat, 24 Mar 2012 21:40:49 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 24 Mar 2012 21:40:49 +0100
changeset 414
fd611cde817f
parent 201
3be96a4c8c18
permissions
-rw-r--r--

Introduce many changes to the buildconf and source code including:
(01) clean up, update, and partially update default config files,
(02) seems that Melware is unable to perform release engineering so
update chan_capi to new daily snapshot to solve echo problems,
(03) correct Asterisk inadequate hard coded gmime version check,
(04) force postgresql pthreads linkage to solve build problem,
(05) remove buggy hard coded LibXML configure definitions,
(06) remove local architecture specification to allow GCC
internal logic to determine proper CPU type instead,
(07) remove vendor sound install target causing uncontrolled
downloads and non RPM managed file installation,
(08) solve long outstanding bug in tcptls causing Asterisk
to ignore any intermediate CA certificate signatures,
(09) back out Digium engineering team's bright idea of replacing the
very portable and pervasive POSIX rand(1) with ast_random(), and
then not even implementing it causing all references to fail in
platforms not providing the very new POSIX.1-2008 mkdtemp(3)
function only distributed by BSD and some Linux,
(10) withdraw advanced linker symbol manipulations from SVR5 builds
until either Binutils supports hybrid versioned and anonymous
linker scripts or GCC stops hard coding versioned linker scripts,
(11) correct missing library linkage, some tailored to a specific OS,
(12) remove outdated logic for the no longer distributed gmime-config(1),
(13) remove local gmime buildconf hacks now that Asterisk has corrected
their own build configuration to almost portably support gmime,
(14) solve build problems relating to undetected LibXML paths,
(15) correct erroneous out of tree include definitions,
(16) improve some variable and comment naming,
(17) simplify sound language path hierarchy creation,
and correct australian english installation logic.

michael@201 1 Index: mailgraph.cgi
michael@201 2 --- mailgraph.cgi.orig 2007-08-29 11:06:01 +0200
michael@201 3 +++ mailgraph.cgi 2007-08-29 19:05:41 +0200
michael@201 4 @@ -183,13 +183,6 @@
michael@201 5 }
michael@201 6
michael@201 7 print <<FOOTER;
michael@201 8 -<hr/>
michael@201 9 -<table><tr><td>
michael@201 10 -<a href="http://mailgraph.schweikert.ch/">Mailgraph</a> $VERSION
michael@201 11 -by <a href="http://david.schweikert.ch/">David Schweikert</a></td>
michael@201 12 -<td align="right">
michael@201 13 -<a href="http://oss.oetiker.ch/rrdtool/"><img src="http://oss.oetiker.ch/rrdtool/.pics/rrdtool.gif" alt="" width="120" height="34"/></a>
michael@201 14 -</td></tr></table>
michael@201 15 </body></html>
michael@201 16 FOOTER
michael@201 17 }
michael@171 18 Index: mailgraph.cgi
michael@199 19 --- mailgraph.pl.orig 2007-08-29 11:06:01.000000000 +0200
michael@199 20 +++ mailgraph.pl 2009-04-26 18:06:13.313712038 +0200
michael@171 21 @@ -211,6 +211,8 @@
michael@171 22 \s
michael@171 23 ([-\w\.\@:]+) # host -- 6
michael@171 24 \s+
michael@171 25 + <[^>]+> # OSSP fsl log level
michael@171 26 + \s+
michael@171 27 (?:\[LOG_[A-Z]+\]\s+)? # FreeBSD
michael@171 28 (.*) # text -- 7
michael@171 29 $/x or do
michael@199 30 @@ -420,6 +422,7 @@
michael@199 31 print " --rrd-name=NAME use NAME.rrd and NAME_virus.rrd for the rrd files\n";
michael@199 32 print " --rbl-is-spam count rbl rejects as spam\n";
michael@199 33 print " --virbl-is-virus count virbl rejects as viruses\n";
michael@199 34 + print " --multi-rule-spam count several typical reject messages as spam\n";
michael@199 35
michael@199 36 exit;
michael@199 37 }
michael@199 38 @@ -432,7 +435,7 @@
michael@199 39 'daemon_pid|daemon-pid=s', 'daemon_rrd|daemon-rrd=s',
michael@199 40 'daemon_log|daemon-log=s', 'ignore-localhost!', 'ignore-host=s@',
michael@199 41 'only-mail-rrd', 'only-virus-rrd', 'rrd_name|rrd-name=s',
michael@199 42 - 'rbl-is-spam', 'virbl-is-virus'
michael@199 43 + 'rbl-is-spam', 'virbl-is-virus', 'multi-rule-spam'
michael@199 44 ) or exit(1);
michael@199 45 usage if $opt{help};
michael@199 46
michael@199 47 @@ -610,6 +613,18 @@
michael@199 48 elsif($opt{'rbl-is-spam'} and $text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: .*: 554.* blocked using/) {
michael@199 49 event($time, 'spam');
michael@199 50 }
michael@199 51 + elsif($opt{'multi-rule-spam'} and $text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: .*: 554.* Client host rejected: Access denied/) {
michael@199 52 + event($time, 'spam');
michael@199 53 + }
michael@199 54 + elsif($opt{'multi-rule-spam'} and $text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: .*: 450.* Helo command rejected: Host not found/) {
michael@199 55 + event($time, 'spam');
michael@199 56 + }
michael@199 57 + elsif($opt{'multi-rule-spam'} and $text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: .*: 450.* Sender address rejected: Domain not found/) {
michael@199 58 + event($time, 'spam');
michael@199 59 + }
michael@199 60 + elsif($opt{'multi-rule-spam'} and $text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: .*: 450.* Client host rejected: cannot find your hostname/) {
michael@199 61 + event($time, 'spam');
michael@199 62 + }
michael@199 63 elsif($text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: /) {
michael@199 64 event($time, 'rejected');
michael@199 65 }
michael@235 66 @@ -628,7 +643,12 @@
michael@235 67 }
michael@235 68 }
michael@235 69 elsif($prog eq 'cleanup') {
michael@235 70 - if($text =~ /^[0-9A-Z]+: (?:reject|discard): /) {
michael@235 71 + if($text =~ /^(?:[0-9A-Z]+: )?milter-reject: /) {
michael@235 72 + if($text =~ /Intercepted/) {
michael@235 73 + event($time, 'virus');
michael@235 74 + }
michael@235 75 + }
michael@235 76 + elsif($text =~ /^[0-9A-Z]+: (?:reject|discard): /) {
michael@235 77 event($time, 'rejected');
michael@235 78 }
michael@235 79 }
michael@235 80 @@ -924,6 +944,7 @@
michael@199 81 --rrd-name=NAME use NAME.rrd and NAME_virus.rrd for the rrd files
michael@199 82 --rbl-is-spam count rbl rejects as spam
michael@199 83 --virbl-is-virus count virbl rejects as viruses
michael@199 84 + --multi-rule-spam count several typical reject messages as spam
michael@199 85
michael@199 86 =head1 DESCRIPTION
michael@199 87

mercurial