You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Robert Chalmers <ro...@chalmers.com.au> on 2016/01/21 13:25:49 UTC

Looking for a way to dump spam assassin modified mail

I’m looking for a way to just dump mail that has the header modified with the ********* SPAM ********* assignment.

I mean, not have the Client mail reader do it, just have either spamd, or postfix/dovecot  dump it.

I’m sure I’ve seen something about doing this, but can’t find it now…. lost in al the configurations.

thanks



Robert Chalmers
robert@chalmers.com <ma...@chalmers.com>.au  Quantum Radio: http://tinyurl.com/lwwddov
Mac mini 6.2 - 2012, Intel Core i7,2.3 GHz, Memory:16 GB. El-Capitan 10.11. 2TB Storage made up of - 
Drive 0:HGST HTS721010A9E630. Upper bay. Drive 1:ST1000LM024 HN-M101MBB. Lower Bay




Re: Looking for a way to dump spam assassin modified mail

Posted by Reindl Harald <h....@thelounge.net>.

Am 21.01.2016 um 13:34 schrieb Antony Stone:
> On Thursday 21 January 2016 at 13:31:29, Reindl Harald wrote:
>
>>> On 01/21/2016 01:25 PM, Robert Chalmers wrote:
>>>> I’m looking for a way to just dump mail that has the header modified
>>>> with the ********* SPAM ********* assignment.
>>>>
>>>> I mean, not have the Client mail reader do it, just have either spamd,
>>>> or postfix/dovecot  dump it.
>>>>
>>>> I’m sure I’ve seen something about doing this, but can’t find it now….
>>>> lost in al the configurations.
>>
>> http://linux.die.net/man/1/spamass-milter
>
> Does that work with postfix?  (Surely not with dovecot...)

surely, http://www.postfix.org/MILTER_README.html

just make sure you have proper "postscreen_dnsbl_sites" config and 
"postscreen_dnsbl_action = enforce" in front so that your contentfilter 
only needs to deal with the remaining 10% of delivery attempts

smtpd_milters = unix:/run/spamass-milter/spamass-milter.sock

sa-milt    869  0.0  2.2 311972 91044 ?        Ss   Jan20   0:20 
/usr/bin/perl -T -w /usr/bin/spamd --max-children=20 --min-children=5 
--min-spare=5 --max-spare=10 --max-conn-per-child=200 
--socketpath=/run/spamassassin/spamassassin.sock --socketmode=0666
sa-milt    870  0.0  0.2 453832 10160 ?        SNsl Jan20   0:14 
/usr/sbin/spamass-milter -p /run/spamass-milter/spamass-milter.sock -g 
sa-milt -r 8.0 -- -s 10485760 --socket=/run/spamassassin/spamassassin.sock


Re: Looking for a way to dump spam assassin modified mail

Posted by Jari Fredriksson <ja...@iki.fi>.
Antony Stone kirjoitti 21.1.2016 14:34:
> On Thursday 21 January 2016 at 13:31:29, Reindl Harald wrote:
> 
>> > On 01/21/2016 01:25 PM, Robert Chalmers wrote:
>> >> I’m looking for a way to just dump mail that has the header modified
>> >> with the ********* SPAM ********* assignment.
>> >>
>> >> I mean, not have the Client mail reader do it, just have either spamd,
>> >> or postfix/dovecot  dump it.
>> >>
>> >> I’m sure I’ve seen something about doing this, but can’t find it now….
>> >> lost in al the configurations.
>> 
>> http://linux.die.net/man/1/spamass-milter
> 
> Does that work with postfix?  (Surely not with dovecot...)
> 
> 
> Antony.

Yes. it works with postfix.

-- 
jarif.bit


Re: Looking for a way to dump spam assassin modified mail

Posted by Antony Stone <An...@spamassassin.open.source.it>.
On Thursday 21 January 2016 at 13:31:29, Reindl Harald wrote:

