Re: [EXIM] rewriting user addresses

Pàgina inicial
Delete this message
Reply to this message
Autor: Sherwood Botsford
Data:  
A: Exim List
Assumpte: Re: [EXIM] rewriting user addresses
On Tue, 27 Jan 1998, Christopher Petro wrote:

= > Chapter 33 covers this. The form you have used (lookup for the local
= > part, non-lookup for the domain) is not supported. Indeed what you have
= > written doesn't seem sensible, as you are going to rewrite a local part
= > *whatever* the domain - surely you don't want to mess with local parts
= > in foreign domains that just happen to be the same as yours?
=
= I think I miscommunicated my goal. This machine has a hundred or so
= accounts (will be 10000 or so soon), and all of the users use a
= proprietary MUA. This MUA is so incredibly broken that it doesn't allow
= you to put a From: header in your messages. Thus, all of the messages
= leaving this machine show up as user@??? (our domain). However,
= they actually work for other comapanies, whose email we host. So I need
= exim, when it receives their messages, to append a specific domain,
= depending on their user id. I know this is a wierd situation, considering
= that normally the MUA is supposed to provide this functionality by
= allowing the user to specify a From: address. <sigh>

This is a truly odd situation. My guess off the top of my head is to
run two copies of exim. One is a listener, that listens on a port,
and queues anything that comes in. The other is a sender that only
runs the queue. BUT they have different spool queues. In between
you have a script that calls formail (part of the procmail dist.)
to examine each message, rewrite the the header appropriately, and
then move the files from the smpt spool to the transport spool.
(Whew!)

On second thought, this is sufficiently special purpose that doing it
with perl would make more sense. I don't think formail has a dbm lookup
facility. With perl you could load a hash table from a file and do that only
once per run, instead of once per message. I think you could write the
perl script so that you started it once, then it would read the directroy
of the smtp spool area, check for locks, process the unlocked ones,
remove, check the time stamp of the database file, reload if necessary,
and start the cycle again.


Sherwood Botsford     | email avatar@???
Sorcerers Apprentice    | Office CAB 642B
System Administrator    | Tel: 403 492 5728 
Trouble shooter            | Fax: 403 492 6826




--
*** Exim information can be found at http://www.exim.org/ ***