On Thu, 9 Jun 2016 19:45:46 -0500 Matt wrote:
> I want to block certain authenticated senders. Not the from address
> but the username they do smtp authentication with.
>
> I tried this:
>
> deny authenticated = *
> message = $authenticated_id suspended due to abuse
> #condition = ${if eq{$authenticated_id}{ttest@???} }
> condition = ${if eq{$authenticated_id}{lsearch;/var/bad_senders}
>
> It seems to work when I input a single email address but I want to
> block all the email addresses listed in the file bad_senders. What am
> I doing wrong?
You must lookup the account in the file, like in
deny condition = ${if exists {/etc/exim/blocked_accounts}}
authenticated = *
condition = ${lookup{$authenticated_id}lsearch{/etc/exim/blocked_accounts}{yes}{no}}
message = Account $authenticated_id blocked
--Frank Elsner