Lindsay Haisley writes:

Just so I have this straight, would someone check me out on this
procedure.  What I want to do is move the destination for a bunch domain
names from one machine - machine A - to another on a different network -
machine B.  After the move, I want any residual mail in the Internet
mail system delivered to machine A due to cached DNS info to be
redirected to machine B by machine A.

Currently machine A is the preferred MX server in DNS-space.  Using
webadmin, I have all the domains for which A accepts mail listed under
"Locally-hosted Domains" on A, which causes them to be listed
in /etc/courier/esmtpacceptmailfor.dir/webadmin, and hence, I assume in
the database in /etc/courier/esmtpacceptmailfor.dat.  Mailboxes for each
domain are supported by a MySQL database which references a mailbox, or
possibly a .courier file in an alias directory.

My reading of the documentation indicates that to switch to another
server I need to do only the following:

1.  Set up machine B in DNS-land as the low number (preferred) MX for
each such domain name for which I want mail relayed.

2.  Make sure that mail to each mailbox or alias in said domain on
machine B is deliverable locally, just as it had been previously on
machine A.

Do I need to disable delivery on machine A so that mail to those
mailboxes for which it previously accepted delivery are no longer
available, or will Courier simply look at the MX records, note (on box
A) that it's no longer the preferred MX, and automatically requeue it
for delivery to machine B?

You have reconfigure the domain as a non-local domain. Remove it from hosteddomains, but keep in esmtpacceptmailfor.

First, define the other server as the preferred MX in DNS, and let the DNS changes propagate as far as your own machines are concerned.

I do not believe that webadmin implements this kind of configuration, so you'll have to do it manually. Stop incoming SMTP, so you do not interfere with normal mail flow while you're doing all this. Remove this domain as a locally-hosted domain, in webadmin. Before you actually install the webadmin configuration, put the domain into some different file in esmtpacceptmailfor.dir

Once you install the configuration via webadmin, all the config changes should take effect immediately, and you can reenable SMTP.

Courier must recognize this domain as a non-local domain, so its mail gets delivered remotely. Courier should see itself as a less-preferred MX for this domain, and attempt to deliver the mail only to the preferred MX.

In rare situation Courier cannot figure this out. Courier tries to match the hostnames in DNS MX records with its known list of local hostnames. Whatever your machine A's name is defined in DNS, it must be one of the local domain names. Note, that means that your MX record must use a different hostname. You cannot do something like:

example.com. MX 10 example.com.

example.com. IN A 192.168.0.2

If example.com is listed in locals, mail to that domain gets handled as local mail.

As long as your DNS config is sane, and matches Courier's config, forwarding should work automatically. In extreme cases you can always fallback on an explicit setting in esmtproutes.


Attachment: pgpuHRnqjhWjc.pgp
Description: PGP signature

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to