> > On 01/21/2016 01:25 PM, Robert Chalmers wrote:
> >> I’m looking for a way to just dump mail that has the header modified
> >> with the ********* SPAM ********* assignment.
> >> 
> >> I mean, not have the Client mail reader do it, just have either spamd,
> >> or postfix/dovecot  dump it.
> >> 
> >> I’m sure I’ve seen something about doing this, but can’t find it now….
> >> lost in al the configurations.
>
> http://linux.die.net/man/1/spamass-milter

Does that work with postfix?  (Surely not with dovecot...)


Antony.

-- 
Wanted: telepath.   You know where to apply.

                                                   Please reply to the list;
                                                         please *don't* CC me.

Re: Looking for a way to dump spam assassin modified mail

Posted by Reindl Harald <h....@thelounge.net>.

Am 21.01.2016 um 13:29 schrieb Axb:
> On 01/21/2016 01:25 PM, Robert Chalmers wrote:
>> I’m looking for a way to just dump mail that has the header modified
>> with the ********* SPAM ********* assignment.
>>
>> I mean, not have the Client mail reader do it, just have either spamd,
>> or postfix/dovecot  dump it.
>>
>> I’m sure I’ve seen something about doing this, but can’t find it now….
>> lost in al the configurations.
>
> if "dump" means delete - you may want to rethink this - it's safer to
> MOVE to a "junk" folder...
>
> Whatever, as you have Dovecot, I'd recommend using a sieve rule to do
> whatever you decide is best with tagged spam

it means most likely REJECT 100% clear spam proper
http://linux.die.net/man/1/spamass-milter

* tag subject above 5.0
* reject above 8.0

normally you don't want to move *all* spam, even the crap with a score 
above 50 into a junk folder, you want there just the mails between 5.0 
and 8.0


Re: Looking for a way to dump spam assassin modified mail

Posted by Axb <ax...@gmail.com>.
On 01/21/2016 01:25 PM, Robert Chalmers wrote:
> I’m looking for a way to just dump mail that has the header modified with the ********* SPAM ********* assignment.
>
> I mean, not have the Client mail reader do it, just have either spamd, or postfix/dovecot  dump it.
>
> I’m sure I’ve seen something about doing this, but can’t find it now…. lost in al the configurations.
>

if "dump" means delete - you may want to rethink this - it's safer to 
MOVE to a "junk" folder...

Whatever, as you have Dovecot, I'd recommend using a sieve rule to do 
whatever you decide is best with tagged spam.



Fixed? Re: Looking for a way to dump spam assassin modified mail

Posted by Robert Chalmers <ro...@chalmers.com.au>.
Just to let anyone else know who may be interested. This appears to have solved the last little bit of spam getting through, as well as removing email that had the addition to the Subject line of the ********SPAM****** signal.

I haven’t had ANY spam sneak through now since I implemented this. Thanks Robert M.

Of course I have spam assassin itself running with the counts quite strict. I also have postscreen in postfix and other settings in there all quite rigid. and so on.





amavisd.conf

    $log_level = 1; # set the log level to one
    $sa_tag_level_deflt = -999; # i want to see the headers so change to -99
    $sa_tag2_level_deflt = 5.0; # start with 5
    $sa_kill_level_deflt = 9; # change to 9
    $sa_dsn_cutoff_level = 9; # change to 9
    $sa_quarantine_cutoff_level = 50; # remove the starting # and change to 50
    $notify_method = 'smtp:[127.0.0.1]:10025'; # uncomment the line
    $forward_method = 'smtp:[127.0.0.1]:10025'; # uncomment the line
    $final_banned_destiny = D_BOUNCE; # change to D_DISCARD 


