Hello,

Using Exim 4.75, I am looking for the best method to extract the 
emailAddress field from tls_peerdn variable.

For example, with my certificate, the SSL peer debug shows:
/C=FR/ST=Ille-et-Vilaine/O=Home/OU=Computing/CN=Nicolas 
KOWALSKI/[email protected]

I currently extract the emailAddress using a double extract, first by 
choosing the last field (separated by /), then a simple extract using 
emailAddress as key. 

${extract{emailAddress}{${extract{-1}{/}{${tls_peerdn}}}}}

Obviously, this will fail if the /-separated last field is not the 
emailAddress.

Thanks,
-- 
Nicolas

-- 
## List details at https://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/

Reply via email to