1 |
nightmorph 11/06/19 09:12:09 |
2 |
|
3 |
Modified: mailfilter-guide.xml |
4 |
Log: |
5 |
remove smtpclient section entirely, per jaervosz's email to the GDP |
6 |
|
7 |
Revision Changes Path |
8 |
1.26 xml/htdocs/doc/en/mailfilter-guide.xml |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/en/mailfilter-guide.xml?rev=1.26&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/en/mailfilter-guide.xml?rev=1.26&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/en/mailfilter-guide.xml?r1=1.25&r2=1.26 |
13 |
|
14 |
Index: mailfilter-guide.xml |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/mailfilter-guide.xml,v |
17 |
retrieving revision 1.25 |
18 |
retrieving revision 1.26 |
19 |
diff -u -r1.25 -r1.26 |
20 |
--- mailfilter-guide.xml 19 Jun 2011 03:54:12 -0000 1.25 |
21 |
+++ mailfilter-guide.xml 19 Jun 2011 09:12:09 -0000 1.26 |
22 |
@@ -1,6 +1,6 @@ |
23 |
<?xml version='1.0' encoding='utf-8'?> |
24 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
25 |
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mailfilter-guide.xml,v 1.25 2011/06/19 03:54:12 nightmorph Exp $ --> |
26 |
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mailfilter-guide.xml,v 1.26 2011/06/19 09:12:09 nightmorph Exp $ --> |
27 |
|
28 |
<guide> |
29 |
<title>Gentoo mailfiltering gateway guide</title> |
30 |
@@ -25,8 +25,8 @@ |
31 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
32 |
<license/> |
33 |
|
34 |
-<version>4</version> |
35 |
-<date>2011-06-18</date> |
36 |
+<version>5</version> |
37 |
+<date>2011-06-19</date> |
38 |
|
39 |
<chapter> |
40 |
<title>Introduction</title> |
41 |
@@ -1090,108 +1090,6 @@ |
42 |
|
43 |
</body> |
44 |
</section> |
45 |
- |
46 |
-<!-- 2011-06-18: smtpclient last-rited; needs to be rewritten to use ssmtp, |
47 |
-mailx, postfix, nail, etc. |
48 |
-<section> |
49 |
-<title>Redelivering false positives</title> |
50 |
-<body> |
51 |
- |
52 |
-<p> |
53 |
-If you set the spam score very low like we do you will probably have some false |
54 |
-positives. These are filtered into the folder <path>likely-spam</path>. These |
55 |
-are manually reviewed and any false positive is moved to the |
56 |
-<path>redeliver</path> mailfolder. From there it is first fed through |
57 |
-<c>sa-learn \-\-ham</c> and then redelivered with all headers intact using <uri |
58 |
-link="http://www.engelschall.com/sw/smtpclient/">smtpclient</uri>. |
59 |
-</p> |
60 |
- |
61 |
-<pre caption="Installing smtpclient"> |
62 |
-# <i>echo "mail-client/smtpclient" >> /etc/portage/package.accept_keywords</i> |
63 |
-# <i>emerge smtpclient</i> |
64 |
-</pre> |
65 |
- |
66 |
-<p> |
67 |
-Check for mails in the <path>redeliver</path> folder every minute using cron. |
68 |
-</p> |
69 |
- |
70 |
-<pre caption="amavis crontab"> |
71 |
-<comment>#Redeliver false positives</comment> |
72 |
-* * * * * find /var/amavis/.maildir/Bayes/.redeliver/cur/ -type f -name \ |
73 |
- "[0-9]*" -exec cp {} /var/amavis/.maildir/Bayes/.ham/cur/ \; \ |
74 |
- && find /var/amavis/.maildir/Bayes/.redeliver/cur/ -type f \ |
75 |
- -name "[0-9]*" -exec /usr/local/bin/redeliver.pl {} \; |
76 |
-</pre> |
77 |
- |
78 |
-<p> |
79 |
-Now we only have to copy the <c>redeliver.pl</c> file to |
80 |
-<path>/usr/local/bin/</path>. <uri |
81 |
-link="http://home.coming.dk/files/redeliver.pl">Download it</uri> or use |
82 |
-the version below. |
83 |
-</p> |
84 |
- |
85 |
-<pre caption="redeliver.pl"> |
86 |
-<comment>#!/usr/bin/perl -w |
87 |
- |
88 |
-# Redelivers mail using a modified version of smtpclient |
89 |
-# By: Jens Hilligsoe <gentoo@×××××.dk></comment> |
90 |
- |
91 |
-use strict; |
92 |
- |
93 |
-if(!($#ARGV == 0)) { |
94 |
- die "Usage:\n$0 maildir_mail\n"; |
95 |
-} |
96 |
- |
97 |
-my $mail = $ARGV[0]; |
98 |
-my $to = ""; |
99 |
-my $from = ""; |
100 |
- |
101 |
-sub prunefile ( $ ); |
102 |
- |
103 |
-<comment># Retrieve To and From envelope adresses</comment> |
104 |
-open (MAIL, $mail) or die "Could not open $mail: $?\n"; |
105 |
-while(<MAIL>) { |
106 |
- if(($to eq "") || ($from eq "")) { |
107 |
- chop; |
108 |
- (my $key, my $value) = split (/:/); |
109 |
- if($key eq "X-Envelope-To") { |
110 |
- $to = $value; |
111 |
- $to =~ s/[\<\>,]//g; # Remove "<", ">" and "," |
112 |
- $to =~ s/^\s+|\s+$//g; #Remove whitespace before and after |
113 |
- } |
114 |
- if($key eq "X-Envelope-From") { |
115 |
- $from = $value; |
116 |
- $from =~ s/[\<\>,]//g; |
117 |
- $from =~ s/^\s+|\s+$//g; |
118 |
- if($from eq "") { |
119 |
- $from = "postmaster"; |
120 |
- } |
121 |
- } |
122 |
- } |
123 |
-} |
124 |
- |
125 |
-if($to eq "") { |
126 |
- prunefile($ARGV[0]); # Just nuke it if to is empty |
127 |
-} else { |
128 |
- my $redelivercmd = "cat $ARGV[0] | smtpclient -w -S 127.0.0.1 -P 10025 -f $from $to"; |
129 |
- unless (system($redelivercmd) == 0 ) { |
130 |
- die "Unable to redeliver: $?"; |
131 |
- } |
132 |
- prunefile($ARGV[0]); # Clean up |
133 |
-} |
134 |
- |
135 |
-sub prunefile ( $ ) { |
136 |
- my ($file) = @_; |
137 |
- unless (unlink $file) { |
138 |
- die "Unable to remove mail: $?"; |
139 |
- } |
140 |
-} |
141 |
-</pre> |
142 |
- |
143 |
-</body> |
144 |
-</section> |
145 |
---> |
146 |
- |
147 |
<section> |
148 |
<title>Cleaning up</title> |
149 |
<body> |