Szerző: Phil Pennock Dátum: Címzett: andreas graeper CC: exim-users Tárgy: Re: [exim] locally-originated message
On 2013-01-22 at 16:05 +0100, andreas graeper wrote: > When mua is sending message to exim .. to smarthost, i use
> $authenticated_id (a systemuser) to lookup for smarthost-user and
> -passwd. but when from commandline no authentication (to exim as
> server) takes place, i wanted to hardcode (as first solution) a user
> in an acl_m-variable. (i wanted to use that var in both cases:
> when authenticated $acl_m_user = $authenticated_id (works !)
> otherwise $acl_m_user = 'ag'
> )
You probably want to reference $originator_uid ... normally with LDAP or
the like; we don't appear to support passwd lookup by uid, and the
internal variable originator_login does not appear to be exposed as an
expansion variable. I don't know why not ...
> i tried to distinct request from mua ( hosts=172.27.0.0/16,
> authenticated ) and from comandline (hosts='' ???, not authenticated )
> but could not succeed.
The "hosts empty" logic you're using applies for command-line
submission, so you're correct in _how_ you're matching, but the place
_evaluating_ it needs to be called; the SMTP ACLs are *not* called for
non-SMTP submission.
You want to set the non-SMTP case in an ACL plumbed into
"acl_not_smtp_start". And just ignore the hosts check.
acl_not_smtp_connect = acl_localstart
begin acl
acl_localstart:
warn set acl_m_user = ${lookup somemech{$originator_uid}....}