[Exim] mail bounces if lmtpd is down

Pàgina inicial
Delete this message
Reply to this message
Autor: Ilya
Data:  
A: exim-users
Assumpte: [Exim] mail bounces if lmtpd is down
hello, I use Exim 3.36 with cyrus imap.
ocasionally the lmtpd from cyrus goes down, if that happens the mail which comes during that time bounces with following error:
Child process of local_delivery_cyrus transport returned 75 (could mean temporary error) from command:
    /usr/local/cyrus2/bin/deliver

The following text was generated during the delivery attempt:

couldn't connect to lmtpd: Socket is not connected
421 4.3.0 deliver: couldn't connect to lmtpd


the original message is not delivered, and sender receives the above email.
This is not desirable. Can some one point me to what is wrong with my config, and how I can prevent bounces if not for all temporary error, than at least for this one?

it seems like mysql_autoresponder kicks in if cyrus_local_delivery fails with that error. any ideas why?

below is my config file and some log info:






######################################################################
#                  Runtime configuration file for Exim               #
######################################################################

delay_warning = 4h:8h:100h
freeze_tell_mailmaster
rfc1413_query_timeout =0s
#auth_over_tls_hosts = *

trusted_users = amavis : ilya


######################################################################
#                    MAIN CONFIGURATION SETTINGS                     #
######################################################################

primary_hostname = myhostname.net
hide mysql_servers = "myhostname.net/s/r/m"

local_domains = myhostname

exim_user = mailnull
exim_group = mail

 host_accept_relay = myhostname
 host_auth_accept_relay = *
 tls_advertise_hosts = *
 tls_certificate = /usr/local/etc/exim/exim.key
 tls_privatekey = /usr/local/etc/exim/exim.key
 auth_over_tls_hosts = *


pid_file_path = /var/run/exim%s.pid
log_level = 25
log_refused_recipients = true

# change some logging actions (collect more data)
rbl_log_headers  = true   # log headers of accepted ORDBed messages
rbl_log_rcpt_count = true # log recipient info of accepted ORDBed messages


##############spma checks####################
receiver_verify = true
sender_verify = true
sender_verify_reject = true
headers_check_syntax = true
headers_sender_verify = true
headers_checks_fail = true
helo_accept_junk_hosts = true
#rbl_log_rcpt_count = true
helo_strict_syntax = false
helo_verify = true
#log_refused_recipients = true
receiver_try_verify = true

##########################################


end



######################################################################
#                      TRANSPORTS CONFIGURATION                      #
######################################################################
#                       ORDER DOES NOT MATTER                        #
#     Only one appropriate transport is called for each delivery.    #
######################################################################

remote_smtp:
  driver = smtp

local_delivery_cyrus:
        driver = pipe
command = "/usr/local/cyrus2/bin/deliver -f ${local_part}@${domain} -q -m ${substr_1:${local_part_suffix}} -- ${
local_part}"
#command = "/bin/echo ${substr_1:${local_part_suffix}} -- ${local_part}>/tmp/111"
        user = cyrus
        group = cyrus
        return_output =
        log_output = true
        prefix =
        suffix =

address_pipe:
  driver = pipe
  return_output

address_file:
  driver = appendfile
  delivery_date_add
  envelope_to_add
  return_path_add

address_reply:
  driver = autoreply

mysql_autoresponder_transport:
  driver  = autoreply
  log     = /var/log/exim_vacation_log
  once    = /var/db/exim_vacation_once_db
  return_path = ${local_part}@${domain}
  to      = ${sender_address}
  from    = ${local_part}@${domain}
  subject = ${lookup mysql{SELECT vacation_sub FROM users WHERE user='${local_part}'}{$value}{"Auto Reply"}}
  text    = ${lookup mysql{SELECT vacation_msg FROM users WHERE user='${local_part}'}{$value}fail}
  user    = cyrus


amavis:
  driver = pipe
  command = "/usr/sbin/amavis <${sender_address}> ${pipe_addresses}"
  prefix =
  suffix =
  check_string =
  escape_string =
# for debugging change return_output to true
  return_output = false
  return_path_add = false
  user = amavis
  group = amavis
  path = "/bin:/sbin:/usr/bin:/usr/sbin"
  current_directory = "/var/amavis"

end

######################################################################
#                      DIRECTORS CONFIGURATION                       #
#             Specifies how local addresses are handled              #
######################################################################
#                          ORDER DOES MATTER                         #
#   A local address is passed to each in turn until it is accepted.  #
######################################################################

