Re: [Exim] Remove sender from group expansion alias

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: David S. Madole
Data:  
Para: Nigel Wade, Exim users list
Assunto: Re: [Exim] Remove sender from group expansion alias
> From: "Nigel Wade" <nmw@???>
>
> I am trying to tidy up a minor annoyance I have in my Exim setup. But so

far
> I've not been able to find any solution to the problem. I currently do

group
> expansion in aliases using an LDAP lookup in a redirect router. The lookup
> is done using the data option, and returns a list of mail address which

are
> then redirected.
>
> Currently, if the sender is a member of the group, they receive a copy of
> the message they sent. I'd like to be able to change this, and remove the
> sender from the expanded list. Is there any way to do this within the
> redirect router?


I don't think there's an easy way to remove the sender from the list, but
you could suppress the delivery.

See the message below I sent a few days ago on the list on the same topic.

Simon did send me a reply that this approach worked for him.

David


-----

> From: "David S. Madole" <david@???>
>
> > From: "Simon Fraser" <simonfr@???>
> >
> > As far as the documentation and posts here indicate, there's no
> > configuration option for turning off 'me too' posts resulting from
> > alias expansions.
> >
> > I've attempted to fake this ability using the data line I've included
> > below, but it seems a nasty way of doing it. It would be a lot
> > simpler if I could guarantee that the expanded addresses were all
> > qualified. As it is, it removes the entire sender_address if the
> > sender's domain is not the one that unqualified usernames get given,
> > and removes the local_part with an optional domain if it is.
>
> What if you put something like this before your other routers:
>
> absorb_me_too:
> condition = ${if eq{$sender_address}{$local_part@$domain}{if
>

eq{$original_local_part@$original_domain}{$local_part@$domain}{false}{true}}
> }{false}}
> data = :blackhole:
>
> This is totally untested, you might need to tweak the brackets, and it

might
> not do what you want at all. Just an idea.
>
> Basically, if the sender and recipient are the same address and the

address
> is not the result of an expansion, discard the message.
>
> Also, have you looked at qualify_preserve_domain?
>
> Dave
>