RE: [exim] data_acl and spool file

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: jori.hamalainen
Data:  
Para: exim-users
Assunto: RE: [exim] data_acl and spool file
> This is very easy to test for yourself:
>
> $ exim -be
> > ${extract{boundary}{Content-type: multipart/mixed;
> > boundary="frontier"}{$value}}
> frontier
> >
>
> It does work, but to some extent by chance (read the spec of "extract"
> to see why).


Well, example doesn't work. I'd use extract with keyword because I don't know which 'record' boundary is in Content-Type-header.

> ${extract{boundary}{Content-type: multipart/mixed; type="1"; boundary="frontier"}{$value}{null}}

null
> ${extract{boundary}{Content-type: multipart/mixed; boundary="frontier";}{$value}{null}}

frontier
> ${extract{boundary}{Content-type: multipart/mixed; boundary="frontier"; type="1";}{$value}{null}}

frontier

But if $header_Content-Type doesn't return header name:
> ${extract{boundary}{multipart/mixed; type="1"; boundary="frontier"}{$value}{null}}

frontier
> ${extract{type}{multipart/mixed; type="1"; boundary="frontier"}{$value}{null}}

null

So extract-function cannot be trusted. It's a shame, but regexp works well.