> On 21 Jan 2016, at 12:57, Robert Chalmers <ro...@chalmers.com.au> wrote:
> 
> That looks to be just what I want. I now have it running, so will see how it goes. Thanks for that. Much appreciated
> 
> There are a few other really good options, but this one is nice and compact, no extra scripts.
> 
> I’m running amavis-new, postfix with postscreen fairly heavily in use, dovecot, spamassassin and not much gets through, but enough to annoy me.
> 
> Thanks to everyone  for the pointers. very useful.
> 
> Robert
> 
> 
>> On 21 Jan 2016, at 12:41, Robert Moskowitz <rgm@htt-consult.com <ma...@htt-consult.com>> wrote:
>> 
>> I use amavis-new to do this:
>> 
>> amavisd.conf
>> 
>>     $log_level = 1; # set the log level to one
>>     $sa_tag_level_deflt = -999; # i want to see the headers so change to -99
>>     $sa_tag2_level_deflt = 5.0; # start with 5
>>     $sa_kill_level_deflt = 9; # change to 9
>>     $sa_dsn_cutoff_level = 9; # change to 9
>>     $sa_quarantine_cutoff_level = 50; # remove the starting # and change to 50
>>     $notify_method = 'smtp:[127.0.0.1]:10025'; # uncomment the line
>>     $forward_method = 'smtp:[127.0.0.1]:10025'; # uncomment the line
>>     $final_banned_destiny = D_BOUNCE; # change to D_DISCARD 
>> 
>> 
>> 
>> On 01/21/2016 07:25 AM, Robert Chalmers wrote:
>>> I’m looking for a way to just dump mail that has the header modified with the ********* SPAM ********* assignment.
>>> 
>>> I mean, not have the Client mail reader do it, just have either spamd, or postfix/dovecot  dump it.
>>> 
>>> I’m sure I’ve seen something about doing this, but can’t find it now…. lost in al the configurations.
>>> 
>>> thanks
>>> 
>>> 
>>> 
>>> Robert Chalmers
>>> robert@chalmers.com <ma...@chalmers.com>.au  Quantum Radio: http://tinyurl.com/lwwddov <http://tinyurl.com/lwwddov>
>>> Mac mini 6.2 - 2012, Intel Core i7,2.3 GHz, Memory:16 GB. El-Capitan 10.11. 2TB Storage made up of - 
>>> Drive 0:HGST HTS721010A9E630. Upper bay. Drive 1:ST1000LM024 HN-M101MBB. Lower Bay
>>> 
>>> 
>>> 
>> 
> 
> Robert Chalmers
> robert@chalmers.com <ma...@chalmers.com>.au  Quantum Radio: http://tinyurl.com/lwwddov <http://tinyurl.com/lwwddov>
> Mac mini 6.2 - 2012, Intel Core i7,2.3 GHz, Memory:16 GB. El-Capitan 10.11. 2TB Storage made up of - 
> Drive 0:HGST HTS721010A9E630. Upper bay. Drive 1:ST1000LM024 HN-M101MBB. Lower Bay
> 
> 
> 

Robert Chalmers
robert@chalmers.com <ma...@chalmers.com>.au  Quantum Radio: http://tinyurl.com/lwwddov
Mac mini 6.2 - 2012, Intel Core i7,2.3 GHz, Memory:16 GB. El-Capitan 10.11. 2TB Storage made up of - 
Drive 0:HGST HTS721010A9E630. Upper bay. Drive 1:ST1000LM024 HN-M101MBB. Lower Bay




Re: Looking for a way to dump spam assassin modified mail

Posted by Robert Chalmers <ro...@chalmers.com.au>.
That looks to be just what I want. I now have it running, so will see how it goes. Thanks for that. Much appreciated

There are a few other really good options, but this one is nice and compact, no extra scripts.

I’m running amavis-new, postfix with postscreen fairly heavily in use, dovecot, spamassassin and not much gets through, but enough to annoy me.

Thanks to everyone  for the pointers. very useful.

Robert


