[exim] Regex Help?

Pàgina inicial
Delete this message
Reply to this message
Autor: Marc Perkel
Data:  
A: Exim users mailing list
Assumpte: [exim] Regex Help?
Need some regex help. What I want to do is grab the domain part of a
sender host name where it is a one level domain.

xxx.ftp.perkel.com -> perkel.com

And a separate one that works with two level domains:

xxx.ftp.perkel.co.uk -> perkel.co.uk

Here's a crude poice of code I've been using. Need something like this.

    set acl_c_sender_host_domain = 
${sg{$sender_host_name}{(\N^.*\.)(.*\.(com|net|org|edu|biz|name|mil|gov))$\N}{\$2}}


Thanks in advance.