
mangoo at wpkg
Nov 18, 2009, 4:21 AM
Post #3 of 5
(934 views)
Permalink
|
|
Re: match the "From: " domain, not "Return-Path: " (lookup{$sender_address_domain})
[In reply to]
|
|
Mike Cardwell wrote: > Tomasz Chmielewski wrote: > >> Right now, I can look up the sender's domain in "Return-Path: " with >> lookup{$sender_address_domain}. >> >> I would like to decide about what happens with a mail based on its >> "From: " address, rather than "Return-Path: ". >> >> Can I do a similar check for a domain name used in the "From: " field? > > Instead of $sender_address_domain, use ${domain:$h_From:} Hmm, doesn't seem to work properly. It didn't work for me, so I added these to see what gets matched: headers_add = Test: $domain:$h_From: With these values in message headers: From: bob [at] domain To: admin <tch [at] example> This got appended as a header: Test: example.com:bob [at] domain So I think I wasn't exactly clear with my question. If I use ${$h_From:}, for this From: header: From: Some User <bob [at] domain> I will have this match: Some User <bob [at] domain> I'd rather have only: domain.tld or: bob [at] domain I guess I need to construct some regexp, but I'm not sure how. > Please remember, there are cases where both of those variables can be blank. Yes, I'm aware. It's just a workaround for deficiencies in local webmail, so it won't be a problem. -- Tomasz Chmielewski http://wpkg.org -- ## List details at http://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/
|