Re: [Exim] Looking for a driver/router/transport that will d…

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Lorens Kockum
Fecha:  
A: exim-users
Cc: 
Asunto: Re: [Exim] Looking for a driver/router/transport that will do qmail-style aliases?
On exim-users pir@??? wrote:
>> On Wed, Oct 11, 2000 at 04:44:31PM -0000, Lorens Kockum wrote:
>> > I have a domain with a lot of qmail-style aliases that I am
>> > loath to lose, but I want to put it on an exim machine.
>> >
>> > Rewriting the .qmail files in, say, procmail format is not a
>> > problem.
>> >
>> > Neatest would be to have a router or a transport in exim that
>> > would simply choose the appropriate (procmail or qmail-native)
>> > delivery file. Does that exist already?
>> >
>> > If not, I'm off to put a qmail behind the exim, on the same
>> > machine; that should work, but the poor 486 32Mo in question
>> > doesn't need the load.


Or do a general forward to qmail-local, should work too.

>I think he means .qmail-foo files, containing a file/address to
>send username-foo to.


Exactly what I mean.

>userforward:
> driver = forwardfile
> file_transport = address_file
> pipe_transport = address_pipe
> reply_transport = address_reply
> no_verify
> no_expn
> check_ancestor
> file = .forward${local_part_suffix}
> filter
> suffix = DSUFFIX*
> suffix_optional
> condition = ${if exists{$home}{true}{} }


This looks useful (searching list archives on DSUFFIX
immediately yields more info than searching for ".qmail"), but
I'm not quite sure it'll go as far as I need.

To use -default files, I suppose it would work to add as a
condition that the .forward${local_part_suffix} exists, and
put a repeat driver without that condition, but with file =
.forward-default, if that exists, and if not just the .forward,
and if not, the user. Well, I don't need that much complexity.

What I do need is local-parts with several DSUFFIXes in. If I
have a DSUFFIX several times, won't it take only the last one?
Hmmm, maybe it should. Since suffix isn't a regexp, there's not
a great deal of control over that.

The qmail algorithm is (as far as I can see), that given

$user-$1-$2-$3@domain

try in this order, stopping when file is found:

.forward-$1-$2-$3
.forward-$1-$2-default
.forward-$1-$2
.forward-$1-default
.forward-$1
.forward-default
.forward
regular delivery to user

I don't have more than three dashes, but three dashes I do have,
and the $1 $2 $3 parameters are not usually known, they're
(mostly but not always) arbitrary numbers. For, say, 200 that
go into $1-$2-default, I might want special treatment for one or
two.

Easy way to do this? Otherwise I think I can hack together a
procmail file to do it, or some kind of script anyway.