This file is indexed.

/usr/share/doc/squirrelmail-spam-buttons/sa-postfix-en.html is in squirrelmail-spam-buttons 2.3.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
 lang="en" dir="ltr">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>
    publications:sa-postfix-en    [GTMP Foundation]
  </title>

  <meta name="generator" content="DokuWiki Release 2007-06-26b" />
<meta name="robots" content="index,follow" />
<meta name="date" content="2007-09-20T20:38:45+0200" />
<meta name="keywords" content="publications,sa-postfix-en" />
<link rel="search" type="application/opensearchdescription+xml" href="/lib/exe/opensearch.php" title="GTMP Foundation" />
<link rel="start" href="/" />
<link rel="contents" href="/doku.php/publications/sa-postfix-en?do=index" title="Index" />

<link rel="alternate" type="application/rss+xml" title="Recent Changes" href="/feed.php" />
<link rel="alternate" type="application/rss+xml" title="Current Namespace" href="/feed.php?mode=list&amp;ns=publications" />
<link rel="alternate" type="text/html" title="Plain HTML" href="/doku.php/publications/sa-postfix-en?do=export_xhtml" />
<link rel="alternate" type="text/plain" title="Wiki Markup" href="/doku.php/publications/sa-postfix-en?do=export_raw" />
<link rel="stylesheet" media="all" type="text/css" href="/lib/exe/css.php?s=all" />
<link rel="stylesheet" media="screen" type="text/css" href="/lib/exe/css.php" />
<link rel="stylesheet" media="print" type="text/css" href="/lib/exe/css.php?s=print" />
<script type="text/javascript" charset="utf-8" src="/lib/exe/js.php?edit=0&amp;write=0" ></script>

  <link rel="shortcut icon" href="/lib/tpl/default/images/favicon.ico" />

  </head>

<body>

<div class="dokuwiki">
  
  <div class="stylehead">

    <div class="header">
      <div class="pagename">
        [[<a href="/doku.php/publications/sa-postfix-en?do=backlink" >publications:sa-postfix-en</a>]]
      </div>
      <div class="logo">
        <a href="/doku.php/"  name="dokuwiki__top" id="dokuwiki__top" accesskey="h" title="[ALT+H]">GTMP Foundation</a>      </div>

      <div class="clearer"></div>
    </div>

    
    <div class="bar" id="bar__top">
      <div class="bar-left" id="bar__topleft">
        <form class="button" method="post" action="/doku.php/publications/sa-postfix-en"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="" /><input type="submit" value="Show pagesource" class="button" accesskey="v" title="Show pagesource [ALT+V]" /></div></form>        <form class="button" method="get" action="/doku.php/publications/sa-postfix-en"><div class="no"><input type="hidden" name="do" value="revisions" /><input type="submit" value="Old revisions" class="button" accesskey="o" title="Old revisions [ALT+O]" /></div></form>      </div>

      <div class="bar-right" id="bar__topright">

        <form class="button" method="get" action="/doku.php/"><div class="no"><input type="hidden" name="do" value="recent" /><input type="submit" value="Recent changes" class="button" accesskey="r" title="Recent changes [ALT+R]" /></div></form>        <form action="/doku.php/" accept-charset="utf-8" class="search" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" class="edit" title="[ALT+F]" /><input type="submit" value="Search" class="button" title="Search" /><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>&nbsp;
      </div>

      <div class="clearer"></div>
    </div>

        <div class="breadcrumbs">
      Trace: <span class="bcsep">&raquo;</span> <a href="/doku.php/publications/sa-wrapper"  class="breadcrumbs" title="publications:sa-wrapper">sa-wrapper</a> <span class="bcsep">&raquo;</span> <span class="curid"><a href="/doku.php/publications/sa-postfix-en"  class="breadcrumbs" title="publications:sa-postfix-en">sa-postfix-en</a></span>          </div>

    
        <div class="breadcrumbs">
      You are here: <a href="/doku.php/start"  title="start">start</a> &raquo; <a href="/doku.php/publications"  title="publications">publications</a> &raquo; <a href="/doku.php/publications/sa-postfix-en"  title="publications:sa-postfix-en">sa-postfix-en</a>    </div>
    
  </div>
  
  
  <div class="page">

    <!-- wikipage start -->
    <div class="toc">
