Re: problem in smail config
Lindsay Allen graciously sent me the following message, which *almost*
solves the problem mentioned:
> From email@example.com Thu Oct 9 10:27:26 1997
> Date: Sat, 9 Nov 96 12:36 MET
> From: Christian Lynbech on satellite <firstname.lastname@example.org>
> To: email@example.com
> Subject: E-Mail address
> Resent-Date: Sat, 9 Nov 1996 20:42:33 +0800
> Resent-From: firstname.lastname@example.org
> >> I have a university account (email@example.com) and a linux box at
> >> home. My account name is "joe" on the linux box, and I want all
> >> outgoing mail to say it is from firstname.lastname@example.org. How would I do
> >> this?
> I use smail, configured as the `satellite' option. I did the following
> in the `transports' file to resolve the name problem:
> smtp: driver=tcpsmtp, max_addrs=100, -max_chars, inet,
> insert_header="From: email@example.com ($sender_name on satellite)";
> use_bind, defer_no_connect, -local_mx_okay, defnames
> which means that on outgoing posts (delievered via SMTP which is not
> the default I believe), the from header is first removed and a new is
> inserted. This gives me ordinary handling on local mail (internal on
> the linux box) and my account name on everything that goes outside.
However, when you're running on a local subnet that shares the dialup, and
thus isn't "really" on the net, your box has no way of knowing whether the
outgoing mail is staying on your subnet (and thus should not have its
header rewritten), or if it's going to the Internet proper, and should have
its From: header rewritten.
HOWEVER, presumably local subnets are so small that you don't need to have
DNS service to get their hostnames, and you instead store the names of the
local boxes in /etc/hosts (which is what I do). Failing that, you should
be able to match against local hosts using their IP number. (Local subnets
not actually on the Internet shouldn't be using real IP numbers anyway,
they should be using the "reserved" ones, like 10.0.0.0 or 192.168.0.0.)
Is there a way to get smail to check for this, conditionally rewriting the
From: header based on the result? This would give the flexibility demanded
by dialup users and also permit RFC 822 compliance.
I suspect someone would have to write their own "driver" for smail to do
this. Is anyone up to this?
G. Branden Robinson | Murphy's Guide to Science:
Purdue University | If it's green or squirms, it's biology.
firstname.lastname@example.org | If it stinks, it's chemistry.
http://www.ecn.purdue.edu/~branden/ | If it doesn't work, it's physics.
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to email@example.com .