Results 1 to 21 of 21
  1. #1

    Configure Raqs as backup mail server.

    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 Standard mail is working fine.

    This is what I have done via the GUI:

    On server 1, the machine hosting the virtual site for

    Create secondary MX record:
    Host name = (blank)
    Domain name =
    Mail Server name =
    Delivery Precedence = Low

    Create A record:
    Host Name: mail2
    Domain Name:
    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 it bounces for server 1 (as I would expect) and it seems to go to, 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.


  2. #2
    No replys?

    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 " esmtp:[]"

    Experimenting with that now and will post results.

  3. #3
    Join Date
    Apr 2001
    FL, USA
    On the Raq, you may need to modify to get this to work. It has been awhile since I've set this up, so things are a little fuzzy.

    Make sure in your you have:
    # Hosts that will permit relaying ($=R)
    FR-o /etc/mail/relay-domains

    If this exists then create a file called relay-domains in /etc/mail.

    Add the domains one per line in this file and restart sendmail.

    The backup server should now accept email for the primary server and just queue it.

    Make sure your DNS is correct.

    You need two MX records with different priorities. MX records must point to A records, so you need two A records. One for the primary and one for the secondary mailservers.

    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.

  4. #4
    Time to bring this one back to life.

    Above suggestion did not work by the way.

    I can't believe nobody has done this on a Raq4!!

    Main prob seems to be that the Raq4 does not have mailertable enabled by default and the files to regenerate ( and m4) do not seem to be present (or are they kept somewhere strange?)

    Anybody actually DONE this please?

  5. #5

  6. #6

  7. #7
    Join Date
    Apr 2003
    Vancouver, Canada
    Please post the answer to the forum so others can make use of it.
    Paradox Web Hosting - [email protected]
    - Shared and Dedicated Hosting Solutions:
    - Auto Sales Manager 2004 now available!:

  8. #8
    And..... ????

  9. #9
    is there a "/usr/lib/sendmail-cf/cf/"

    the below needs to be added...

    FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl

    make sure to backup your current working file

    build the new 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: esmtp:[]

    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 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 to any additional servers.

  10. #10
    Thanks for the reply.

    It's fine up to rebuilding the config file - but I think I need and m4 to do that, and they do not seem to be installed on the Raq4.

    I guess I need to get them from somewhere (where? What versions?) and upload them first.

    Last edited by BrianHawley; 09-19-2004 at 03:25 AM.

  11. #11
    on my RaQ550 OS it specifically said in the comments the file called

    i would not be surprised if it is the same on the RaQ 4 OS. i will take a look maybe later if i have time and see what m4 generated in sendmail and post it here.

  12. #12
    try the below modifications to

    make sure to backup a good copy also.

    # Virtual user table (maps incoming users)
    Kvirtuser hash -o /etc/mail/virtusertable

    # Mailer table (overriding domains)
    Kmailertable hash -o /etc/mail/mailertable

    Below this section:
    # short circuit local delivery so forwarded email works

    # not local -- try mailer table lookup
    R$* <@ $+ > $* $: < $2 > $1 < @ $2 > $3 extract host name
    R< $+ . > $* $: < $1 > $2 strip trailing dot
    R< $+ > $* $: < $(mailertable $1 $) > $2 lookup
    R< $~[ : $* > $* $>MailerToTriple < $1 : $2 > $3 check -- resolved?
    R< $+ > $* $: $>Mailertable <$1> $2 try domain

    Below this section:
    # see if we have a relay or a hub

    ### Ruleset 90 -- try domain part of mailertable entry ###

    R$* <$- . $+ > $* $: $1$2 < $(mailertable .$3 $@ $1$2 $@ $2 $) > $4
    R$* <$~[ : $* > $* $>MailerToTriple < $2 : $3 > $4 check -- resolved?
    R$* < . $+ > $* $@ $>Mailertable $1 . <$2> $3 no -- strip & try again
    R$* < $* > $* $: < $(mailertable . $@ $1$2 $) > $3 try "."
    R< $~[ : $* > $* $>MailerToTriple < $1 : $2 > $3 "." found?
    R< $* > $* $@ $2 no mailertable match

    hope the on the RaQ4 is similar. the above are what i think the m4 changes are to the and if you do find a copy of the, just have a quick lookover to other .mc files on your server to compare just in case. i can email you my it the cut and paste does not work properly from the forum.
    Last edited by webmerch; 09-20-2004 at 01:51 PM.

  13. #13

    I'll give it a try on a spare Raq4 - just in case it falls over.

    It's surprising what works on a 550 but not a 4 (and vice-a-versa).

  14. #14



    Configure two cobalt RaQ 4 servers the same and setup the same domains on each server.

    Use both of them as the DNS servers

    and for the dns for the domain you would do as below. IN A IN A

    Domain IN MX

    the other way woud be to use two mx files

    This will now mean any mail servers will send mail to IP first and if it canít connect it will then goto

  15. #15
    yes but still needs to forward it to when the server is back online. 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.

  16. #16
    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.

  17. #17
    Hi webmerch.

    Tried it on a live server (which probably was not too smart) and immediately on reboot the mail did not work for anybody.

    Have reverted to the old and all fine again.

    Any chance you can send a copy of your so I can have a look?

    Any other ideas, anybody?

    I can't believe this is so hard!

  18. #18

  19. #19
    Originally posted by webmerch
    Many, many thanks!

  20. #20
    hope you downloaded already. i just deleted.

  21. #21
    Originally posted by webmerch
    hope you downloaded already. i just deleted.
    Yes, got it thanks - but have not had a chance to try it yet.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts