[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] [Raq4] how to configure secondary / backup MX / SMTP server relay



Thought I would share this experience with the archives, as the best advice
I was able to find in there was "RTFM", and the sendmail manual is no place
for newbies.

I'm running Raq4i for web hosting, with a fairly recent version of sendmail.
I host my email on a different server which is managed by someone else who
isn't very responsive.

Australia's largest ISP seems to have no route between their mail server and
mine. For the last week email sent by their dial-up users to my customers
has been simply vanishing. I have begged them to look at the problem but
they haven't been of any help. After five days the mail started bouncing
back saying there was a network problem and that their mail server couldn't
connect to mine. Like I told them.

I'm still working on them, but I decided I couldn't afford to wait for them
to fix it. My Raq web server had no problem emailing my mail server, so I
decided to try to set up a secodary MX server and relay the blocked mail via
my web server.

I found that I only had to do two things:

1. Configure a secondary MX record for each of my hosted domains:

customerdomain.com
    IN A my.webserver.ip.address
    IN MX preference=5 my.mailserver.com
    IN MX preference=10 my.webserver.com

Because I knew the rogue mail server couldn't speak to my.mailserver.com, I
was hoping it would just forward the mail to my.webserver.com (the lower
priority MX record). This proved to be the case.

2. Allow relaying for all the domains

I have no mail server aliases configured in the site settings on my Raq. If
you put anything in there the Raq will accept the email, but will also try
to deliver it locally (to accounts on itself). I wanted it to re-send the
mail in the direction of my mail server, so I left the mail server alias
settings empty.

What I found that you have to do is go through the Control Panel link in the
GUI, into the Email Server Parameters, and enter all the domain names into
the "Relay for the following hosts / domains" box. This adds a RELAY rule to
sendmail's access.db for each of these domains and restarts sendmail (which
is the program on the Raq that decides how and where to deliver email).

What the RELAY rule does is it says "allow people to connect to my SMTP
server if they are sending email to addresses at this domain or if their
machine has a hostname within this domain". This is probably not an ideal
solution, because now anyone can connect to my SMTP server as long as they
are sending mail to these addresses, or maybe they could even spoof a
hostname under one of these domains and send spam through me. However, I
woke up this morning and it was working.

With all the problems I've been having with other people's routing lately,
I'll be setting up all the secondary mail servers I can - even though this
doesn't actually fix the real problem, it solves some of my customers'
problems.

Regards

Chris Bell
BlueSkyHost.com
--