[exim] add/remove header error after 4.84 update

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Steve Wilson
Date:  
À: exim-users@exim.org >> Exim Mailing List
Sujet: [exim] add/remove header error after 4.84 update
Hi,

I'm trying to upgrade exim from 4.80 to 4.84 but when running 4.84 I get
the below error in the logs, an empty message ends up in the mailbox and
the real message is deferred. I've rolled back as I need this to be
working but obviously want to get it resolved promptly.

2014-10-02 07:58:04 1XZaKw-0002K1-GW == user@??? R=mysql_user
T=local_dovecot_lda defer (-25): Failed to expand headers_add or
headers_remove: missing } at end of string

Here's the relevant options from the local_dovecot_lda transport.

  headers_remove = Subject
  headers_add   = "X-SWS-Spam-Threshold: ${lookup mysql{ \
    SELECT spam_threshold \
    FROM user \
    WHERE username='${quote_mysql:$local_part}' \
    AND domain='${quote_mysql:$domain}' \
    AND SMTP_allowed='YES' \
    }{$value}{ERROR}}\n\
   X-SWS-Spam-Flag: ${if def:header_X-SWS-Spam-Score-Int:{\
    ${if >={${eval:${sg{$header_X-SWS-Spam-Score-Int:}{^.*\n}{}}}}\
    {${lookup mysql{ \
    SELECT spam_threshold*10 \
    FROM user \
    WHERE username='${quote_mysql:$local_part}' \
    AND domain='${quote_mysql:$domain}' \
    AND SMTP_allowed='YES' \
    }{$value}{ERROR}}}{YES}{NO}}\
    }{\
    UNKNOWN\
    }}\n\
   Subject: ${if def:header_X-SWS-Spam-Score-Int:{\
    ${if >={${eval:${sg{$header_X-SWS-Spam-Score-Int:}{^.*\n}{}}}}\
    {${lookup mysql{ \
    SELECT spam_threshold*10 \
    FROM user \
    WHERE username='${quote_mysql:$local_part}' \
    AND domain='${quote_mysql:$domain}' \
    AND SMTP_allowed='YES' \
    }{$value}{ERROR}}}{${lookup mysql{ \
    SELECT spam_tag \
    FROM user \
    WHERE username='${quote_mysql:$local_part}' \
    AND domain='${quote_mysql:$domain}' \
    AND SMTP_allowed='YES' \
    }{$value}{ERROR}}$h_subject:}{$h_subject:}}\
    }{$h_subject:}}\n\
   X-Delivered-To: $original_local_part@$original_domain
($local_part@$domain)\n\
   X-Message-Age: $message_age\n\
   X-SWS-Spam-Transport: local_dovecot_lda"


There's a lot more spaces in the actual config to make it a bit more
readable but an exact copy/paste wraps badly in email.

Here's the output of exim -bV for both versions

Exim version 4.84 #2 built 02-Oct-2014 07:54:32
Copyright (c) University of Cambridge, 1995 - 2014
(c) The Exim Maintainers and contributors in ACKNOWLEDGMENTS file, 2007
- 2014
Berkeley DB: Berkeley DB 4.8.30: (2014-07-24)
Support for: crypteq iconv() IPv6 PAM Perl TCPwrappers OpenSSL
Content_Scanning DKIM Old_Demime PRDR OCSP Experimental_SPF
Experimental_SRS Experimental_DCC Experimental_DSN
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch dbm dbmjz
dbmnz dnsdb dsearch ldap ldapdn ldapm mysql passwd sqlite
Authenticators: cram_md5 cyrus_sasl plaintext spa
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore autoreply lmtp pipe smtp
Fixed never_users: 0
Size of off_t: 4
Configuration file is /etc/exim/exim.conf

Exim version 4.80.1 #2 built 02-Oct-2014 09:48:53
Copyright (c) University of Cambridge, 1995 - 2012
(c) The Exim Maintainers and contributors in ACKNOWLEDGMENTS file, 2007
- 2012
Berkeley DB: Berkeley DB 4.8.30: (2014-07-24)
Support for: crypteq iconv() IPv6 PAM Perl TCPwrappers OpenSSL
Content_Scanning DKIM Old_Demime Experimental_SPF Experimental_SRS
Experimental_DCC
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm
dbmjz dbmnz dnsdb dsearch ldap ldapdn ldapm mysql passwd sqlite
Authenticators: cram_md5 cyrus_sasl plaintext spa
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore autoreply lmtp pipe smtp
C&W_DSN_1.3
Fixed never_users: 0
Size of off_t: 4
Configuration file is /etc/exim/exim.conf

Steve.