[exim] Regex or sg how

Top Page
Delete this message
Reply to this message
Author: Craig Jackson
Date:  
To: exim-users
Subject: [exim] Regex or sg how
Hi,

Often a ehlo is of the the form server23.mx23.domain.com. I would like
to record only domain.com from the ehlo into a database. This is what I
have,

warn condition = ${lookup mysql{CAPTURE_EHLO}{yes}{no}}

where CAPTURE_EHLO is
CAPTURE_EHLO = UPDATE whitelist SET \
ehlo='${quote_mysql:${sg {$sender_helo_name} \
{\N(?<![^.]*\.(com|net|edu|gov|org))\N}{}}}' \
WHERE domain='${quote_mysql:$sender_address_domain}'

But I get error " lookbehind assertion is not fixed length at offset 32"
Not only that, my expression limits me to only a few TLDs.

This appears to me to require some kind regex to strip the
server123.mx23. away. Can someone take this a bit farther?

Thanks.
Craig