On Mon, Aug 26, 2002 at 01:23:02PM -0700, Paul Johnson wrote:
| I'm wondering what exactly it takes to get systems using exim as an
| internet site with smarthost with the hostname host1.ursine.dyndns.org
| to send email as ursine.dyndns.org and not send anything bound for
| local users, like root, to root@ursine.dyndns.org, but rather
| root@host1.ursine.dyndns.org...eximconfig doesn't make it obvious.
|
| If anybody knows what it takes in /etc/exim/exim.conf or by using
| eximconfig, lemme know.
Hmm. First of all, eximconfig isn't meant to be general-purpose, but
rather to provide 4 (common) categories of usage with a ready-made
config and provide a basic skeleton for others.
I think this rewrite rule will do it (I did test it a little) :
*@host1.ursine.dyndns.org \
"${if eq {${lookup{$1}lsearch{/etc/passwd}{1}{0}}} {1} \
{$0}{$1@ursine.dyndns.org}}" \
frFs
What it does is rewrite all addresses matching the pattern
"*@host1.ursine.dyndns.org". The interesting part is what it rewrites
it too. First it does a linear search through /etc/password to see if
the local part ($1) is a local user or not. If it is a local user, it
rewrites the address to the same thing it was in the first place ($0).
If it is not a local user, it rewrites the domain part.
-D
--
In the way of righteousness there is life;
along that path is immortality.
Proverbs 12:28
http://dman.ddts.net/~dman/
Attachment:
pgpurAFFoEjgR.pgp
Description: PGP signature