currently my acl check_mail part looks like this:

deny  
    message = The sender name must be the same as the login id  
    condition = ${if eq{$sender_address}{$authenticated_id}{no}{yes}}

However I would like to verify the domain only.
How do I strip that part out of the variables?

link|improve this question
feedback

1 Answer

up vote 1 down vote accepted

use the domain: operator:

deny
    message = The sender name must be the same as the login id
    condition = ${if eq{${domain:$sender_address}}{${domain:$authenticated_id}}{no}{yes}}

In case it's not clear, after adding domain: the variable $sender_address becomes ${domain:$sender_address}. The only real problem is that if the variable wasn't in the form of an email to begin with, it will expand to an empty string.

link|improve this answer
Works like a charm, thank you! It's also described on exim.org/exim-html-current/doc/html/spec_html/ch11.html. But the docs can be quite challenging to work through. (Don't have enough rep to upvote you, sry) – andsens Jul 14 '11 at 21:40
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.