Thomas,
> Is there a way for amavisd-new to add X-Spam-Score from spamassassin in
> every header? It works fine for all mydomains with @local_domains_maps =
> ( [".$mydomain"] );
>
> but I have a lot of backup mx ranges in my postfix with domains i don't
> host by myself. I need a full scan for this ranges including adding all
> X-* flags to the header.
Content is scanned regardless of @local_domains_maps,
it's just the adding of X-Spam-* header fields that
we are discussing here, these header fields are only
added to inbound mail (or internal-to-internal mail).
A common way for amavisd to know if mail is inbound
for any given recipient is to check recipient address
against @local_domains_maps (in case of multiple recipients,
mail can be both internal-to-internal and outbound at
the same time, the property is per-recipient).
This is the same mechanism as used my MTA
(e.g. to prevent it being an open relay, ...).
Determining whether to add X-Spam-* header fields is not
the only reason for @local_domains_maps, a mail direction
influences some other decisions too, like penpals, DKIM signing
vs. verification, recipient notifications, adding disclaimers,
adding X-Quarantine-ID header field, choice of SNMP-like
statistics counters (amavisd-agent), and likely more
in the future.
Even though you may treat all world as local
(by having a '.' in @local_domains_maps), it will
cause all mail to be treated internal-to-internal
or inbound, and is it quite likely that sooner or
later some functionality will behave contrary to
your expectations. Don't do that.
As you already have a list of local domains made
available to your MTA, your best choice is to make
the same list (or its derivative) also available
to amavisd. One way is to read a text file with
domains (one per line, leading dot implies its
subdomains), e.g.:
@local_domains_maps =
( read_hash("$MYHOME/etc/local_domains") );
Other choices is to share a SQL table of
local domains between MTA and amavisd.
There are other options possible, the amavisd.conf
is just a Perl program, write a small loop to
create a perl hash from your list of domains
and assign a ref to it to @local_domains_maps.
> Can this be done with @mynetworks in amavisd.conf?
No, @mynetworks tell amavisd the origin of mail,
not its destination (just like in MTA).
mynetwork local
0 0 can not happen (open relay)
0 1 inbound
1 0 outbound
1 1 internal-to-internal
Mark
internal-to-internal from
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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/