On 01/18/2011 03:59 PM, m...@junc.org wrote:
> On Tue, 18 Jan 2011 10:13:22 +0100, J4 wrote:
>
>>  I have Dovecot LDA so Sieve might well be a good idea, but I would
>> like to inform the sender that the Email was dropped as spam, and
>> avoid backscatter. I don't think I can do this with Sieve/Dovecot LDA.
>
> dont use sieve reject since if you are using pipe in postfix you will
> bounce to forged sender, so if you really need to bounce make sure it
> only happen on spf_pass or dkim valid, or local domain
>
> else your own ip will be blacklisted for sending to forged senders
>
> safe sicve rule is to move it to junk folder and do a cron from there
> that learn it as spam
>
> and when done delete the mail, if you install dovecot-antispam with
> mailtrain enabled then users just need to move mails via imap protocol
> to laern sa-learn --spam when move to junk, and when move out of junk
> sa-learn --ham is issued :=)
>
> neat ?
>
>
A great idea, but I would like to use SA instead of DSPAM, because I
have already spent too long setting it up.

I added this into postfix's master.cf so that SA would parse the email
before:
smtp      inet  n       -       -       -       -       smtpd
  -o content_filter=spamassassin
[...SNIP...]
spamassassin unix -     n       n       -       -       pipe
  user=nobody argv=/usr/bin/spamc -f -e
  /usr/sbin/sendmail -oi -f ${sender} ${recipient}

Interestingly, SA did identify the spam (address was blacklisted), but
still accepted it for delivery.  Also, logging is logging duplicate
lines, or something is being called twice!  Weird.

Tue Jan 18 15:37:18 2011 [5769] info: spamd: processing message
<4d35a5a4.80...@klunky.co.uk> for nobody:5002
Tue Jan 18 15:37:18 2011 [5769] info: spamd: processing message
<4d35a5a4.80...@klunky.co.uk> for nobody:5002
Jan 18 15:37:18 email51 postfix/smtpd[28592]: disconnect from
smtp-auth.no-ip.com[204.16.252.94]
Tue Jan 18 15:37:20 2011 [5769] info: auto-whitelist: sql-based
add_score/update -0.7|nobody|ju...@klunky.co.uk|62.58: SQL error: UPDATE
command denied to user 'spamassassin'@'localhost' for table 'awl'
Tue Jan 18 15:37:20 2011 [5769] info: auto-whitelist: sql-based
add_score/update -0.7|nobody|ju...@klunky.co.uk|62.58: SQL error: UPDATE
command denied to user 'spamassassin'@'localhost' for table 'awl'
Tue Jan 18 15:37:20 2011 [5769] info: spamd: clean message (-0.7/6.0)
for nobody:5002 in 1.9 seconds, 2172 bytes.
Tue Jan 18 15:37:20 2011 [5769] info: spamd: clean message (-0.7/6.0)
for nobody:5002 in 1.9 seconds, 2172 bytes.
Tue Jan 18 15:37:20 2011 [5769] info: spamd: result: . 0 -
HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS
scantime=1.9,size=2172,user=nobody,uid=5002,required_score=6.0,rhost=localhost,raddr=127.0.0.1,rport=40508,mid=<4d35a5a4.80...@klunky.co.uk>,autolearn=ham,shortcircuit=no
Tue Jan 18 15:37:20 2011 [5769] info: spamd: result: . 0 -
HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS
scantime=1.9,size=2172,user=nobody,uid=5002,required_score=6.0,rhost=localhost,raddr=127.0.0.1,rport=40508,mid=<4d35a5a4.80...@klunky.co.uk>,autolearn=ham,shortcircuit=no
Jan 18 15:37:20 email51 postfix/pickup[28562]: 599688227C: uid=65534
from=<ju...@klunky.co.uk>
Jan 18 15:37:20 email51 postfix/cleanup[28579]: 599688227C:
message-id=<4d35a5a4.80...@klunky.co.uk>
Jan 18 15:37:20 email51 postfix/pipe[28580]: 3FB15821A2:
to=<t...@test.info>, relay=spamassassin, delay=2.1, delays=0.15/0/0/2,
dsn=2.0.0, status=sent (delivered via spamassassin service)
Jan 18 15:37:20 email51 postfix/qmgr[28563]: 599688227C:
from=<ju...@klunky.co.uk>, size=2607, nrcpt=1 (queue active)
Jan 18 15:37:20 email51 postfix/qmgr[28563]: 3FB15821A2: removed
Tue Jan 18 15:37:20 2011 [5770] info: spamd: connection from localhost
[127.0.0.1] at port 40513
Tue Jan 18 15:37:20 2011 [5770] info: spamd: connection from localhost
[127.0.0.1] at port 40513
Tue Jan 18 15:37:20 2011 [5770] info: config: failed to parse line,
skipping, in "(no file)": bayes_auto_learn_threshold_spa 10
Tue Jan 18 15:37:20 2011 [5770] info: config: failed to parse line,
skipping, in "(no file)": bayes_auto_learn_threshold_spa 10
Tue Jan 18 15:37:20 2011 [5770] info: config: failed to parse line,
skipping, in "(no file)": bayes_auto_learn_threshold_spa 10
Tue Jan 18 15:37:20 2011 [5770] info: config: failed to parse line,
skipping, in "(no file)": bayes_auto_learn_threshold_spa 10
Tue Jan 18 15:37:20 2011 [5770] info: spamd: processing message
<4d35a5a4.80...@klunky.co.uk> for t...@test.info:5002
Tue Jan 18 15:37:20 2011 [5770] info: spamd: processing message
<4d35a5a4.80...@klunky.co.uk> for t...@test.info:5002
Tue Jan 18 15:37:20 2011 [5765] info: prefork: child states: IB
Tue Jan 18 15:37:20 2011 [5765] info: prefork: child states: IB
Tue Jan 18 15:37:20 2011 [5770] info: spamd: identified spam (99.3/4.0)
for t...@test.info:5002 in 0.1 seconds, 2616 bytes.
Tue Jan 18 15:37:20 2011 [5770] info: spamd: identified spam (99.3/4.0)
for t...@test.info:5002 in 0.1 seconds, 2616 bytes.
Tue Jan 18 15:37:20 2011 [5770] info: spamd: result: Y 99 -
RCVD_IN_DNSWL_LOW,SHORTCIRCUIT,USER_IN_BLACKLIST
scantime=0.1,size=2616,user=t...@test.info,uid=5002,required_score=4.0,rhost=localhost,raddr=127.0.0.1,rport=40513,mid=<4d35a5a4.80...@klunky.co.uk>,autolearn=disabled,shortcircuit=spam
Tue Jan 18 15:37:20 2011 [5770] info: spamd: result: Y 99 -
RCVD_IN_DNSWL_LOW,SHORTCIRCUIT,USER_IN_BLACKLIST
scantime=0.1,size=2616,user=t...@test.info,uid=5002,required_score=4.0,rhost=localhost,raddr=127.0.0.1,rport=40513,mid=<4d35a5a4.80...@klunky.co.uk>,autolearn=disabled,shortcircuit=spam
Jan 18 15:37:20 email51 dovecot: deliver(t...@test.info):
msgid=<4d35a5a4.80...@klunky.co.uk>: saved mail to INBOX
Jan 18 15:37:20 email51 postfix/pipe[28587]: 599688227C:
to=<t...@test.info>, relay=dovecot-spamass, delay=0.06,
delays=0/0/0/0.06, dsn=2.0.0, status=sent (delivered via dovecot-spamass
service)
Jan 18 15:37:20 email51 postfix/qmgr[28563]: 599688227C: removed

Reply via email to