Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

SMTP cannot deliver Mail - lmtp socket connection refused

Hi All,

I have a newly configured Advanced config of 10.5 Server and am having Mail issues. I have a working DNS and OD Master. I have setup mail and have been able to send email to my server and can see the messages in the Mail Queue screen of Server Admin.
However, the emails are not getting delivered. The Mail Access Log contains a couple of instances of the following error:
Jan 11 15:20:39 mallard master[38134]: unable to create lmtpunix listener socket: Invalid argument

The SMTP Log has messages like the following:
Jan 11 15:22:26 mallard postfix/lmtp[38152]: 033658806F: to=<piers@erparchitects.com>, relay=none, delay=62935, delays=62935/0.02/0/0, dsn=4.4.1, status=deferred (connect to mallard.greenwicheng.private[/var/imap/socket/lmtp]: Connection refused)

So it looks like the mail cannot be delivered because the listener socket didn't get created.

Where do I go next?

MacBook Pro 15", XServe Xeon, XServe RAID, Mac OS X (10.5.6)

Posted on Jan 11, 2009 1:33 PM

Reply
11 replies

Jan 12, 2009 10:05 AM in response to davidh

Here's the output you wanted.....thanks in advance for your help.

1. sudo grep lmtpunix /etc/cyrus.conf

lmtpunix cmd="lmtpd" listen="/Volumes/Mallard RAID Set 1/Mail/socket/lmtp" prefork=0

2. head -n 5 /etc/imapd.conf

admins: cyrusimap
configdirectory: /Volumes/Mallard RAID Set 1/Mail
partition-default: /Volumes/Mallard RAID Set 1/Mail/Store
unixhierarchysep: yes
altnamespace: yes

3. ls -al /var/imap/socket

total 0
drwxr-xr-x 4 _cyrus mail 136 Jan 10 01:49 .
drwxr-xr-x 15 _cyrus mail 510 Jan 10 01:49 ..
srwxrwxrwx 1 _cyrus mail 0 Jan 10 01:49 idle
srwxrwxrwx 1 root mail 0 Jan 10 01:49 lmtp

4. ls -al /var/imap/

total 24
drwxr-xr-x 15 _cyrus mail 510 Jan 10 01:49 .
drwxr-xr-x 33 root wheel 1122 Jan 4 00:49 ..
-rw------- 1 _cyrus mail 1064 Jan 12 11:55 .smd.imap.com
-rw------- 1 _cyrus mail 144 Jan 10 01:49 annotations.db
drwxr-xr-x 9 _cyrus mail 306 Jan 10 01:49 db
drwx------ 5 _cyrus mail 170 Jan 10 01:49 db.backup1
drwx------ 5 _cyrus mail 170 Jan 10 01:48 db.backup2
drwxr-xr-x 2 _cyrus mail 68 Jan 2 23:50 log
-rw------- 1 _cyrus mail 144 Jan 10 01:49 mailboxes.db
drwxr-xr-x 2 _cyrus mail 68 Jan 2 23:50 msg
drwxr-xr-x 2 _cyrus mail 68 Jan 2 23:50 proc
drwxr-xr-x 2 _cyrus mail 68 Jan 2 23:50 ptclient
drwxr-xr-x 3 _cyrus mail 102 Jan 10 01:49 quota
drwxr-xr-x 4 _cyrus mail 136 Jan 10 01:49 socket
drwxr-xr-x 2 _cyrus mail 68 Jan 2 23:50 sync

Jan 12, 2009 5:18 PM in response to shplendid

As I suspected from one of your other posts, and is important for you to have mentioned from the outset, you're using a non-standard location for your mail-store.

+"1. sudo grep lmtpunix /etc/cyrus.conf+

+lmtpunix cmd="lmtpd" listen="/Volumes/Mallard RAID Set 1/Mail/socket/lmtp" prefork=0+

+2. head -n 5 /etc/imapd.conf+

+admins: cyrusimap+
+configdirectory: /Volumes/Mallard RAID Set 1/Mail+
+partition-default: /Volumes/Mallard RAID Set 1/Mail/Store"+




Never mind /var/imap and /var/imap/socket ,

now you need to check the permissions on

/Volumes/Mallard RAID Set 1/Mail

