(OT) Postfix Virtual
Glenn Steen
glenn.steen at GMAIL.COM
Wed Nov 30 12:26:33 GMT 2005
[ The following text is in the "ISO-8859-1" character set. ]
[ Your display is set for the "US-ASCII" character set. ]
[ Some characters may be displayed incorrectly. ]
On 30/11/05, Peter Russell <pete at enitech.com.au> wrote:
> Hi there, this is slightly OT question about postfix virtual alias
> maps/domains.
>
> We have a Domino network that we no longer to receive mail, all
> forwarded to an Exchange environment.
>
> Domino had 2 domains names for each username. So user1 at domain1.com and
> user1 at domain2.com mail was delivered to the same mailbox.
>
> Now i will to use Postfix on my mailscanner gateway to redirect either
> of those examples to a third domain. eg
>
> virtual_alias_map
> user1 at domain2.com, user1 at domain2.com user2 at domain3.com
>
> But since user1 is the same for 2 domains, is there any easy way to do
> this without specifying the 2 domains for each entry? So any mail for
> domain1.com or domain2.com lookup the same alias map, eg
>
> user1 user2 at domain3.com
>
> I hope this makes sense, and some one can help me.
> Appreciate any comments/suggestions
> Pete
Look at the following excerpt from the /etc/postfix/virtual file:
...
# @domain address, address, ...
# Mail for any user in domain is redirected to
# address. This form has the lowest precedence.
#
# In all the above forms, when address has the form @other-
# domain, the result is the same user in otherdomain. This
# works for the first address in the expansion only.
...
This rather implies that you should be able to do:
@domain1.tld @domain3.tld
@domain2.tld @domain3.tld
.... to get the job done. Of course, anything other than this (being
more specific) would take precedence... If the user part differ
between the domains (at least between domain[12] and domain3), you
lose unfortunately.
Or perhaps you could do something with the RE type table(s)?
/(.*)@domain[12].tld/ $1 at domain3.tld
... In this, the hash-or-dbm table from above would of course be one
of regexp or pcre (as needed).
I haven't tested any of these (I lack a functioning test environment
ATM), but I'm sure you'll see what works/doesn't:-). Or else Drew will
correct any misapprehensions:-):-)
Cheers
--
-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se
------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
Support MailScanner development - buy the book off the website!
More information about the MailScanner
mailing list