Leon wrote:

> Hi,

> I've used this syntax to avoid spam/header/banned_files checks for selected
> e-mail adrr.:
> @spam_lovers_maps
>         = @bypass_spam_checks_maps
>         = @banned_files_lovers_maps
>         = @bypass_banned_checks_maps
>         = @bad_header_lovers_maps
>         = @bypass_header_checks_maps = (
> read_hash("/var/spool/amavis/spam-lovers.txt"),

> And it seems to work partially - 

> 1) When I send e-mail to one of my server's e-mails listed in
> spam-lovers.txt from another domains, I got the following headers added by
> my amavisd-new (for examplee):

> X-Virus-Scanned: amavisd-new at mydomain.ac.il
> X-Spam-Score: 1.429
> X-Spam-Level: *
> X-Spam-Status: No, score=1.429 tagged_above=-999 required=5
> tests=[AWL=-0.893,
>         BAYES_50=0.001, HTML_30_40=0.374, HTML_MESSAGE=0.001,
>         MIME_BASE64_NO_NAME=0.224, SUBJECT_ENCODED_TWICE=1.723]

In example 1, it should bypass scanning (or at least still deliver the
message) for the *recipients* listed in the map. Note that if a message has
more than one recipient, and at least one other recipient is not in your
map, the message *will* get scanned (but the message will get delivered to
the recipient who is a lover, even if the message scores over kill_level).
The format of the addresses in the map should similar to:
[EMAIL PROTECTED]
[EMAIL PROTECTED]

(or)
[EMAIL PROTECTED] 1
[EMAIL PROTECTED] 1

Did you restart amavisd-new after adding the addresses?

> 2) When I send an e-mail from one of the listed e-mail I see that the only
> header added by amvis is:
> X-Virus-Scanned: amavisd-new at mydomain.ac.il

> I thought that only X-Virus-Scanned header should be added in both cases.
> Why it isn't so?

The rules above are applied to *recipients* and not senders so it should
not work in both cases. If you are sending to a recipient that is not
listed in the map shown, scanning should take place (unless it is
bypassed somewhere else in your configuration). In other words, putting
a sender in the map will not affect mail the sender sends. You don't
place email addresses in the map, you place recipient email addresses
in the map. Also, the reason no header was inserted in example 2 is
likely because spam headers are only inserted if the mail is addressed
to a recipient that is considered 'local'. In other words, the recipient
is listed in @local_domains_maps or other similar mechanism. The fact
that the X-Spam headers are not there does not necessarily mean
scanning did not occur.

If you want to bypass scanning for a group of senders (like senders on
your internal or senders sending mail to domains other than yours or
SASL AUTH senders) then I would direct you to amavisd.conf-sample
(specifically this part):

# don't run spam check for these RECIPIENT domains:
#   @bypass_spam_checks_maps = ( [qw( d1.com .d2.com a.d3.com )] );
# or the other way around (bypass check for all BUT these):
#   @bypass_spam_checks_maps = ( [qw( !d1.com !.d2.com !a.d3.com . )] );
# a practical application: don't check outgoing mail for spam:
#   @bypass_spam_checks_maps = ( [ "!.$mydomain", "." ] );
# or calculated (negated) from the %local_domains:
#   @bypass_spam_checks_maps =
#     ( {map {$_ => !$local_domains{$_}} keys %local_domains}, 1);
# (a downside of which is that such mail will not count as ham in SA bayes db)

or the document:
http://www200.pair.com/mecham/spam/bypassing.html

> I want e-mail coming to e-mails listed in spam-lovers.txt file scanned for
> viruses only. How can I achieve this?

The way you are doing it should work. I don't see anything obviously
wrong, except:

 After read_hash("/var/spool/amavis/spam-lovers.txt"), I assume the
 next line is:
  );

Gary V


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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