# Local addresses are those with a domain that matches some item in the
# "local_domains" setting above, or those which are passed back from the
# routers because of a "self=local" setting (not used in this configuration).

amavis_director:
  condition = "${if eq {$received_protocol}{scanned-ok} {0}{1}}"
  driver = smartuser
  transport = amavis

system_aliases:
  driver = aliasfile
  file = /etc/mail/aliases
  search_type = lsearch
  file_transport = address_file
  pipe_transport = address_pipe
  user = root

mysql_system_aliases:
        driver = aliasfile
        search_type = mysql
        query = "select userid from aliases where aliasid='$local_part'"

userforward:
  driver = forwardfile
  file = .forward
  no_verify
  no_expn
  check_ancestor
  filter
  file_transport = address_file
  pipe_transport = address_pipe
  reply_transport = address_reply

mysql_forward:
  driver = aliasfile
  search_type = mysql
  query = "SELECT alt_email FROM users WHERE user='${local_part}' AND email_forward='y'"
  no_verify
  no_expn

mysql_autoresponder:
  driver = smartuser
  condition = ${lookup mysql{SELECT user FROM users WHERE user='${local_part}' AND vacation='y'}{$value}fail}
  transport = mysql_autoresponder_transport
  user = cyrus
  unseen
  no_verify
  no_expn

local_user_cyrus:
        driver = aliasfile
        search_type = mysql
        query = "select user from users where user='$local_part'"
        transport = local_delivery_cyrus

end



######################################################################
#                      ROUTERS CONFIGURATION                         #
#            Specifies how remote addresses are handled              #
######################################################################
#                          ORDER DOES MATTER                         #
#  A remote address is passed to each in turn until it is accepted.  #
######################################################################

# Remote addresses are those with a domain that does not match any item
# in the "local_domains" setting above.

amavis_router:
  condition = "${if eq {$received_protocol}{scanned-ok} {0}{1}}"
  driver = domainlist
  route_list = "*"
  transport = amavis


lookuphost:
  driver = lookuphost
  transport = remote_smtp


# This router routes to remote hosts over SMTP by explicit IP address,
# given as a "domain literal" in the form [nnn.nnn.nnn.nnn]. The RFCs
# require this facility, which is why it is enabled by default in Exim.
# If you want to lock it out, set forbid_domain_literals in the main
# configuration section above.

literal:
  driver = ipliteral
  transport = remote_smtp


end



######################################################################
#                      RETRY CONFIGURATION                           #
######################################################################

# This single retry rule applies to all domains and all errors. It specifies
# retries every 15 minutes for 2 hours, then increasing retry intervals,
# starting at 1 hour and increasing each time by a factor of 1.5, up to 16
# hours, then retries every 8 hours until 4 days have passed since the first
# failed delivery.

# Domain               Error       Retries
# ------               -----       -------

#paladin7.net           *               F,444d,45m;
#kotiki.net             *               F,444d,45m;
#ogurok.com             *               F,444d,45m;
*                      *           F,2h,15m; G,16h,1h,1.5; F,4d,8h

end

######################################################################
#                      REWRITE CONFIGURATION                         #
######################################################################

# There are no rewriting specifications in this default configuration file.

end




# End of Exim configuration file




log info below:
002-07-26 23:41:43 17YISd-000DTC-00 <user@host>: local_delivery_cyrus transport output: couldn't connect to
 lmtpd: Socket is not connected
2002-07-26 23:41:43 17YISd-000DTC-00 ** user@host <user@host> D=local_user_cyrus T=local_delivery_cyrus:
 Child process of local_delivery_cyrus transport returned 75 (could mean temporary error) from command: /usr/loc
al/cyrus2/bin/deliver
2002-07-26 23:41:44 17YISd-000DTC-00 => ilya <user@host> D=mysql_autoresponder T=mysql_autoresponder_transpo
rt
2002-07-26 23:41:44 17YISe-000DTJ-00 <= <> R=17YISd-000DTC-00 U=mailnull P=local S=1881
2002-07-26 23:41:44 17YISd-000DTC-00 Error message sent to user@host
2002-07-26 23:41:44 17YISd-000DTC-00 Completed





here is an output of -d 10
amazingly there is no any mentioning of error here. so the only place to know what happens is either sender email, or mainlog of exim:

