rs amavis.spam.futz.org,
> I'm trying to use amavis + postfix with virtual users,
with an extra twist:
> a wildcard virtual domain. This is configured in
postfix with a regexp
> file:
> virtual_mailbox_domains =
regexp:/etc/postfix/vhosts/domains
> which looks like this:
>
> /customer1.com/ virtual:
> /customer2.org/ virtual:
> /.*.customer3.org/ virtual:
You should anchor regular expressions as appropriate!
/ customer1.com$/
/ customer2.org$/
/.customer3.org$/
There is no need for using regular expressions in above
examples,
both the Postfix hash and the amavisd-new hash or lists
handle
cases like the above just fine. See README.lookups.
> What I want to do is stuff this file into
local_domains_maps, so that I can
> get spam headers added. Looking at the code, I see that
the lookup function
> will call lookup_re for isa('Amavis::Lookup::RE'), but
not being a perl
> person, I have no idea how to create such a beast.
>
> I see functions for read_hash and read_array... A
read_regexp function that
> would take the above file and stuff it into
local_domains_maps would be
> just what I'm looking for...
There are several examples of regexp use in
amavisd.conf-sample.
local_domains_maps = (
new_RE(
qr'[ .]example.com$'i,
qr' mx.customers-d+.example.com$'i,
qr' sub.[^ ]*.example.org$'i,
),
);
> but other suggestions (_besides_ "don't use
> wildcards") would be greatly appreciated!
Don't use wildcards
Mark
------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
AMaViS-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
|