> On 21 Jan 2016, at 12:41, Robert Moskowitz <rg...@htt-consult.com> wrote:
> 
> I use amavis-new to do this:
> 
> amavisd.conf
> 
>     $log_level = 1; # set the log level to one
>     $sa_tag_level_deflt = -999; # i want to see the headers so change to -99
>     $sa_tag2_level_deflt = 5.0; # start with 5
>     $sa_kill_level_deflt = 9; # change to 9
>     $sa_dsn_cutoff_level = 9; # change to 9
>     $sa_quarantine_cutoff_level = 50; # remove the starting # and change to 50
>     $notify_method = 'smtp:[127.0.0.1]:10025'; # uncomment the line
>     $forward_method = 'smtp:[127.0.0.1]:10025'; # uncomment the line
>     $final_banned_destiny = D_BOUNCE; # change to D_DISCARD 
> 
> 
> 
> On 01/21/2016 07:25 AM, Robert Chalmers wrote:
>> I’m looking for a way to just dump mail that has the header modified with the ********* SPAM ********* assignment.
>> 
>> I mean, not have the Client mail reader do it, just have either spamd, or postfix/dovecot  dump it.
>> 
>> I’m sure I’ve seen something about doing this, but can’t find it now…. lost in al the configurations.
>> 
>> thanks
>> 
>> 
>> 
>> Robert Chalmers
>> robert@chalmers.com <ma...@chalmers.com>.au  Quantum Radio: http://tinyurl.com/lwwddov <http://tinyurl.com/lwwddov>
>> Mac mini 6.2 - 2012, Intel Core i7,2.3 GHz, Memory:16 GB. El-Capitan 10.11. 2TB Storage made up of - 
>> Drive 0:HGST HTS721010A9E630. Upper bay. Drive 1:ST1000LM024 HN-M101MBB. Lower Bay
>> 
>> 
>> 
> 

Robert Chalmers
robert@chalmers.com <ma...@chalmers.com>.au  Quantum Radio: http://tinyurl.com/lwwddov
Mac mini 6.2 - 2012, Intel Core i7,2.3 GHz, Memory:16 GB. El-Capitan 10.11. 2TB Storage made up of - 
Drive 0:HGST HTS721010A9E630. Upper bay. Drive 1:ST1000LM024 HN-M101MBB. Lower Bay




Re: Looking for a way to dump spam assassin modified mail

Posted by Robert Moskowitz <rg...@htt-consult.com>.
I use amavis-new to do this:

amavisd.conf

     $log_level = 1; # set the log level to one
     $sa_tag_level_deflt = -999; # i want to see the headers so change 
to -99
     $sa_tag2_level_deflt = 5.0; # start with 5
     $sa_kill_level_deflt = 9; # change to 9
     $sa_dsn_cutoff_level = 9; # change to 9
     $sa_quarantine_cutoff_level = 50; # remove the starting # and 
change to 50
     $notify_method = 'smtp:[127.0.0.1]:10025'; # uncomment the line
     $forward_method = 'smtp:[127.0.0.1]:10025'; # uncomment the line
     $final_banned_destiny = D_BOUNCE; # change to D_DISCARD



On 01/21/2016 07:25 AM, Robert Chalmers wrote:
> I’m looking for a way to just dump mail that has the header modified 
> with the ********* SPAM ********* assignment.
>
> I mean, not have the Client mail reader do it, just have either spamd, 
> or postfix/dovecot  dump it.
>
> I’m sure I’ve seen something about doing this, but can’t find it 
> now…. lost in al the configurations.
>
> thanks
>
>
>
> Robert Chalmers
> robert@chalmers.com <ma...@chalmers.com>.au Quantum Radio: 
> http://tinyurl.com/lwwddov
> Mac mini 6.2 - 2012, Intel Core i7,2.3 GHz, Memory:16 GB. El-Capitan 
> 10.11. 2TB Storage made up of -
> Drive 0:HGST HTS721010A9E630. Upper bay. Drive 1:ST1000LM024 
> HN-M101MBB. Lower Bay
>
>
>