/var/log
root@???$ /usr/local/sbin/exim -bd -q30m -d 10
Exim version 3.36 debug level 10 uid=0 gid=0
probably Berkeley DB version 1.8x (native mode)
Caller is an admin user
Caller is a trusted user
originator: uid=0 gid=0 login=root name=Bastard Operator From Hell
port = 25
LOG: 0 MAIN
  Setting IPV6_V6ONLY on daemon's IPv6 wildcard socket failed (Protocol not available): carrying on without it
listening on all interfaces (IPv6)
listening on all interfaces (IPv4)
pid written to /var/run/exim.pid
LOG: 0 MAIN
  exim 3.36 daemon started: pid=52507, -q30m, listening for SMTP on port 25
set_process_info: 52507 daemon: -q30m, listening on port 25
daemon running with uid=26 gid=6 euid=26 egid=6
SIGALRM received
Starting queue-runner: pid 52508
1 queue-runner process running
listening on port 25...
child 52508 ended: status=0x0
0 queue-runner processes now running
listening on port 25...

Process 52510 is handling incoming connection from [127.0.0.1]
host in host_lookup? no (option unset)
host in host_reject? no (option unset)
host in host_reject_recipients? no (option unset)
host in rbl_hosts? no (!192.168.0.0/24)
host in auth_hosts? no (option unset)
host in auth_over_tls_hosts? yes (*)
host in tls_hosts? no (option unset)
host in sender_unqualified_hosts? no (option unset)
host in receiver_unqualified_hosts? no (option unset)
1 SMTP accept process running
listening on port 25...
host in helo_verify? no (end of list)
host in helo_accept_junk_hosts? no (end of list)

SMTP>> 220 alchemistry.net ESMTP Exim 3.36 #1 Sat, 27 Jul 2002 00:05:28 -0400

set_process_info: 52510 handling incoming connection from [127.0.0.1]
ready for new message
smtp_setup_msg entered
SMTP<< EHLO ilya
ilya in local_domains? no (end of list)
sender_fullhost = (ilya) [127.0.0.1]
sender_rcvhost = [127.0.0.1] (helo=ilya)
set_process_info: 52510 handling incoming connection from (ilya) [127.0.0.1]
host in tls_advertise_hosts? yes (*)
SMTP>> 250-alchemistry.net Hello ilya [127.0.0.1]

250-SIZE
250-PIPELINING
250-STARTTLS
250 HELP
SMTP<< STARTTLS
using tls_certificate /usr/local/etc/exim/exim.key
using tls_privatekey /usr/local/etc/exim/exim.key
Initialised TLS (OpenSSL/0.9.6beta)
host in tls_verify_hosts? no (option unset)
SMTP>> 220 OpenSSL/0.9.6beta go ahead

Calling SSL_accept
SSL info: before/accept initialization
SSL info: before/accept initialization
SSL info: SSLv3 read client hello A
SSL info: SSLv3 write server hello A
SSL info: SSLv3 write certificate A
SSL info: SSLv3 write server done A
SSL info: SSLv3 flush data
SSL info: SSLv3 read client key exchange A
SSL info: SSLv3 read finished A
SSL info: SSLv3 write change cipher spec A
SSL info: SSLv3 write finished A
SSL info: SSLv3 flush data
SSL info: SSL negotiation finished successfully
SSL info: SSL negotiation finished successfully
SSL_accept was successful
Cipher: TLSv1:RC4-MD5:128
Shared ciphers: RC4-MD5:RC4-SHA:DES-CBC3-SHA:DES-CBC-SHA:EXP1024-RC4-SHA:EXP1024-DES-CBC-SHA:EXP-RC4-MD5:EXP-RC2-CBC-MD5:EDH-DSS-DES-CBC3-SHA:EDH-DSS-DES-CBC-SHA:EXP1024-DHE-DSS-DES-CBC-SHA
sender_fullhost = [127.0.0.1]
sender_rcvhost = [127.0.0.1]
set_process_info: 52510 handling incoming TLS connection from [127.0.0.1]
TLS active
Calling SSL_read(817d900, 819f000, 4096)
SMTP<< HELO ilya
ilya in local_domains? no (end of list)
sender_fullhost = (ilya) [127.0.0.1]
sender_rcvhost = [127.0.0.1] (helo=ilya)
set_process_info: 52510 handling TLS incoming connection from (ilya) [127.0.0.1]
tls_do_write(817e348, 46)
SSL_write(SSL, 817e348, 46)
outbytes=46 error=0
SMTP>> 250 alchemistry.net Hello ilya [127.0.0.1]

