|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: regular expression with postfix
From: Victor Duchovni (Victor.Duchovni
MorganStanley.com)
Date: Mon Oct 02 2006 - 14:45:26 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Oct 02, 2006 at 07:37:04PM +0000, Tom Lee wrote:
> >Yes, the [^."]* won't match the "." in "foo.jpg". Also approach is
> >terrible, update your mail client software to something written this
> >century.
>
> how about using this solution?
>
> /^(content-(type|disposition):.*;[[:space:]]*(file)?name[[:space:]]*=[[:space:]]*")([=\?]*([^\.|"]*)\?=)(".*)/
> REPLACE ${1}changed_filename${3}
It still won't match the "." in "foo.jpg". You need a decent regular
expression book/tutorial. Also test with:
postmap -fq "$(cat headerline.txt)" pcre:/path/to/map.pcre
not a live Postfix installation.
> I am using microsoft outlook 2003.
If using Exchange, ... make sure the server's MIME parsing is also not
pre-historic. If all software is current, file a bug report. Do not
introduce ugly hacks into your production system. Replacing headers may
break digital signatures, make it harder for users to collaborate on
a document (keeping the name as they pass it back and forth), ...
--
Viktor.
Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.
To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majordomo
postfix.org?body=unsubscribe%20postfix-users>
If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]