jweinbergerhj wrote:
When I used the check_recipient_access it passed the message to the content filter before
alias expansion, and when I used the content_filter it passed it after. Can you tell me (or
point me to resources) that show me how to control this? it might help me achieve my
goal...thanks.
No, what you observed is that check_{sender, recipient}_access
always operates on the SMTP envelope address, not the expanded
address.
To operate on the expanded address, you should use
transport_maps and multiple instances of postfix.
Also I would need check_recipient_access to be a mysql: table (which
it can be), but I don't know how to control the matching order in a
mysql table lookup - any ideas?
postfix lookup order is independent of the map type.
OK, got that. But the question isn't whether it's different for mysql maps, but how I can
make sure that when addr...@domain.tld is matched it matches "addr...@domain.tld"
before it matches "domain.tld" and that before it matches "/./" (all). This way I can specify
per user, per domain and have a catch-all (default)
See the documented search order:
http://www.postfix.org/access.5.html
Note that a catchall is likely to short-circuit this. If you
use a catch-all you'll need to plan carefully.
Specifically, if you have a catchall you need to make sure the
first u...@example.com search matches something.
It did not work this way with transport_maps, but that might be because I specified two
different maps (transport_maps=mysql:/path/to/one.cf, mysql:/path/to/two.cf). In that
case if something matched in one.cf, then it never checked two.cf.
Transports_maps search order works as documented, independent
of the number of maps specified. Probably the catchall
triggered before you intended.
http://www.postfix.org/transport.5.html
Multiple postfix instances on one machine might be the best answer to this. Can you point
me to something on how to do this? I'm not at all familiar with how this might work and be
sure they don't interfere with one another.
Yes, multiple instances sounds like what you need.
This is a little old, but should still work:
http://advosys.ca/papers/postfix-instance.html
--
Noel Jones