Laurent,

> I use :
> @spam_lovers_maps = (
>   { # a hash lookup table
>     '[EMAIL PROTECTED]' => 1, # wants spam (lowercase key!)
>     '.toto.com' => 0,        # does not want spam
>     '.' => 1,                # all other domains want spam
>   }
> );
> @bypass_spam_checks_maps = @spam_lovers_maps;

Ok.

> And I disabled :
> read_hash(\%local_domains, '/etc/postfix/domains');
> => there are .toto.com in /etc/postfix/domains

Why?

> But with this config, I haven't anymore these headers in all mails
> (@toto.com and [EMAIL PROTECTED])
> X-Virus-Scanned: amavisd-new
> X-Spam-Score: -3
> X-Spam-Level:
> X-Spam-Status
> I have just the X-Amavis header.

The X-Spam-* headers are only inserted for domains matching %local_domains.

> And furthermore, in amavis.log i have "mail_id: D5pMxIGH5Fk8, Hits: 0.63"
> for mail to [EMAIL PROTECTED] Hits means that the mail was analyzed, no ?

Checks are run regardless of recipient being local or not,
it is just the insertion of header fields that is controlled
by being local.

> Is it possible to use in /etc/postfix/domains :
>     '[EMAIL PROTECTED]' => 1
>     '.toto.com' => 0
> ??

Yes, certainly. The same rules apply to all hash-type lookup tables.

It is also possible to specify equivalent in a file, as read
by read_hash(), e.g.:

  read_hash(\%local_domains, '/etc/postfix/domains');

where the file could contain:

[EMAIL PROTECTED]
.toto.com 0

but why would you do so? You probably mean the opposite,
saying that laurent is non-local, while the rest of
the toto.com is your local domain:

[EMAIL PROTECTED]  0
.toto.com

I'm still not sure what purpose would it achive to
make [EMAIL PROTECTED] non-local?



The comments with a read_hash subroutine indicate its accepted syntax:

# Format: one key per line, anything from '#' to the end of line
# is considered a comment, but '#' within correctly quoted rfc2821
# addresses is not treated as a comment introducer (e.g. a hash sign
# within "strange # \"foo\" address"@example.com is part of the string).
# Lines may contain a pair: key value, separated by whitespace,
# or key only, in which case a value 1 is implied. Trailing whitespace
# is discarded (iff $trim_trailing_space_in_lookup_result_fields),
# empty lines (containing only whitespace or comment) are ignored.
# Addresses (lefthand-side) are converted from rfc2821-quoted form
# into internal (raw) form and inserted as keys into a given hash.
# NOTE: the format is partly compatible with Postfix maps (not aliases):
#   no continuation lines are honoured, Postfix maps do not allow
#   rfc2821-quoted addresses containing whitespace, Postfix only allows
#   comments starting at the beginning of a line.



-------------------------------------------------------------------------
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
AMaViS-user@lists.sourceforge.net
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