Fwd: Can Amavisd block based on Message-ID ?

Indunil Jayasooriya indunil75 at gmail.com
Mon Sep 19 07:38:12 CEST 2016


On Mon, Sep 19, 2016 at 8:37 AM, Indunil Jayasooriya <indunil75 at gmail.com>
wrote:

>
>> >
>> > I want to know if amavisd-new can bock mails based on Message-ID:, when
>> it
>> > has a particular PATTERN?
>>
>> You can do that in the MTA. In Postfix this would be in header_checks:
>>
>>      thanks for the answer.  it is something I never thought of.
>
>
>> >
>>
>
>
>> > I get mails whose Message-ID s are like these?
>> >
>> >
>> > Message-ID: 861dfa65-7e64a83d-4434-525d-cl
>> mthigeer-PC-EXC02.Fanex-us.local
>> >
>> > Message-ID: fe8e9914-909f386c-dd43-fa1c-cl
>> mthigeer-PC-EXC02.Fanex-us.local
>> >
>> > Message-ID: 71fce904-aa6368fb-ebc9-172f-cl
>> mthigeer-PC-EXC02.Fanex-us.local
>> >
>> > Message-ID: c4aaf04e-24c231f0-12bb-1f68-cl
>> mthigeer-PC-EXC02.Fanex-us.local
>>
>>
>> /^Message-ID: .*-clmthigeer-PC-EXC02.Fanex-us.local$/ REJECT
>>
>>
>
> Hmm, REJECT . I want to *quarantine* it. so spam assassin  is the
> preferred method for me.
>
>
> here's the maillog for that particular Message-ID -
>
>
> Message-ID: <861dfa65-7e64a83d-4434-525d-clmthigeer-PC-EXC02
> *.Fanex-us.local*>, mail_id: rY0VX-C-oGTs,
>
>
> here's my spamassaing rule
>
> cat /etc/mail/spamassassin/*SPAM_19SEP2016_Message_ID_1.cf*
>
> header FANEX-US     Message-ID =~ /(fanex-us\.local)\b/i
> describe FANEX-US   Message-ID header matches a above pattern
> score FANEX-US      5
>
>
> I am going to add it today. I hope i will work.
>
>
> *any corrections are welcome.*
>
>
> I had to change the above lines. * FANEX-US* did NOT work. I can go with *FANEX_US
> . *
>

I changed it to the below

my new file is given below.

cat /etc/mail/spamassassin/SPAM_19Sep2016_Message_ID_1.cf

header SPAM19SepMID1 Message-ID =~ /(fanex-us\.local)\b/i
describe SPAM19SepMID1 Message-ID header matches the above pattern
score SPAM19SepMID1 5


I hope it will do the job.







>
>
>
>
>
>
>
>
>
> --
> cat /etc/motd
>
> Thank you
> Indunil Jayasooriya
> http://www.theravadanet.net/
> http://www.siyabas.lk/sinhala_how_to_install.html   -  Download Sinhala
> Fonts
>
>


-- 
cat /etc/motd

Thank you
Indunil Jayasooriya
http://www.theravadanet.net/
http://www.siyabas.lk/sinhala_how_to_install.html   -  Download Sinhala
Fonts
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20160919/8b6ebb8a/attachment.html>


More information about the amavis-users mailing list