Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

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.

share|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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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