Calling SSL_read(817d900, 819f000, 4096)
SMTP<< MAIL FROM: <mail@???>
mail@??? in sender_reject? no (option unset)
mail@??? in sender_reject_recipients? no (option unset)
host in sender_verify_hosts? yes (*)
verifying sender mail@???
>>>>>>>>>>>>>>>>>>>>>>>>

Verifying mail@???
host.com in local_domains? yes (matched host.com)
host.com in percent_hack_domains? no (end of list)
address mail@???
local_part=mail domain=host.com
domain is local
>>>>>>>>>>>>>>>>>>>>>>>>

directing mail@???
calling amavis_director director
amavis_director director called for mail@???
queued for amavis transport: local_part=mail domain=host.com
errors_to=NULL
domain_data=NULL local_part_data=NULL
amavis_director director succeeded for mail
mail@??? verified ok as mail@???
SMTP>> 250 <mail@???> is syntactically correct

tls_do_write(817c000, 46)
SSL_write(SSL, 817c000, 46)
outbytes=46 error=0
Calling SSL_read(817d900, 819f000, 4096)
SMTP<< RCPT TO: <ilya@???>
host.com in local_domains? yes (matched host.com)
host in receiver_verify_hosts? yes (*)
>>>>>>>>>>>>>>>>>>>>>>>>

Verifying ilya@???
host.com in local_domains? yes (matched host.com)
host.com in percent_hack_domains? no (end of list)
address ilya@???
local_part=ilya domain=host.com
domain is local
>>>>>>>>>>>>>>>>>>>>>>>>

directing ilya@???
calling amavis_director director
amavis_director director called for ilya@???
queued for amavis transport: local_part=ilya domain=host.com
errors_to=NULL
domain_data=NULL local_part_data=NULL
amavis_director director succeeded for ilya
SMTP>> 250 <ilya@???> verified

tls_do_write(817c000, 30)
SSL_write(SSL, 817c000, 30)
outbytes=30 error=0
Calling SSL_read(817d900, 819f000, 4096)
SMTP<< DATA
SMTP>> 354 Enter message, ending with "." on a line by itself

tls_do_write(817c000, 56)
SSL_write(SSL, 817c000, 56)
outbytes=56 error=0
search_tidyup called
Calling SSL_read(817d900, 819f000, 4096)
host in ignore_fromline_hosts? no (option unset)
>>Original headers (size=397):

Message-ID: <006601c23522$fb92d760$0100a8c0@ilya>
From: "Ilya" <mail@???>
To: <ilya@???>
Subject:
Date: Sat, 27 Jul 2002 00:06:28 -0400
MIME-Version: 1.0
Content-Type: text/plain;
        charset="windows-1251"
Content-Transfer-Encoding: base64
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300

rewrite_one_header: type=F:
  From: "Ilya" <mail@???>
rewrite_one_header: type=T:
  To: <ilya@???>

>>Final headers:

