advice needed, strange mail arrangement desired

Jeff Kinz jkinz at kinz.org
Tue Oct 24 17:56:16 UTC 2006


On Tue, Oct 24, 2006 at 10:32:24AM -0700, Rick Stevens wrote:

> 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

Hi Rick! :-)
Both machines are at the same public IP with the server/firewall getting
all the port 25 traffic.  The desktop machine is not visible from the
internet.  Are you saying I should forward all port 25 traffic to the
desktop during its working hours and then keep port 25 at the server
whenever the desktop is down? Then have the server sendmail just keep
retrying delivery until the desktop comes back up? That may actually be 
doable....   Needs a heartbeat and failover script.

The failover script would modify the port forwarding on iptables
script...... hmmm

Perversely - I don't want to loadkill the server while the desktop
isn't running and at the same time I want the server to be instantly
responsive when the desktop is up.  Due to the slow hard drive in the
server I want to move as much processing and small email files off the
server as possible. btw, the server is running Centos 4.4 (RHEL 4.0
clone)

> 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:
> 

Thanks , but I REALLY don't want fetchmail in the loop,
especially when the desktop is up and running.  And especially be cause it
modifies the mail headers that I want to use procmail on.
Also - when working with a customer having to wait 5 extra
minutes to get an email would be disruptive during teleconferencing.
(I much prefer select to poll.. :-) )

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

Indeed i do : 
poll mail.comcast.net protocol POP3: user foob, with password norkadl7, is jkinz here; options antispam 501 451
is how I get the email that goes to my isp, but 99.999 % comes 
directly to kinz.org which is highly preferred.




More information about the Redhat-install-list mailing list