On Thu, Sep 30, 2004 at 03:11:24PM -0700, Brent Wiese wrote:
 
> Is there a way to make the backup MX server understand that some mail is
> ultimately destined for it and try to deliver it locally?
> 
> Here would be an example:
> 
> Mydomain.com is MX'd to mail.mydomin.com, which handles email for all my
> users. On that server, I've set up an alias for support@ that is actually a
> forward to my ticket system box (ie: [EMAIL PROTECTED]).

So people would usually send e-mail to '[EMAIL PROTECTED]' which
then gets automatically aliased to '[EMAIL PROTECTED]'?

And you want a system like aliases, but that can rewrite destinations
based on matching stuff after the '@' sign, rather than just before it?

Hmmm... virtusertable should do the trick.  Try adding:

    [EMAIL PROTECTED]   [EMAIL PROTECTED]

to /etc/mail/virtusertable , and then run 'make' to rebuild the .db
tables.  You'll need:

    FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')

in your `hostname`.mc file, but that should already be there, as it's
a standard in freebsd.mc

This is analogous to the situation where you run a company spread over
multiple sites each with their own local mail server, but all using
the same e-mail domain: you'ld use virtusertable to redirect the
incoming e-mail to the appropriate site server for each user.

> In the event my main mail server is down, I'd like to use the
> tickets.mydomain.com box as the backup MX. Its already running SMTP to
> handle the tickets, so seems a logical choice. 

Yes, you should be able to use the tickets machine as a backup MX for
your domain as well as using the virtusertable stuff as above.
Indeed, if incoming e-mail for [EMAIL PROTECTED] just happens to be
delivered to the tickets machine, you'll save a round trip to the main
server.
 
> What would be ideal is to have mail destined for support@ to be delivered
> locally. So, for example, a user can create a ticket saying the mail server
> is down (of course that is only useful if admins have off-site email
> addresses the ticket system notifies for redundancy, but that's easy
> enough).

That should work for your unix boxes where they use a local sendmail
instance for sending e-mail.  Windowzy stuff that speaks SMTP directly
to the server will need somehow to be told to connect to the backup MX
rather than the main server.  Hmmm... it may be possible to use VRRP
to do that automatically; you'ld have to experiment.

        Cheers,

        Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

Attachment: pgpWKTZvUesBJ.pgp
Description: PGP signature

Reply via email to