Noel Jones wrote:
Fat Bear Mail Services wrote:
How would one setup Postfix that uses /etc/passwd for authentication so that e-mails of the pattern:

    [EMAIL PROTECTED]

is delivered to:

    [EMAIL PROTECTED]

where there is a 1:1 mapping between companyID and companyDomain? For example:

    [EMAIL PROTECTED] >>> [EMAIL PROTECTED]

Note above that "acme" maps to "acmedesign.com".

One would use an awk or perl script to generate a virtual_alias_map from the input file.
The virtual_alias_map could not be hash:/etc/postfix/virtual because that could not handle e-mail addresses where "anyString" is discarded, right? I would think that we'd need to have regexp:/etc/postfix/virtual that can handle transformations such as:

   [EMAIL PROTECTED] delivered to [EMAIL PROTECTED]
   [EMAIL PROTECTED] delivered to [EMAIL PROTECTED]
[EMAIL PROTECTED] delivered to [EMAIL PROTECTED]

What I'm looking for is a production-quality example of what I should be doing. I've read regexp_table(5) and I've tried doing:

postmap -q "[EMAIL PROTECTED]" regexp:/etc/postfix/virtual.regexp

for a virtual.regexp file including a line such as:

   /^pat-acme([EMAIL PROTECTED])@mycompany.com/ [EMAIL PROTECTED]

and this does work for queries such as:

#postmap -q "[EMAIL PROTECTED]" regexp:/etc/postfix/virtual-regexp
   [EMAIL PROTECTED]
   #

But, is this production quality? Can anyone poke any holes for entries such as the one above as the pattern that I should be using in the virtual-regexp file? Is this the right solution for doing this kind of thing?

Thanks!
Steve Amerige
Fat Bear

Reply via email to