Re: [Exim] Rewriting addresses

Top Page
Delete this message
Reply to this message
Author: James P. Roberts
Date:  
To: exim-users
Subject: Re: [Exim] Rewriting addresses
I don't know if this is what you need, but I am doing something similar, I
think. I keep a file (/etc/exim-email-addresses) containing users' unix names
and fully qualified email addresses, one pair per line. For example (totally
made up):

user1    user1@???
nextguy    nextguy@???
user2    user2@???
george    george@???
...


I just append new customers to this file, as part of my new account creation
process. This file is writable only by me, and readable only by the "mail"
group (the group Exim runs under).

In my exim.conf I have:

# Replace sender information for customers whose domains we are hosting
begin rewrite
*@punsterproductions.com
${lookup{$1}lsearch{/etc/exim-email-addresses}{$value}fail} Eh

So, every time I am asked to deliver an email on behalf of one of my hosted
customers, Exim re-writes the Envelope and header addresses, replacing my domain
name with theirs. In this way, their email is properly indicated as coming from
their own domain, which I am hosting on my server.

I hope this helps.

If there is a better way to do the same thing, I am all ears.

Jim Roberts
Punster Productions, Inc.


----- Original Message -----
From: "Matthew Daubenspeck" <matt@???>
To: "Phil Pennock" <Phil.Pennock@???>
Sent: Tuesday, April 02, 2002 11:33 PM
Subject: Re: [Exim] Rewriting addresses



I see now thanks. I actually got part of it working, but still don't think
I can get it working exactly the way I need. I am trying to setup a virtual
domain situation where I have [for example] 10 users that belong to
domain1.com. I also have 10 users that belong to domain2.com. No matter
what MUA they use, and what settings they change [reply to, etc etc] I
would like the 10 users from domain1.com to have their outgoing addresses
written/changed to localpart@???. The same for the 10 users in
domain2.com [and so on if I add more domains].

Is this a possibility, or is there some other way I should be going about this?

Thanks for your help. Your explanation made it a bit easier to understand
vs. the exim book [which I still love and read daily :) ].