<div class="tocheader toctoggle" id="toc__header">Table of Contents</div>
<div id="toc__inside">

<ul class="toc">
<li class="level1"><div class="li"><span class="li"><a href="#spamassassin_and_postfix" class="toc">SpamAssassin and Postfix</a></span></div>
<ul class="toc">
<li class="level2"><div class="li"><span class="li"><a href="#postfix_configuration" class="toc">Postfix configuration</a></span></div>
<ul class="toc">
<li class="level3"><div class="li"><span class="li"><a href="#etcpostfixaliases_file" class="toc">/etc/postfix/aliases file</a></span></div></li>

<li class="level3"><div class="li"><span class="li"><a href="#etcpostfixmain.cf_file" class="toc">/etc/postfix/main.cf file</a></span></div></li>
<li class="level3"><div class="li"><span class="li"><a href="#etcpostfixtransport_file" class="toc">/etc/postfix/transport file</a></span></div></li>
<li class="level3"><div class="li"><span class="li"><a href="#etcpostfixmaster.cf_file" class="toc">/etc/postfix/master.cf file</a></span></div></li>
</ul>
</li>
<li class="level2"><div class="li"><span class="li"><a href="#wrapper" class="toc">Wrapper</a></span></div></li>
<li class="level2"><div class="li"><span class="li"><a href="#final_setup" class="toc">Final setup</a></span></div></li></ul>
</li></ul>
</div>
</div>


<h1><a name="spamassassin_and_postfix" id="spamassassin_and_postfix">SpamAssassin and Postfix</a></h1>
<div class="level1">

<p>
 <strong>Note:</strong> This page has been resurrected from my old site (R.I.P.). As I still see hits in my logs from people looking at it, I managed to get its content and put it here.
</p>

<p>
SpamAssassin (SA) updates its bayesian filter with the command <code>sa-learn</code>. However, if one use a setup using for instance AMaViS to activate an antivirus and SA for all the mails going through the server, it can be useful to provide 2 mail aliases (eg spam@example.com and ham@example.com) to report false positives and false negatives that could have gone through SA. Theses aliases would allow, just by forwarding the offending mail, to transmit them to sa-learn.
</p>

<p>
To achieve this we will configure several parts of Postfix and use a wrapper script for sa-learn.
</p>

<p>
Beware: for this to work with the provided script, your forwarded message must be in the form of message/rfc822. Ths is possible for example with Thunderbird or Mozilla by choosing to forward messages as attachments in Options/Composition. A following version will accept Outlook forwarded messages. If you want to do this yourself, please tell me and I will include your patch. Thomas A. Luther tells me that if you compose a new message with Outlook, then drag and drop the spams/hams to it they will be sent as message/rfc822. So this can be a method.
</p>

</div>

<h2><a name="postfix_configuration" id="postfix_configuration">Postfix configuration</a></h2>
<div class="level2">

</div>

<h3><a name="etcpostfixaliases_file" id="etcpostfixaliases_file">/etc/postfix/aliases file</a></h3>
<div class="level3">

<p>
 In this file, add the two first and optionally the third aliases like this:
</p>
<pre class="code">
spam:		spam@spam.spam
ham:		ham@ham.ham
notspam:	ham@ham.ham
</pre>

<p>
You can now issue the command newaliases, it causes no harm. These aliases will redirect the mail towards the special domains that we will define later.
</p>

<p>
N.B. : The aliases spam and ham are examples. To avoid their spreading and thus being targetted by spammers, choose other aliases at your convenience.
</p>

</div>

<h3><a name="etcpostfixmain.cf_file" id="etcpostfixmain.cf_file">/etc/postfix/main.cf file</a></h3>
<div class="level3">

<p>
 Here we are going to define the transport file (if this is not already done) :
</p>
<pre class="code">
transport_maps = hash:/etc/postfix/transport
</pre>

</div>

<h3><a name="etcpostfixtransport_file" id="etcpostfixtransport_file">/etc/postfix/transport file</a></h3>
<div class="level3">

<p>
 You must create this file with the following lines, or just add them is it already exists:
</p>
<pre class="code">
spam.spam	sa-spam:
ham.ham		sa-ham:
</pre>

