> > For MYNETS I don't want to tag or block any mails at all.
> > However, I do want to alert the spam-admin whenever there
> > are spammy mails leaving my network.
> >
> > Is there any way to accomplish that?

It took me a while to configure and test, but now I've got a working
setup which I'd like to share with the rest of you for completeness:

$policy_bank{'MYNETS'} = {
  originating => 1,  # is true in MYNETS by default, but let's make it explicit
#  bypass_spam_checks_maps  => [ 1 ],   # may not be such a good idea, consider 
zombified infected local PCs
  # better: increase the kill score level to alert the mailadmin:
  spam_tag_level_maps  => 5000.0,  # do not add X-Spam headers
  spam_tag2_level_maps => 5000.0,  # let everything pass unmodified
  spam_kill_level_maps => 5.0,  # alert mailadmin if above this level (but 
still let it pass)
  final_spam_destiny       => D_PASS,
  final_bad_header_destiny => D_PASS,
  final_virus_destiny      => D_DISCARD,
  X_HEADER_TAG => undef,  # do not add 'X-Virus-Scanned' header
  virus_admin_maps => ["[EMAIL PROTECTED]"],   # alert of infected local hosts
  spam_admin_maps  => ["[EMAIL PROTECTED]"],   # alert of internal spam
  bypass_banned_checks_maps => [1],  # allow sending any file names and types
  bypass_header_checks_maps => [1],  # don't header-check internal mail
  quarantine_method_by_ccat => {CC_SPAM, undef},  # no need to quarantine if 
spam is passed anyway
};

I was missing to set "spam_kill_level_maps".  That's why there was no
alert to the mailadmin.
Thanks a lot to Gary for his great help!

Now a spammy mail shows up in the logs like this:
 May  5 16:54:53 mail-gw-4 amavis[11027]: (11027-01) Passed SPAM, MYNETS LOCAL 
[10.10.10.3] [10.10.10.3] <[EMAIL PROTECTED]> -> <[EMAIL PROTECTED]>, 
Message-ID: <[EMAIL PROTECTED]>, mail_id: 4W6mUvglnbKe, Hits: 998.56, size: 
453, queued_as: 2FEE784C284, 1380 ms

And it's being delivered okay:
 May  5 16:55:01 mail-gw-4 postfix/smtp[11049]: 2FEE784C284: to=<[EMAIL 
PROTECTED]>, relay=mx-ha01.web.de[217.72.192.149], delay=8, status=sent (250 OK 
id=1Jt25k-0003gn-00)


On 2008-04-14, 09:35, Gary V wrote:
> It appears this will disable the X-Virus-Scanned: header (if desired):
>   X_HEADER_TAG => undef,
confirmed

> And it appears this will disable spam quarantine (no need to
> quarantine if spam is passed):
>   quarantine_method_by_ccat => {CC_SPAM, undef},
confirmed

> I have not tested to see if this syntax affects other quarantines
> (like virus).
It does not affect the virus quarantine.

Thanks again,
 Andy.

-- 
 Finagle's First Law:
   If an experiment works, something has gone wrong.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to