(OT) Postfix Virtual

Drew Marshall drew at THEMARSHALLS.CO.UK
Thu Dec 1 12:40: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 Wed, November 30, 2005 00:40, Peter Russell 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

Here is another way to look at this (Other than using virtual maps).

How about using alias maps on the local side as opposed to virtual?

Let me explain further. In the aliases file is a list of local users and
where their addresses alias to. Now from Postfix's perspective any domain
listed as local in main.cf will use this database to check aliases and
user maps, so if you create one list for example:

pete:    pete at exchange.domain.com

(Don't forget to run newaliases) and then modify main.cf to list your
incoming domains (All of them) as local in main.cf. All you then need to
do is modify your transport map file like:

exchange.domain.com    smtp:[exchange.ip.add.ress]

and postmap the transport file.

This will tell Postfix to alias all mail addressed to pete@<domains listed
as local> to pete at exchange.domain.com, MailScanner will do it's bit and
then the transport map will tell the delivery agent where to direct mail
to exchange.domain.com.

Doing it this way you may even be able to extract the users from AD and
add them to the aliases file automatically.

My 2p anyway

Drew


-- 
In line with our policy, this message has 
been scanned for viruses and dangerous 
content by MailScanner, and is believed to be clean.
www.themarshalls.co.uk/policy

------------------------ 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