<p>
These lines define (fictitious) domains for which we will use a special transport defined in <code>/etc/postfix/master.cf</code>.

</p>

<p>
Don&#039;t forget to issue the command <code>postmap /etc/postfix/transport</code>.
</p>

</div>

<h3><a name="etcpostfixmaster.cf_file" id="etcpostfixmaster.cf_file">/etc/postfix/master.cf file</a></h3>
<div class="level3">

<p>
 Here we are going to setup the domain transports defined previously:

</p>
<pre class="code">
# Spam &amp; Ham
sa-spam	unix	-	n	n	-	-	pipe user=amavis:amavis argv=/usr/local/bin/sa-wrapper.pl spam ${sender}
sa-ham	unix	-	n	n	-	-	pipe user=amavis:amavis argv=/usr/local/bin/sa-wrapper.pl ham  ${sender}
</pre>

<p>
Replace the <code>user=amavis:amavis</code> parameter with the user:group that executes SA in your configuration.
</p>

</div>

<h2><a name="wrapper" id="wrapper">Wrapper</a></h2>

<div class="level2">

<p>
 The script is available <a href="/doku.php/publications/sa-wrapper" class="wikilink1" title="publications:sa-wrapper">here</a>. Download it in <code>/usr/local/bin</code> and edit it to set variable <code>$UNPACK_DIR</code> on a directory that you create in the <code>$HOME</code> directory of the user that execute SA (for instance amavis) and the <code>$SA_LEARN</code> variable to the path of the sa-learn executable. the <code>$DEBUG</code> variable purpose is to verify the correct setup of this hack (see below). The <code>@DOMAINS</code> variable has been added to check the sender against predefined values to allow only some senders to use these aliases. Set it to the domains you want to allow. Don&#039;t forget to set the rights and / or owner of the script to allow executing by amavis user and / or group.

</p>

<p>
Note: The script use the <code><acronym title="Multipurpose Internet Mail Extension">MIME</acronym>::Tools</code> package that is either already available for your distribution (for instance perl-<acronym title="Multipurpose Internet Mail Extension">MIME</acronym>-tools-5.411-6mdk for Mandrake 9.2 (wow, not really recent <img src="/lib/images/smileys/icon_razz.gif" class="middle" alt=":-P" />)), or at CPAN.
</p>

</div>

<h2><a name="final_setup" id="final_setup">Final setup</a></h2>

<div class="level2">

<p>
 Issue a postfix reload.
</p>

<p>
To check the correct configuration, set the <code>$DEBUG</code> variable to 1 in the wrapper script and forward a spam to the address <code>spam@example.com</code> where <code>example.com</code> is your domain. Check any error in the logfiles and wait until a line like this:

</p>
<pre class="code">
Jan 10 05:12:49 moulin postfix/pipe[8288]: 72C167E0C: to=&lt;spam@spam.spam&gt;, orig_to=&lt;spam@example.com&gt;, relay=sa-spam, delay=15, status=sent (spam.spam)
</pre>

<p>
appears in the mail logfile (or in <code>/var/log/syslog</code>). Then check the file(s) <code>/tmp/spam.log.</code><em>pid</em> (where <em>pid</em> is the <code>PID</code> of the process) to see if the SA tokens match the text of the spam that you forwarded. Do this test again but with a normal mail that you forward to <code>ham@example.com</code>. Don&#039;t forget to set the <code>$DEBUG</code> variable back to 0 if everything seems OK. The <code>$DEBUG</code> variable also ask the script to output some <code><acronym title="Multipurpose Internet Mail Extension">MIME</acronym>::Tools</code> info to /tmp/spam_err.log.

</p>

<p>
In case of problem, suggestion or question, email me to <a href="mailto:&#x6d;&#x69;&#x64;&#x40;&#x67;&#x74;&#x6d;&#x70;&#x2e;&#x6f;&#x72;&#x67;" class="mail JSnocheck" title="&#x6d;&#x69;&#x64;&#x40;&#x67;&#x74;&#x6d;&#x70;&#x2e;&#x6f;&#x72;&#x67;">&#x6d;&#x69;&#x64;&#x40;&#x67;&#x74;&#x6d;&#x70;&#x2e;&#x6f;&#x72;&#x67;</a>. 
</p>

