Configuring Your VPS Server for Exchange Mail Dequeuing
If you wish to configure your Virtual Private Server for Exchange mail dequeueing, follow the steps below.
NOTE: You should carefully consider the following.
- ALL e-mail (incoming and outgoing) will be held in the queue until it is flushed out, either by
an ETRN command or the flush command in your crontab. This means that if your crontab is set to
flush every 4 hours, an outgoing e-mail could wait 4 hours before it is sent from your Virtual Server.
- Mail dequeuing will affect ALL domains hosted on your Virtual Private Server. So, only one domain
should be hosted on your Virtual Server unless ALL domains on the server are using the mail dequeuing
feature.
- Get a dedicated IP address for your Exchange Server.
- Setup the MX records for the domain name with the 10 level pointing
to your Exchange Server and the 20 level pointing back to your Virtual
Server.
- Setup your Virtual Server to queue up e-mail until the ETRN command
is received by your Exchange Server.
- Add the following line to the Options section of the ~/etc/sendmail.cf
file on your Virtual Server:
Odqueueonly # defer mail on the server
- Comment out the following two lines in Ruleset 0:
| R$+<@$=w> |
$@$>90$1 |
Remove local addresses |
| R<@$=w>$-$+ |
$@$>90$3 |
Remove local routes/UUCP |
These two lines let the server know what domains are local to your Virtual Server. For mail dequeuing,
no domain should resolve locally.
- Add the following line to your Virtual Server Crontab:
00 0-23/4 * * * /usr/local/bin/virtual sendmail -q
This will flush out your Virtual Server mail queue every four
hours. You may need to modify this according to how long your
Exchange Server may be off line. Every time an attempt is made
to flush the queue, a hop is added to the headers for each message
queued up. This means that if you set your crontab to flush the
queue every 15 minutes then an additional hop would be added every
15 minutes. This would mean that after 6 hours in the mail queue,
a message would have 24 hops (where the maximum is 26). Therefore,
any e-mail older than 6 1/2 hours would be bounced with "too many hops".
|
|