Re: [Exim] problem with pipe transport and apostrophes in lo…

Top Page
Delete this message
Reply to this message
Author: Nico Erfurth
Date:  
To: Ray Gardener, exim-users
Subject: Re: [Exim] problem with pipe transport and apostrophes in localparts
Ray Gardener wrote:
> This is a multi-part message in MIME format.
> --
> [ Picked text/plain from multipart/alternative ]
> Hello all,
>
> I have been using a pipe transport to send messages through to spamassassin:
>
> #passes mail to spamassassin daemon via spamc
> check_spam:
> driver = pipe
> user = exim
> group = exim
> prefix =
> suffix =
> log_output = true
> command = /usr/local/bin/spamc | /usr/local/exim/bin/exim -C /usr/local/exim/e
> xim_outgoing.conf -oMr spam_checked -f $sender_address \$LOCAL_PART\@$domain
> ignore_status = true
> use_shell = true
> path = /usr/bin:/usr/local/bin
>
>
> For most mail this works ok - but there is a problem with names that include apostrophes
> which affect the names of some people of Irish descent. The following is the type of error
> I am getting logged in the main exim log file.
>
> 2002-09-09 08:37:35 17oJ6Z-0001n9-00 <fdrec@???>: check_spam
> transport output: exim: John.O'Connell@???

$LOCAL_PART@???
> - bad address: malformed address:

$LOCAL_PART@??? may not follow
> John.OConnell@???
>
>
> The sending address would be in the format John.O'Connell@??? but the pipe seems
> to be stripping out the apostrophe and somehow the following

components of the pipe command
> aren't fully expanded.
>
> Can anyone advise how I rectify this?


1.) why do you use $LOCAL_PART? use $local_part instead
2.) use the ${quote:} operator to quote every variable

    command = /usr/local/bin/spamc | /usr/local/exim/bin/exim -C \
/usr/local/exim/exim_outgoing.conf -oMr spam_checked -f \
${quote:$sender_address} ${quote:$local_part@$domain}