and

/Volumes/Mallard RAID Set 1/Mail/socket

I imagine they're incorrect.
Note the appropriate permissions you listed for the default directory/-ies.

Jan 12, 2009 7:40 PM in response to davidh

Hi David,

The mail system created all the files on the XRAID for me - I didnt copy them from somewhere else.

The Mail dir is set as follows:
Owner _cyrus read and Write
Group mail read only
Others Others read only

The Mail/socket dir is set the same way.

Files in Mail/socket are:
idle Owner _cyrus read and write
Group mail read and write
Others Others read and write

imap-1.lock
Owner _cyrus read and write
Group mail none
Others Others none

lmtp Owner root read and write
Group mail read & write
Others Others read & write

Jan 13, 2009 11:58 AM in response to pterobyte

OK I checked for ACL's and there was one, so I have removed it from the root of the Volume all the way down.

That did make a difference; the only errors I get now are in the SMTP log (/var/log/mail.log) but they are still the connection refused type, example below:

Jan 13 13:24:58 mallard postfix/lmtp[54728]: 033658806F: to=<piers@erparchitects.com>, relay=none, delay=228688, delays=228688/0.02/0/0, dsn=4.4.1, status=deferred (connect to mallard.greenwicheng.private[/var/imap/socket/lmtp]: Connection refused)

Jan 13, 2009 12:18 PM in response to shplendid

Somewhere in your configuration it is still pointing to the default location of /var/imap/socket/lmtp rather than your new location.

Check:
/etc/imapd.conf
/etc/cyrus.conf
/etc/postfix/main.cf (in particular the virtual_transport parameter).

Also, once you have sorted the issues, I would change directories. Your mail store is nested inside the configuration directory. This can cause issues. It is better to have them in "parallel" locations. For example:
/Volumes/Mallard RAID Set 1/Mail/Store
/Volumes/Mallard RAID Set 1/Mail/Database

While at it, get rid of the spaces in the volume name. While it works, spaces are best avoided on a Unix server.

Jan 14, 2009 6:59 PM in response to pterobyte

I took your advice and renamed the Raid Volume to remove the spaces, I also reconfigured the Mail directories so that the Database and the Mail Store are in parallel directories per your suggestion.

I went through the 3 files you listed and found the reference to the standard lmtp socket in /etc/postfix/main.cf so I corrected it as follows:

readme_directory = /usr/share/doc/postfix
mydomain_fallback = localhost
message sizelimit = 10485760
myhostname = mallard.greenwicheng.private
mailbox_transport = cyrus
mydomain = greenwicheng.private
mailbox sizelimit = 0
enable serveroptions = yes
inet_interfaces = all
smtpd sasl_authenable = yes
smtpd use_pwserver = yes
smtpd recipientrestrictions = permit sasl_authenticated,permit_mynetworks,reject_unauthdestination,permit
smtpd pw_server_securityoptions = gssapi,cram-md5
relayhost =
#virtual_transport = lmtp:unix:/var/imap/socket/lmtp
virtual_transport = lmtp:unix:/Volumes/MallardRAIDSet1/Mail/Database/socket/lmtp
virtual mailboxdomains = hash:/etc/postfix/virtual_domains
content_filter = smtp-amavis:[127.0.0.1]:10024
smtpd clientrestrictions = permit_mynetworks reject rblclient zen.spamhaus.org permit
maps rbldomains =
smtp sasl_passwordmaps = hash:/etc/postfix/sasl/passwd
smtp sasl_authenable = yes
mydestination = $myhostname,localhost.$mydomain,localhost,mail.erparchitects.com

You can see where I corrected the virtual_transport parameter.

I then corrected the setup in Server Admin to reflect the changes to the directories and restarted Mail and i got the following in the SMTP error log:

Jan 14 20:49:13 mallard postfix/error[67008]: CC378880F1: to=<piers@erparchitects.com>, relay=none, delay=337395, delays=337395/0.13/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to mallard.greenwicheng.private[/Volumes/MallardRAIDSet1/Mail/Database/socket/lmtp ]: Connection refused)

So I'm getting the exact same error, just on a different lmtp socket.

SMTP cannot deliver Mail - lmtp socket connection refused

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.