I have a couple of Raqs and want to configure one as a backup mail server for the other. Same machines also run DNS as NS1 and NS2. Let's say the site is domain.com. Standard mail is working fine.
This is what I have done via the GUI:
On server 1, the machine hosting the virtual site for domain.com:
Create secondary MX record:
Host name = (blank)
Domain name = domain.com
Mail Server name = mail2.domain.com
Delivery Precedence = Low
Create A record:
Host Name: mail2
Domain Name: domain.com
IP address: nnn.nnn.nnn.nnn
Where nnn.nnn.nnn.nnn is an IP address on the other machine.
On server 2, the other machine:
Under Control Panel, Mail, Relay for the following Hosts/Domains
When I shut down the mail on server 1 and send a mail to domain.com it bounces for server 1 (as I would expect) and it seems to go to mail2.domain.com, but it then bounces with erro rmessage "loops back to me".
Can somebody help please? I think it's pretty close to working, but I must have missed soemthing.
Maybe somebody else with the same problem monitoring this thread so I will list what I have figured-out so far in the hope it may help them.
1) When the primary server is down, the mail is properly being sent to the backup mail server.
2) The backup server then trys to deliver it to the primary mail server.
3) The primary mail server is off-line, so it looks up the low priority MX record to try to deliver there.
4) Guess what? The low priority MX points to itself, so it says "loops back to me" and gives up.
5) What I need to do is get the secondary mail server to ignore the low priority MX record.
6) I think I do that somewhere in the sendmail's mailertable.
7) Have not quite figured that bit out yet, but I think it's something like "domain.com esmtp:[mail2.domain.com]"
Experimenting with that now and will post results.
We save you time, money, and frustration by handling the server management tasks required to run an online business successfully.
No prodding required. We just do it right the first time. Red Hat, MySQL, Plesk, and cPanel certified staff.
Main prob seems to be that the Raq4 does not have mailertable enabled by default and the files to regenerate sendmail.cf (redhat.mc and m4) do not seem to be present (or are they kept somewhere strange?)
make sure to backup your current working sendmail.cf file
build the new sendmail.cf and diff the 2 to see what has been added.
then make sure that sendmail is not configured to accept mail from the domain you will be forwarding to a different server.
add the domain that will be forwarded to target server in the relay-domains.
add the domain in the mailertable file with the below settings:
once that is set, then you can configure DNS for this domain and add a secondary MX record with the IP of this newly configured backup mail queue.
by default it should queue for 5 days and forward mail to target server when target server is up. any DNSBL, spam, virus filtering and other configs added to this mail server will be performed before mail is forwarded. this server can also receive the mail first even though it is set to lower priority in the DNS.
i have done this on all my RaQs but all are RaQ550 OS. i would have just emailed you my whole sendmail.cf file if this was the case.
i had to find the instructions somewhere googling but it was bits and pieces from different places. it has been awhile since i set this up. since i have done it once, all i do is just copy the sendmail.cf to any additional servers.
hope the sendmail.cf on the RaQ4 is similar. the above are what i think the m4 changes are to the sendmail.cf and if you do find a copy of the redhat.mc, just have a quick lookover to other .mc files on your server to compare just in case. i can email you my sendmail.cf it the cut and paste does not work properly from the forum.
yes but 18.104.22.168 still needs to forward it to 22.214.171.124 when the server is back online. 126.96.36.199 still needs to be configured to queue it. that is what we are trying to help with mailertable. i think it could be remedied with custom virtusertable entries but that is more risky due to the GUI modifications to that file. mailertable has been the clean way to do it in my opinion.
i have had it setup for quite some time and have not have any issues with the setup. just never documented the procedure unfortunately.
Yes webmerch, your suggestion is certainly on the right track.
pcaidit, thanks for your effort, but what you are suggesting is not mail forwarding. It is simply having two separate and unconneced mail servers. It would stop lost mail if one was down, but the client would still need to download from two separate servers. Maybe okay for in-company use, but not something that looks good to sell to clients.
Last edited by BrianHawley; 09-22-2004 at 02:01 AM.