[ltp] Sending email from laptops?

Rob Browning linux-thinkpad@linux-thinkpad.org
Tue, 02 Nov 2004 13:55:04 -0600


bwpearre@alumni.princeton.edu (ben) writes:

> Any tips?

For what it's worth, I have postfix on my laptop set up to use a local
port for outgoing mail:

  relayhost = 127.0.0.1:PICK_YOUR_PORT_HERE

and that port is only connected to my server if I've run a suitable
tunnel command (from an .ssh/config entry):

  # smtp port for outgoing mail
  LocalForward PICK_YOUR_PORT_HERE 192.168.1.1:25

The remote postfix is configured to accept mail on the 192.168.1.1
interface.  If the tunnel's not up, then the mail just queues on the
laptop.  (You may want to check to make sure your postfix timeouts are
sufficiently large.)

This arrangement (the choice of an unprivileged port) relies on the
assumption that you're not going to have multiple untrusted users on
your laptop.

For incoming mail, I just have all my mail spam processed on the
remote host and dumped to a Maildir (saves CPU on the laptop).  Then I
use unison over ssh to sync the remote maildir with a local maildir,
and arrange for gnus to use that as a mail source.  This avoids any of
the silly problems with fetchmail or other tools mangling things in
transit.

I also run shorewall on the laptop at all times.  If you do the same,
make sure to refresh it whenever your network config changes.

-- 
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4