<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 19, 2016 at 8:37 AM, Indunil Jayasooriya <span dir="ltr"><<a href="mailto:indunil75@gmail.com" target="_blank">indunil75@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span><br>
><br>
> I want to know if amavisd-new can bock mails based on Message-ID:, when it<br>
> has a particular PATTERN?<br>
<br>
</span>You can do that in the MTA. In Postfix this would be in header_checks:<br>
<span><br></span></blockquote></span><div> thanks for the answer. it is something I never thought of. </div><span class="gmail-"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>
><br>
</span></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>> I get mails whose Message-ID s are like these?<br>
><br>
><br>
> Message-ID: 861dfa65-7e64a83d-4434-525d-cl<wbr>mthigeer-PC-EXC02.Fanex-us.loc<wbr>al<br>
><br>
> Message-ID: fe8e9914-909f386c-dd43-fa1c-cl<wbr>mthigeer-PC-EXC02.Fanex-us.loc<wbr>al<br>
><br>
> Message-ID: 71fce904-aa6368fb-ebc9-172f-cl<wbr>mthigeer-PC-EXC02.Fanex-us.loc<wbr>al<br>
><br>
> Message-ID: c4aaf04e-24c231f0-12bb-1f68-cl<wbr>mthigeer-PC-EXC02.Fanex-us.loc<wbr>al<br>
<br>
<br>
</span>/^Message-ID: .*-clmthigeer-PC-EXC02.Fanex-u<wbr>s.local$/ REJECT<br>
<span><font color="#888888"><br></font></span></blockquote></span></div><br clear="all"><div><br></div><div>Hmm, REJECT . I want to <b>quarantine</b> it. so spam assassin is the preferred method for me. </div><div> </div><div><br></div><div>here's the maillog for that particular Message-ID -</div><div><br></div><div><br></div><div>Message-ID: <861dfa65-7e64a83d-4434-525d-c<wbr>lmthigeer-PC-EXC02<b>.Fanex-us.lo<wbr>cal</b>>, mail_id: rY0VX-C-oGTs,<br></div><div><br></div><div><br></div><div>here's my spamassaing rule</div><div><br></div><div>cat /etc/mail/spamassassin/<b>SPA<wbr>M_19SEP2016_Message_ID_1.cf</b></div><div><br><div>header FANEX-US Message-ID =~ /(fanex-us\.local)\b/i</div><div>describe FANEX-US Message-ID header matches a above pattern</div><div>score FANEX-US 5</div></div><div><br></div><div><br></div><div>I am going to add it today. I hope i will work. </div><div><b><br></b></div><div><b><br></b></div><div><b>any corrections are welcome.</b></div><span class="gmail-"><div><br></div><div><br></div><div>I had to change the above lines. <b> FANEX-US</b> did NOT work. I can go with <b>FANEX_US . </b></div></span></div></div></blockquote><div><br></div><div>I changed it to the below</div><div><br></div><div>my new file is given below. </div><div><br></div><div>cat /etc/mail/spamassassin/SPAM_19Sep2016_Message_ID_1.cf <br></div><div><br></div><div>header SPAM19SepMID1 Message-ID =~ /(fanex-us\.local)\b/i</div><div>describe SPAM19SepMID1 Message-ID header matches the above pattern</div><div>score SPAM19SepMID1 5</div><div> </div><div><br></div><div>I hope it will do the job. </div><div><br></div><div><br></div><div> </div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span class="gmail-"><div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div>-- <br><div><div dir="ltr">cat /etc/motd<br><br>Thank you<br>Indunil Jayasooriya <br><a href="http://www.theravadanet.net/" target="_blank">http://www.theravadanet.net/</a><br><a href="http://www.siyabas.lk/sinhala_how_to_install.html" target="_blank">http://www.siyabas.lk/sinhala_<wbr>how_to_install.html</a> - Download Sinhala Fonts<br><br></div></div>
</span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">cat /etc/motd<br><br>Thank you<br>Indunil Jayasooriya <br><a href="http://www.theravadanet.net/" target="_blank">http://www.theravadanet.net/</a><br><a href="http://www.siyabas.lk/sinhala_how_to_install.html" target="_blank">http://www.siyabas.lk/sinhala_how_to_install.html</a> - Download Sinhala Fonts<br><br></div></div>
</div></div>