Re: [exim] SMTP response on restricted alias

Pàgina inicial
Delete this message
Reply to this message
Autor: listrcv
Data:  
A: Illtud Daniel
CC: exim-users
Assumpte: Re: [exim] SMTP response on restricted alias
Illtud Daniel wrote:

> system_aliases:
>     driver = redirect
>     allow_fail
>     allow_defer
>     senders = ${if exists {/etc/alias-restrictions/$local_part}\
>                {lsearch;/etc/alias-restrictions/$local_part}{*}}
>     file_transport = address_file
>     pipe_transport = address_pipe

>
> My only problem is that if an alias is restricted, and you're
> not on the allow list, you get an 'unknown user' SMTP response.


The router will be skipped for all addresses that are not listed in the
list given to the senders precondition. Consequently, you can
_exclusively_ write to aliases that are restricted _and_ do so only if
you are listed as a sender. You cannot write to unrestricted aliases at all.

> How can I add a 'not authorized to send to $local_part' SMTP
> response? I suspect I'll have to split it into another router.


You would put the check into an ACL, like acl_check_rcpt.


   deny    message       = not authorized to send to $local_part
           senders       = +alias_restricted



Before that, you would specify an appropriate expansion for
alias_restricted. Sorry, I'm not good at crafting lookups, but I think
you get the idea.

> Another problem that has arisen (discovered when I couldn't
> post to this list!) is that somehow this senders precondition
> is causing exim to answer with a 550 to a null MAIL FROM:
> address. Why would that be?


Was the recipient an alias?


GH