DevHeads.net

LMTP over TCP: connection refused

Hello,

I have a strange problem when Postfix is sending mail with LMTP over
TCP sockets to Cyrus IMAP. Cyrus IMAP is listening on port 2003 and
accepting telnet connections on that port from my Postfix server. But
when it comes to Postfix itself using LMTP, I see the following log
messages:

mgw1 postfix/qmgr[3160]: resolve_clnt: `evgeniy. ... at mydomain dot net'
-> `evgeniy. ... at mydomain dot net' -> transp=`lmtp'
host=`inet:[10.1.1.100]:2003' rcpt=`evgeniy. ... at mydomain dot net'
flags= class=virtual
mgw1 postfix/qmgr[3160]: start sorted recipient list
mgw1 postfix/qmgr[3160]: qmgr_message_sort: <a href="mailto:evgeniy. ... at mydomain dot net">evgeniy. ... at mydomain dot net</a>
mgw1 postfix/qmgr[3160]: end sorted recipient list
mgw1 postfix/qmgr[3160]: trigger_server_accept_fifo: trigger arrived
mgw1 postfix/qmgr[3160]: master_notify: status 0
mgw1 postfix/qmgr[3160]: request: 87 (W)
mgw1 postfix/qmgr[3160]: master_notify: status 1
mgw1 postfix/qmgr[3160]: qmgr_transport_select: lmtp
mgw1 postfix/qmgr[3160]: qmgr_active_drain: allocate lmtp
mgw1 postfix/qmgr[3160]: connect to subsystem private/lmtp: Connection refused
mgw1 postfix/qmgr[3160]: warning: connect to transport lmtp: Connection refused
mgw1 postfix/qmgr[3160]: qmgr_transport_throttle: transport lmtp:
status: 4.3.0 reason: mail transport unavailable

This is my $postconf -n

config_directory = /etc/postfix
disable_vrfy_command = yes
inet_interfaces = all
local_recipient_maps =
local_transport = error:no local mail delivery
mydomain = mydomain.net
myhostname = mgw1.mydomain.net
show_user_unknown_table_name = no
smtpd_helo_required = yes
smtpd_helo_restrictions = check_helo_access pcre:/etc/postf
smtpd_tls_cert_file = /etc/ssl/certs/smtpd.crt
smtpd_tls_key_file = /etc/ssl/private/smtpd.key
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
strict_rfc821_envelopes = yes
tls_random_source = dev:/dev/urandom
unknown_address_reject_code = 554
unknown_client_reject_code = 550
unknown_hostname_reject_code = 554
unverified_sender_reject_code = 554
virtual_alias_maps = ldap:/etc/postfix/virtual-aliases.cf
virtual_mailbox_domains = ldap:/etc/postfix/virtual-domains
virtual_mailbox_maps = ldap:/etc/postfix/virtual-addresses.
virtual_transport = lmtp:inet:[10.1.1.101]:2003

This is what I have in master.cf:
lmtp inet n - n - - lmtp

I am sure all the LDAP lookups are working fine and I did specify lmtp
in /etc/services.

This is a line from cyrus.conf
lmtp cmd="lmtpd" listen="[10.1.1.101]:lmtp" prefork=1

An interesting thing is that I do not see any connection attempts to
the LMTP port on the Cyrus IMAP server.

Can you point me out, where is the mistake?

Thank you!

Regards,
Evgeniy

Comments

Re: LMTP over TCP: connection refused

By Magnus =?iso-88... at 08/05/2009 - 08:12

On Wednesday, August 05, 2009 at 09:46 CEST,

No need for verbose logs unless specifically asked for.

This indicates that there is no lmtp service in master.cf that Postfix
can connect to.

[...]

Where did you get this line from? It should look like this:

lmtp unix - - n - - lmtp

[...]

Re: LMTP over TCP: connection refused

By Robert Socha at 08/05/2009 - 08:11

Evgeniy Arbatov pisze:

First of try to connect from your SMTP host to your CYRUS host using
telnet/netcat:

nc 10.1.1.101 2003

You should see standard smtp/lmtp banner.

Otherwise the problem could be with:

1. Firewall is blocking connection
2. Wrong port number. On smtp host you use 2003 as lmtp port. What port
is set for lmtp service on cyrus host?

I think you will need also change this in your cyrus.conf:

lmtp cmd="lmtpd -a" listen="10.1.1.101:2003" prefork=1
^^^^
This is pre-auth for lmtp connection.

Greetings

Re: LMTP over TCP: connection refused

By Magnus =?iso-88... at 08/05/2009 - 08:22

On Wednesday, August 05, 2009 at 10:11 CEST,

Irrelevant (for now at least). The OP's current problem is that Postfix
is not able to connect to its own lmtp(8) service, not that lmtp(8) is
unable to connect to Cyrus.

[...]

Re: LMTP over TCP: connection refused

By Evgeniy Arbatov at 08/05/2009 - 11:27

Thank you for your suggestions! It works now.

This was an issue with my configuration of Postfix and Cyrus.

In master.cf, as Magnus suggested:
lmtp unix - - n - - lmtp

In main.cf:
virtual_transport = lmtp:[10.1.1.101]:2003

And in cyrus.conf, according to Robert:
lmtp cmd="lmtpd -a" listen="10.1.1.101:2003" prefork=1

I have my SELinux disabled for the moment.

Evgeniy