Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

email address / synonym - per (full) address basis?

Status
Not open for further replies.

monideth

IS-IT--Management
Sep 11, 2003
29
GB
All,

Does anybody know how I can create an alias/synonym on a per email address basis.

By alias/synonym I do not mean the usual where you can create an alias/forward for accounts in the same domain.

What I want is to alias one address from one domain and map it to another address in another domain. I don't want to use a domain alias, since this works for the whole domain - I only want to mapped certain and specific addresses. In effect, I want to filter certain addresses and mapped them to a different address.

The reason why I want this is to perform easy and transparent migration from our exisiting email system. In effect the qmail system is filtering the emails addresses for accounts that have been moved over to it, but still allow emails for non-existing accounts to go through and passed on to the existing email system.

I hope these requirements are clear! Let me know if anybody requires further clarifcation?

Regards,

Mon
 
This gets a bit different if you're using local account delivery or virtual delivery to something like vpopmail on the first receiving mail server.

You need to ensure the qmail server can accept for the "old" domains you need to handle. You also need to make sure that the appropriate MX records are in place.

Then you use the .qmail- file for each user's delivery to route them to another account where needed.

EXAMPLE:
people are sending to joe@mail1.example.com
you have moved joe to joe@mail2.example.com
(this applies equally well to joe@otherdomain.com)

VPOPMAIL FIX:
You leave/setup the MX,etc. on the qmail server known as mail1.example.com and make sure that there is no account "joe@mail1.example.com". Then add a .qmail-joe file in the domain directory (where .qmail-default is found) with the line "joe@mail2.example.com" in the file.

QMAIL LOCAL DELIVERY FIX:
create or edit the file ".qmail" in the homedir/Maildir for "joe" and give the file contents "&joe@mail2.example.com"

NOTE: Neither of these will fix the fact that "joe" will be sending mail from the new account which may confuse recipients.


D.E.R. Management - IT Project Management Consulting
 
Thanks thedaver for your reply.

I did a bit of lateral thinking and have coming up with a different solution to make the migration easier.

I made use of the .qmail-default file to route any unknown accounts to a new dummy domain that the existing email server is configured for.

Note: The current domain was configured (as a master domain - not alias)on the qmail server - as well as being configured on the existing email server.

In the .qmail-default file for the domain I used the following entry:

| /home/vpopmail/bin/vdelivermail '' ${DEFAULT}@dummy.domain

Note: I have also configured the email server with a new dummy domain so that I can forward emails to from the existing email server for accounts that have been moved to the qmail server.

Thus when an incoming email recieved to qmail will check if an account exists. If it does then it will deliver it locally. If, then it will forward it and change the domain to dummy.domain - which will get routed to the existing email server (I used the smtproutes file to manually route this domain).

This all sounds quite complicated and what I have describe is not all that was done - but I i think this is the best solution for me in terms of how I want to migrate.

If anybody wants more details on exactly what was configured then please let me know!

Regards,

Mon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top