</div>

    <!-- wikipage stop -->
  </div>

  <div class="clearer">&nbsp;</div>

  
  <div class="stylefoot">

    <div class="meta">
      <div class="user">
              </div>
      <div class="doc">
        publications/sa-postfix-en.txt &middot; Last modified: 20/09/2007 20:38 by mid      </div>
    </div>

   
    <div class="bar" id="bar__bottom">
      <div class="bar-left" id="bar__bottomleft">
        <form class="button" method="post" action="/doku.php/publications/sa-postfix-en"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="" /><input type="submit" value="Show pagesource" class="button" accesskey="v" title="Show pagesource [ALT+V]" /></div></form>        <form class="button" method="get" action="/doku.php/publications/sa-postfix-en"><div class="no"><input type="hidden" name="do" value="revisions" /><input type="submit" value="Old revisions" class="button" accesskey="o" title="Old revisions [ALT+O]" /></div></form>      </div>
      <div class="bar-right" id="bar__bottomright">
                                <form class="button" method="get" action="/doku.php/publications/sa-postfix-en"><div class="no"><input type="hidden" name="do" value="login" /><input type="submit" value="Login" class="button" title="Login" /></div></form>        <form class="button" method="get" action="/doku.php/publications/sa-postfix-en"><div class="no"><input type="hidden" name="do" value="index" /><input type="submit" value="Index" class="button" accesskey="x" title="Index [ALT+X]" /></div></form>        <a class="nolink" href="#dokuwiki__top"><input type="button" class="button" value="Back to top" onclick="window.scrollTo(0, 0)" title="Back to top" /></a>&nbsp;
      </div>

      <div class="clearer"></div>
    </div>

  </div>

</div>

<div class="footerinc">
  <a  href="/feed.php" title="Recent changes RSS feed"><img src="/lib/tpl/default/images/button-rss.png" width="80" height="15" alt="Recent changes RSS feed" /></a>

  <a  href="http://creativecommons.org/licenses/by-nc-sa/2.0/" rel="license" title="Creative Commons License"><img src="/lib/tpl/default/images/button-cc.gif" width="80" height="15" alt="Creative Commons License" /></a>

  <a  href="https://www.paypal.com/xclick/business=andi%40splitbrain.org&amp;item_name=DokuWiki+Donation&amp;no_shipping=1&amp;no_note=1&amp;tax=0&amp;currency_code=EUR&amp;lc=US" title="Donate"><img src="/lib/tpl/default/images/button-donate.gif" alt="Donate" width="80" height="15" /></a>

  <a  href="http://www.php.net" title="Powered by PHP"><img src="/lib/tpl/default/images/button-php.gif" width="80" height="15" alt="Powered by PHP" /></a>

  <a  href="http://validator.w3.org/check/referer" title="Valid XHTML 1.0"><img src="/lib/tpl/default/images/button-xhtml.png" width="80" height="15" alt="Valid XHTML 1.0" /></a>

  <a  href="http://jigsaw.w3.org/css-validator/check/referer?profile=css3" title="Valid CSS"><img src="/lib/tpl/default/images/button-css.png" width="80" height="15" alt="Valid CSS" /></a>

  <a  href="http://wiki.splitbrain.org/wiki:dokuwiki" title="Driven by DokuWiki"><img src="/lib/tpl/default/images/button-dw.png" width="80" height="15" alt="Driven by DokuWiki" /></a>



<!--

<rdf:RDF xmlns="http://web.resource.org/cc/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<Work rdf:about="">
   <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
   <license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/" />
</Work>

<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/">
   <permits rdf:resource="http://web.resource.org/cc/Reproduction" />
   <permits rdf:resource="http://web.resource.org/cc/Distribution" />
   <requires rdf:resource="http://web.resource.org/cc/Notice" />
   <requires rdf:resource="http://web.resource.org/cc/Attribution" />
   <prohibits rdf:resource="http://web.resource.org/cc/CommercialUse" />
   <permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
   <requires rdf:resource="http://web.resource.org/cc/ShareAlike" />
</License>

</rdf:RDF>

-->


</div>

<div class="no"><img src="/lib/exe/indexer.php?id=publications%3Asa-postfix-en&amp;1191008205" width="1" height="1" alt=""  /></div>
</body>
</html>