Re: [exim] - local delivery problem

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Paul
CC: exim-users
Sujet: Re: [exim] - local delivery problem
On Tue, 3 Jul 2001, Paul wrote:

> >Why do you want duplicates? How does having three copies of the same
> >thing, end-to-end in the same file, help?
>
> each spool file contains mail for customer domains. They need to be able
> to CC/TO their own domain in on emails (incoming and outgoing)


Still don't understand how multiple copies helps, but no matter.

> >Did you put that director *before* the aliasing director? And I'm not
> >sure why I put in that new_address setting. What you seem to want is
> >something like
> >
> >xxxx:
> > driver = smartuser
> > domains = foo
> > transport = foo_transport
> >
> >with the transport being an appendfile that names the file.
> >
> >
>
> I put it last in the list, as it is referenced from another director


That's probably what's wrong. Directors are obeyed in order.

> Its setup like this:
>
> incoming email -> xalias/forwards (in dbm file) -> rewrite *@*.domain to
> *@domain -> rewrite *.domain to *.loginid.localdomain -> deliver to
> loginid@localdomain
>
> This setup works well, except for the removal of the duplicates.


Duplicates at removed at the aliasing stage. There is no way round this.

The only way not to have duplication is not to have aliasing. For any
specific address, that is. If you have

A is aliased to B
X is aliased to Y

and you then have both B and Y aliased to Z, the de-duplication will
happen at the second aliasing. So if you don't want it, you have to
arrange that both B and Y are delivered to wherever you want, without
making use of an aliasing operation. You could do this by putting this
director FIRST:

xxxx:
driver = smartuser
domains = whatever
local_parts = B : Y
transport = xxxx_transport

That will sort out the delivery of B and Y without any aliasing taking
place, so there won't be any de-duplication.


But let me see. Is it that case that what you are trying to achieve is
to deliver all addresses of the form *@*.some.domain to some particular
file, with a separate copy for each address? (Where the file depends on
the domain?) Then you don't need any aliasing at all.

xxxx:
driver = smartuser
domains = *.some.domain
transport = xxx_transport

and in the transport you can do

xxx_transport:
driver = appendfile
file = /something/${...a string expansion that computes the name...}
user = exim

The tricky bit is the expansion to find the name. You can use a regular
expression to pick off the first component of $domain, and you can use
that in a lookup, etc. Or you could just look the whole domain up.






-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.