[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changing From: field
>
> Ok.. I've figured out how to change the "From " field and
> the Return-Path: field.. but how can I change the "From:" field??
>
> where is that in the .cf files? crossbar.cf?
Depending what you want.
This answer should come from www.funet.fi, but we
shall see..
I decided to want to be able to send email from any
of the addresses that are valid for my host, and thus
my current $MAILSHARE/db/localnames -file is a map:
funic nic.funet.fi
funic.funet.fi nic.funet.fi
nic nic.funet.fi
nic.funet.fi nic.funet.fi
www www.funet.fi
www.funet.fi www.funet.fi
(Well, it is longer than that, but you get the drift..)
Now the rules are simple:
- If there is no "From:" -header, create it
non-qualified
- Any non-qualified local-origin address is
written with $mydomain -value
- If there is an address referring to the local
host in in the submitted email, rewrite that
local hostname into "kosher" format via the
"thishost"-relation. (canonicalize is the actual
workhorse once you change the "thishost"-relation
to do the right thing..)
Earlier the rule was even simpler:
- rewrite the addresses referring to the local
host to use $mydomain -name
A cavet emptor:
The zmailer/proto/cf/*.cf -files appear to be somewhat
poor in performance, I had to patch them a bit more for
proper functionality here at nic.funet.fi
I will try to put a diff-set out tomorrow for fixes I made
since the dump of 2.98 .. -- minor things so far..
> Trev
/Matti Aarnio <mea@nic.funet.fi>