Re: [Exim] unable to set gid/uid in redirect router

Etusivu
Poista viesti
Vastaa
Lähettäjä: Jay Sekora
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [Exim] unable to set gid/uid in redirect router
> You are
>   (a) doing recipient verification at incoming SMTP time,
>   (b) your file_aliases router has a user= setting or check_local_user
>       is set
>   (c) your file_aliases router does not have no_verify set


Yup!

> You cannot use such a router for SMTP verification, because Exim is
> running as "exim" at SMTP time and is therefore unable to change uid.
>
> For most cases, such routers are not necessary for verification, and
> just adding no_verify solves the problem.


In this case, that caused the recipients defined by those files to be
rejected. (The alias files are for distribution lists, which do not
correspond to local users.) I got around this by adding a separate
verify-only router, so the two routers now look like this:

# This first version is for actual delivery:

file_aliases:
driver = redirect
allow_fail
allow_defer
no_verify
require_files = /net/aliases/$local_part
file = /net/aliases/$local_part
condition = ${if match{$local_part}{^[a-z0-9-]*\$}{yes}{no}}
user = ${extract{uid}{${stat:/net/aliases/$local_part}}{$value}{822}}
group = ${extract{gid}{${stat:/net/aliases/$local_part}}{$value}{822}}
modemask = 002
file_transport = address_file
pipe_transport = address_pipe

# This second version is for SMTP-time verification:

file_aliases_verify:
driver = accept
verify_only
require_files = /net/aliases/$local_part

Philip, thanks for your help!

Jay