Gary wrote:
>> so this file contains domains 1 per line, followed by comma, starting with
>> space:
>> relay_domains = $mydestination, /etc/postfix/relay_domains
OK, I see. My mistake. You were reading the file as a plain text file.
That is why this was working for you:
>> domain1.com,
>> domain2.com,
>> domain3.com
and the format makes more sense. (but I'm not sure the first domain should
have a space in front of it).
>> i just copied it cleaning spaces and commas
>> and amavis does work:
>> @local_domains_maps = ( read_hash("/etc/postfix/amavis_relay_domains") );
Let me explain a little bit more. A hash table (both Postfix and
amavisd-new can read this data as a hash table) typically has a LHS
and a RHS:
key1 data
key2 data
If the RHS is missing, the read_hash function in amavisd-new assumes the
RHS is a 1 (true), so you can have:
key1
key2
In Perl, 0 is false, 1 or a non zero character is true, so you can have
the data in the form:
key1 OK
key1 1
and amavisd-new will translate the RHS as true in both cases.
If you put a zero here:
domain1.com 0
domain2.com 0
then both of these domains would not be included in
@local_domains_maps because the result is 'false'.
For Postfix, all hash tables need a RHS and a LHS, but for this
particular relay_domains table, while the RHS must exist, only the
key on the LHS is actually used, the data on the RHS is not used.
So, both of these will work:
key1 OK
key1 1
There are other tables (like relay_recipients) in Postfix that also
need a RHS, but don't actually use it. Unlike amavisd-new, Postix will
not allow the form:
key1
key2
Once the data in relay_domains is in the form:
domain1.com OK
or
domain1.com 1
or
domain1.com something_other_than_zero
then Postfix can use:
relay_domains = $mydestination, hash:/etc/postfix/relay_domains
once you postmap the file. And amavisd-new can also use the file.
Gary V
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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/