P Received: from [127.0.0.1] (helo=ilya)
        by alchemistry.net with smtp (TLSv1:RC4-MD5:128)
        (Exim 3.36 #1)
        id 17YIpc-000Dew-00
        for ilya@???; Sat, 27 Jul 2002 00:05:28 -0400
I Message-ID: <006601c23522$fb92d760$0100a8c0@ilya>
F From: "Ilya" <mail@???>
T To: <ilya@???>
  Subject:
  Date: Sat, 27 Jul 2002 00:06:28 -0400
  MIME-Version: 1.0
  Content-Type: text/plain;
        charset="windows-1251"
  Content-Transfer-Encoding: base64
  X-Priority: 3
  X-MSMail-Priority: Normal
  X-Mailer: Microsoft Outlook Express 5.50.4807.1700
  X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300

search_tidyup called
verifying header address "Ilya" <mail@???>

>>>>>>>>>>>>>>>>>>>>>>>>

Verifying mail@???
host.com in local_domains? yes (matched host.com)
host.com in percent_hack_domains? no (end of list)
address mail@???
local_part=mail domain=host.com
domain is local
>>>>>>>>>>>>>>>>>>>>>>>>

directing mail@???
calling amavis_director director
amavis_director director called for mail@???
queued for amavis transport: local_part=mail domain=host.com
errors_to=NULL
domain_data=NULL local_part_data=NULL
amavis_director director succeeded for mail
Calling SSL_read(817d900, 819f000, 4096)
Data file written for message 17YIpc-000Dew-00
Writing spool header file
Size of headers = 577
LOG: 0 MAIN
<= mail@??? H=(ilya) [127.0.0.1] P=smtp X=TLSv1:RC4-MD5:128 S=579 id=006601c23522$fb92d760$0100a8c0@ilya
SMTP>> 250 OK id=17YIpc-000Dew-00

tls_do_write(817c000, 28)
SSL_write(SSL, 817c000, 28)
outbytes=28 error=0
search_tidyup called
Sender: mail@???
Recipients:
ilya@???
forked delivery process 52511
set_process_info: 52510 handling incoming connection from (ilya) [127.0.0.1]
ready for new message
smtp_setup_msg entered
Calling SSL_read(817d900, 819f000, 4096)
SMTP<< QUIT
SMTP>> 221 alchemistry.net closing connection

tls_do_write(817c000, 40)
SSL_write(SSL, 817c000, 40)
outbytes=40 error=0
tls_close(): shutting down SSL
SSL info: SSL negotiation finished successfully
search_tidyup called
child 52510 ended: status=0x0
0 SMTP accept processes now running
listening on port 25...
Exim version 3.36 debug level 10 uid=26 gid=6
probably Berkeley DB version 1.8x (native mode)
Caller is an admin user
Caller is a trusted user
set_process_info: 52511 delivering specified messages
delivering message 17YIpc-000Dew-00
set_process_info: 52511 delivering 17YIpc-000Dew-00
Opened spool file 17YIpc-000Dew-00-H
user=root uid=0 gid=0 sender=mail@???
sender_fullhost = (ilya) [127.0.0.1]
sender_rcvhost = [127.0.0.1] (helo=ilya)
sender_local=0 resent=no ident=unset
Non-recipients:
Empty Tree
---- End of tree ----
recipients_count=1
body_linecount=1 message_linecount=18
Delivery address list:
ilya@???
locked /var/spool/exim/db/retry.lockfile
opened DB file /var/spool/exim/db/retry: flags=0
>>>>>>>>>>>>>>>>>>>>>>>>

Considering: ilya@???
host.com in local_domains? yes (matched host.com)
host.com in percent_hack_domains? no (end of list)
unique = ilya@???
dbfn_read: key=D:ilya@???
ilya@???: queued for directing
>>>>>>>>>>>>>>>>>>>>>>>>

directing ilya@???
calling amavis_director director
amavis_director director called for ilya@???
queued for amavis transport: local_part=ilya domain=host.com
errors_to=NULL
domain_data=NULL local_part_data=NULL
amavis_director director succeeded for ilya
>>>>>>>>>>>>>>>>>>>>>>>>

After directing:
  Local deliveries:
    ilya@???
  Remote deliveries:
  Failed addresses:
  Addresses to be routed:
  Deferred addresses:
search_tidyup called

>>>>>> Local deliveries >>>>>>

locked /var/spool/exim/db/retry.lockfile
opened DB file /var/spool/exim/db/retry: flags=0
dbfn_read: key=T:ilya@???
delivering ilya@??? as ilya using amavis:
uid=1502 gid=1007 home=NULL current=/var/amavis
auxiliary group list: 1007
set_process_info: 52512 delivering 17YIpc-000Dew-00 to ilya using amavis
amavis transport entered
direct command:
argv[0] = /usr/sbin/amavis
argv[1] = <${sender_address}>
argv[2] = ${pipe_addresses}
direct command after expansion:
argv[0] = /usr/sbin/amavis
argv[1] = <mail@???>
argv[2] = ilya@???
Writing message to pipe
set_process_info: 52514 reading output from |/usr/sbin/amavis <${sender_address}> ${pipe_addresses}
writing data block fd=8 size=0 timeout=3600
writing data block fd=8 size=579 timeout=3600
writing data block fd=8 size=0 timeout=3600
amavis transport yielded 0
journalled ilya@???
search_tidyup called
amavis transport returned OK for ilya@???
post-process ilya@??? (0)
ilya@??? succeeded: adding to nonrecipients list
LOG: 0 MAIN
=> ilya <ilya@???> D=amavis_director T=amavis
set_process_info: 52511 tidying up after delivering 17YIpc-000Dew-00
Processing retry items
Succeeded addresses:
ilya@???: no retry items
Failed addresses:
Deferred addresses:
end of retry processing
LOG: 0 MAIN
Completed
end delivery of 17YIpc-000Dew-00
search_tidyup called
search_tidyup called