advice needed, strange mail arrangement desired

Rick Stevens rstevens at vitalstream.com
Tue Oct 24 17:32:24 UTC 2006


On Tue, 2006-10-24 at 12:37 -0400, Jeff Kinz wrote:
> hi all, I need some advice
> 
> I am re-architecting my home network to use a more environmental server.
> The new server uses a lot less power, has a built-in battery power
> supply, and a much slower hard drive.  That's right, it's an old laptop!
> 
> this "server" will be acting as an IP tables based firewall
> and an SMTP server.  I will be using a much more powerful desktop
> machine as my personal workstation.
> 
> I'm trying to arrange my mail delivery system so that the server can
> receive all the incoming mail but eventually deliberate to my desktop
> machine, where I will be running procmail and mutt.  My MTA is sendmail
> on the server, and on the desktop machine as well, since I know how to
> integrate procmail and mutt with it.
> 
> Here's a simplified schematic: (needs a fixed font for proper display)
> 
> 
> Cable Modem-->Server(laptop)-->hub-----|--->desktop
>                                        |--->N other machines
> 
> 
> so here is my question:
> 
> The desktop machine will only be running about eight hours a day, maybe
> 14.  So there will be periods of time when mail will becoming into the
> server and its final destination, the desktop will not be available.
> 
> Can anyone give me a recommendation about how to configure sendmail on
> the server so that it won't throw any of the mail that needs to get to
> the desktop away, and so that as soon as the desktop comes up each
> morning, or maybe after a three-day weekend, it will instantly, or
> nearly instantly, or at least very soon thereafter deliver that mail to
> the desktop?

In this instance the laptop is called a "spooling" mail server and
it's not uncommon.  However, it's usually used as the secondary MX
entry for a domain.  If the primary MX machine goes down, mail goes to
the secondary machine.  As soon as the primary comes back up, the
secondary shoots all the mail it queued for the domain to it.  This
requires two MX entries in DNS for the domain, with the primary set to
a low metric value and the secondary to a high metric, e.g.

	IN   MX   10   primary.fred.com
	IN   MX  100   secondary.service.com

secondary.service.com must be configured to relay fred.com mail.  Well
designed spool machines will also set up a separate queue for relay
mail, perhaps with different expiration times.

Now, if primary.fred.com goes down, the MX records will cause the mail
to go to secondary.service.com.  secondary will try to relay to
primary.fred.com, which will fail.  It will continue to try to relay
until it succeeds or the bounce time for the messages expires.
  
This probably won't work for you, and it's probably overkill.  If you
intend to have your desktop pick up the mail from the laptop via
fetchmail, there's no big deal.  Here's what I'd do:

1. Put an entry in /etc/anacrontab to run fetchmail as the user you
want:

	1  5  grabmail    su username fetchmail

This ensures that fetchmail runs at least once a day, and if the machine
happened to be off, it'll run 5 minutes after it's rebooted.

2. Add a standard fetchmail to the user's standard crontab:

	crontab -e username
	5 * * * * fetchmail >/dev/null 2>&1

to run fetchmail every 5 minutes.

Anyway, you get the idea.

----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-                    Do you know where _your_ towel is?              -
----------------------------------------------------------------------




More information about the Redhat-install-list mailing list