[exim] exim & mysql-connector-c

Pàgina inicial
Delete this message
Reply to this message
Autor: Mark Elkins
Data:  
A: exim-users@exim.org
Assumptes nous: Re: [exim] exim & mysql-connector-c
Assumpte: [exim] exim & mysql-connector-c
Hi,

I run a few machines with exim - for both Submission (SMTP relay) and
for receiving emails for quite a few email addresses in numerous domains.
My users are stored in a database for ease of configuration.
I run Gentoo and usually try and keep up to date with all packages.

Last night - one machine updated:-

dev-db/mysql-connector-c-8.0.19::gentoo
mail-mta/exim-4.93.0.4::gentoo

I then got an error "Internal error - virtual-forward"
This routine does a Database lookup to see if this customers e-mail should be forwarded elsewhere...
That looks like...
virtual_forward:
# The returned 'email' value can be multiple comma separated addresses
driver = redirect
data = ${lookup mysql{select email from admin where punyuser="${quote_mysql:$local_part@$domain}" and status>2}}
user = smmsp
file_transport = address_file
pipe_transport = address_pipe

I commented it out and the error moved.... to "mysql_user".
This routine looks up a user and does a final delivery into the users mailbox - along with mysql_delivery...

mysql_user:
   driver = accept
   condition = \
    ${if eq {} \
    {${lookup mysql {select punyuser from admin \
     where punyuser='${quote_mysql:$local_part@$domain}' and status>2}}} \
    {no}{yes}}
   retry_use_local_part
   transport = mysql_delivery


mysql_delivery:
   driver = appendfile
   directory = /var/spool/mail/$domain/$local_part/
   maildir_format = true
   directory_mode = 0755
   create_directory = true
   user = smmsp
   group = smmsp
   mode = 0660
   message_size_limit = ${lookup mysql {select imsize from admin \
     where punyuser='${local_part}@${domain}'}}M
   quota = ${lookup mysql {select mquota from admin \
     where punyuser='${local_part}@${domain}'}}M
   quota_is_inclusive=false
   quota_warn_threshold = 80%


   message_suffix = ${lookup mysql {insert into maillog set mfrom='${quote_mysql:$sender_address}',\
     mto='${quote_mysql:$local_part}@${domain}', domain='${domain}', mvia='${quote_mysql:$sender_host_address}',\
     msize=${message_size}, mdelivered=current_timestamp, mailid='$message_id', mspam='$spam_score_int',\
     mreturn='${quote_mysql:$return_path}' }{}{}}


   quota_warn_message = "\
     To: $local_part@$domain\n\
     Subject: Mailbox is 80% full\n\n\
     This message is automatically created by the mail delivery system.\n\n\
     (text deleted)
     of your mail box (within limits).\n\n\
     Support\n"


Anyway - I tried re-compiling older versions of Exim (down to mail-mta/exim-4.92.2) with the same result - MySQL simply did not work - though it worked perfectly at the Command line using the mysql command)

Then I noticed that "mysql-connector-c" had also changed. I assume it's interaction with "mysql-connector-c" that has broken something.

Copied an older version of "exim" from another machine - and deliveries started working again. That's fine for now but not long term.

Is this a known problem - found by others? Any particular path to follow?

--

Mark James ELKINS  -  Posix Systems - (South) Africa
mje@???       Tel: +27.826010496 <tel:+27826010496>
For fast, reliable, low cost Internet in ZA: https://ftth.posix.co.za