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

Well I actually did get it to work with postfix using:

virtual_alias_maps = mysql:/etc/postfix/valias.cf

Basically is uses the same table as my transport, but I am pretty sure
I can trim it down.  I am currently not using all of the rows.

+-----------+-------------+------+-----+---------+----------------+
| Field     | Type        | Null | Key | Default | Extra          |
+-----------+-------------+------+-----+---------+----------------+
| id        | int(7)      |      | PRI | NULL    | auto_increment |
| domain    | varchar(40) |      |     |         |                |
| transport | varchar(40) |      |     |         |                |
| comment   | varchar(40) | YES  |     | NULL    |                |
| pridomain | varchar(40) | YES  |     | NULL    |                |
+-----------+-------------+------+-----+---------+----------------+


| 1 | foo.org      | dbmail:   | Primary domain      | NULL     |
| 2 | @foo.com | alias       | Secondary domain | @foo.org |


The only problem is that it does not work for local_recipient_maps. 
If an e-mail comes in for a non-existing user at foo.com, it will
accept the mail.  Whereas for foo.org, it will immediately bounce it.

Reply via email to