|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Fat Bear Mail Services (postfix
fatbear.com)
Date: Tue Dec 02 2008 - 17:19:45 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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:
>>
>> username-companyID-anyString
domain1.com
>>
>> is delivered to:
>>
>> username
companyDomain.com
>>
>> where there is a 1:1 mapping between companyID and companyDomain?
>> For example:
>>
>> pat-acme-beta123
mycompany.com >>> pat
acmedesign.com
>>
>> 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:
pat-acme-123456
mycompany.com delivered to pat
acmedesign.com
pat-acme-tmp123
mycompany.com delivered to pat
acmedesign.com
pat-acme-reallyAnythingHere
mycompany.com delivered to
pat
acmedesign.com
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 "pat-acme-xxxxxx
mycompany.com"
regexp:/etc/postfix/virtual.regexp
for a virtual.regexp file including a line such as:
/^pat-acme(-[^
]+)
mycompany.com/ pat
acmedesign.com
and this does work for queries such as:
#postmap -q "pat-acme-xyzzy
mycompany.com"
regexp:/etc/postfix/virtual-regexp
pat
acmedesign.com
#
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
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]