On Thu, Oct 16, 2008 at 05:11:00PM +0300, [EMAIL PROTECTED] wrote:
> Is it possible to strip tab character from email message subject
> header using postfix? how?
>
> This problem is caused by groupwise and thunderbird combination, so
> groupwise adds tabulator characters in long subject lines and
> thunderbird shows it weird..
If you have "pcre" table support. You can replace up to 9 tabs with
spaces using:
main.cf:
header_checks = pcre:/etc/postfix/header_checks.pcre
header_checks.pcre:
if /^Subject:/
/^(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*)$/
REPLACE ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10}
/^(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*)$/
REPLACE ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9}
/^(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*)$/
REPLACE ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8}
/^(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*)$/
REPLACE ${1} ${2} ${3} ${4} ${5} ${6} ${7}
/^(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*)$/
REPLACE ${1} ${2} ${3} ${4} ${5} ${6}
/^(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*)$/
REPLACE ${1} ${2} ${3} ${4} ${5}
/^(.*?)\t(.*?)\t(.*?)\t(.*)$/
REPLACE ${1} ${2} ${3} ${4}
/^(.*?)\t(.*?)\t(.*)$/
REPLACE ${1} ${2} ${3}
/^(.*?)\t(.*)$/
REPLACE ${1} ${2}
endif
--
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:[EMAIL PROTECTED]>
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.