Matt Salerno wrote:
On 4/14/05, Steve Burrows <[EMAIL PROTECTED]> wrote:
Matt,
The way I do it is in the Postfix Canonical table, where I translate
olddomainname into newdomainname for all mail.
The syntax is
@olddomainname @newdomainname
Then you just do a postmap canonical and a postfix reload. I do it for
several domains, you can also do individual users so you can make it
work like a conventional aliases files:
for instance:
[EMAIL PROTECTED] [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]
The point about using canonical is that you have to understand the
filtering order in Postfix, some of the traditional mechanisms, such as
aliases, never get used in a conventional dbMail setup because they come
into effect _after_ the transport is implemented, so you can go changing
settings in Postfix which never work because Postfix has already passed
the mail on to dbMail. Canonical gets processed very early.
HTH
Steve
From my understanding of using the canonical table, the domains would
actually be rewritten in the e-mail. Is there a way to avoid this
from happening? or do I need to find another mechanisim to accomplish
this?
Thanks for the help
_______________________________________________
Matt,
Yes the domain name is rewritten, so [EMAIL PROTECTED] becomes
[EMAIL PROTECTED] This is the way I want it because we have changed
domain name but some people still write to us on the old domain. Where a
user has email aliases across multiple domains (we have a few users who
operate on multiple domains) I set those aliases up in dbmail, so the
only change in postfix is to add the additional domains to the transport
table so that postfix delivers the email to dbmail, then the actual
aliases are provided by dbmail.
I'm still using dbmail 1.2, so I don't know if this has changed with
version 2, but the way I have1.2 set up you need a dbmail alias for each
email address on which the user is to receive mail, because if the email
address is not matched in the dbmail alias table then dbmail will bounce it.
The question you have to ask yourself is whether a recipient of email on
multiple domains is going to need the mail segregated by domain, or
whether you can deliver all domains to the one inbox. If you dont need
segregation or filtering you should be able to extract the existing
alias records from the dbmail alias table, do a global substitution on
the domain name, and write a simple script for dbmail-adduser to add the
new aliases (or you can do it in SQL, I think the database will
automatically create the alias_idnr using the nextval function and the
alias_idnr_seq sequence value). If you want to filter the mail by domain
for each user then you will either need multiple delivery points
(inbox_domain1, inbox_domain2) etc. and set different deliver_to values
for each alias, or give them multiple email accounts.
HTH,
Steve