cyrus+sendmail+lmtpunix connection refused by localhost

Chris Harms chris at
Wed May 17 17:57:30 EDT 2006

Andrzej Adam Filip wrote:
> Chris Harms <chris at> writes:
>> Hello,
>> We have recently started to experience an inconsistent problem after
>> restarting cyrus and sendmail after a nightly backup script runs.  All
>> services seem to start properly, but mail delivery is deferred with
>> sendmail logging
>> dsn=4.4.1, stat=Deferred: Connection refused by localhost
>> It appears to be something in lmtp, but we aren't sure what exactly.
>> We are using the socket for lmtpunix delivery.  The magic bullet
>> seemed to be stopping all services and removing
>> /var/run/ and some old lmtp lock files, but then this
>> may have been coincidental.  I found a few similar reports on Google,
>> but no definite answers to this problem.
>> Any insight as to why this would just start happening out of the blue
>> would be most appreciated.
>> Thank you,
>> Chris Harms
>> # additional info
>> # Software versions
>> cyrus 2.2.12
>> sendmail 8.13.6
>> # /var/imap/socket
>> srwxrwxrwx 1 root  root  0 May 16 22:36 lmtp
>> # cyrus.conf
>>  lmtp          cmd="lmtpd" listen="lmtp" prefork=0
>>  lmtpunix      cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=1
> Two recomended tests:
> a) direct execution of deliver program
> (echo subject: test; echo) | cyrdeliver -- mailbox_name
> [ it will try to submit message via unix socket ]
> b) making sendmail deliver the message in verbose mode
> in sendmail-8.12+ as root execute:
> (echo subject: test; echo)| sendmail -v mailbox_name
> One possible source of problem: HostStatusDirectory option makes
> sendmail "remember" for some time initial problems with delivery to
> cyrus imap.
> Have you set the option in your
It appears to be enabled:

O HostStatusDirectory=.hoststat

Reviewing my backup script shows the stopping / starting of sendmail to 
be commented out, so I should probably uncomment that first.  Or would 
it be a good idea to turn off the HostStatusDirectory option anyway?

Thank you for your help,

More information about the Info-cyrus mailing list