1

I am using exim for outgoing mails. For SMTP authenticated users, I have already added several ACLs and want to add another one allowing suffix aliases. Suffix aliases are email addresses such as "[email protected]".

The environment looks as follows:

  • The username (full email address) is stored in $authenticated_id
  • The set FROM address is stored in $sender_address
  • The "user" in "[email protected]" can be found in ${local_part:$authenticated_id}
  • The domain name of the authenticated user is in ${domain:$authenticated_id}

Now I want to achieve an ACL rule that looks as follows:

# accept if FROM address is a suffix alias of authenticated address
accept
  condition = ${if match {$sender_address} {${local_part:$authenticated_id}+{*}@${domain:$authenticated_id}} }
  logwrite = AUTH OK - FROM address $sender_address is a suffix alias of authenticated user

Unfortunately, the ACL rule seems to not be correct. I am receiving the following error message:

failed to expand ACL string "${if match {$sender_address} {${local_part:$authenticated_id}+{*}@${domain:$authenticated_id}} }": curly-bracket problem in conditional yes/no parsing: 'yes' part did not start with '{'

Q: What's the problem with the above condition, and what would a correct condition to achieve this look like?

1 Answer 1

0

After trying several times, I just got it working. This is how the rule is supposed to look like:

# accept if FROM address is a suffix alias of authenticated address
accept
  condition = ${if match {$sender_address} {(${local_part:$authenticated_id}\+.*@${domain:$authenticated_id})}}
  logwrite = AUTH OK - FROM address $sender_address is a suffix alias of authenticated user

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .