‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, January 2, 2019 5:03 PM, Edgar Pettijohn <edgar@pettijohn-webcom> 
wrote:

> https://www.postgresql.org/docs/9.3/functions-matching.html
>
> You will likely need to use some of the regex functions to pull out the user 
> and domain from $1.

How did I not think about this workaround ;-) Thanks Edgard that works like a 
charm!

For others who might be trying to achieve the same here is the PgSQL query:

SELECT destination FROM vuser WHERE email = 
REGEXP_REPLACE($1,'(.*)\+[\w-]+@(.*)','\1@\2');

--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org

Reply via email to