0

I'm having problems with getting Exim talking to Cyrus lmtp.

I know that lmtp is receiving. It's listening on port 2003. I used the following perl script to test it.

!/usr/bin/perl -w

use Net::LMTP;

my $lmtp = Net::LMTP->new('localhost', 2003);

$lmtp->mail($ENV{USER});
$lmtp->to('[email protected]');

$lmtp->data();
$lmtp->datasend("To: postmaster\n");
$lmtp->datasend("\n");
$lmtp->datasend("A simple test message\n");
$lmtp->dataend();

$lmtp->quit;

Executing it resulted in a file, 1. appearing in the appropriate cyrus spool folder:

root@myhost:/var/spool/cyrus/mail/domain/e/example.com/t/user/test# cat 1.
Return-Path: <[email protected]>
Received: from myhost.example.net (localhost [127.0.0.1])
         by myhost.example.net (Cyrus 2.5.10-Debian-2.5.10-3) with LMTPA;
         Sun, 07 Oct 2018 12:45:48 +0100
X-Sieve: CMU Sieve 2.4
To: postmaster
Message-ID: <[email protected]>
Date: Sun, 07 Oct 2018 12:45:48 +0100

A simple test message

I'm running my own custom build of exim.

Executing exim's -bt test routing option

/usr/exim/bin/exim -bt [email protected]

results in

[email protected]
  router = cyrus_vdom, transport = cyrus_ltcp

Here are the exim router and transport:

cyrus_vdom:
  driver = accept
  domains = +cyrus_domains
  transport = cyrus_ltcp
  no_more


cyrus_ltcp:
  driver = smtp
  protocol = lmtp
  hosts = localhost
  port = 2003

The messages are stuck in exim, and executing

exim -qff 

does not shift them out.

2018-10-07 12:35:48 exim 4.91 daemon started: pid=11455, -q30m, listening for SMTP on port 25 (IPv6 and IPv4) port 587 (IPv6 and IPv4) and for SMTPS on port 465 (IPv6 and IPv4)
2018-10-07 12:35:48 Start queue run: pid=11456
2018-10-07 12:35:48 1g8uZF-00027o-TS Message is frozen
2018-10-07 12:35:48 1g8oBv-0000L0-JO Message is frozen
2018-10-07 12:35:48 End queue run: pid=11456
2018-10-07 13:05:48 Start queue run: pid=11812
2018-10-07 13:05:48 1g8uZF-00027o-TS Message is frozen
2018-10-07 13:05:48 1g8oBv-0000L0-JO Message is frozen
2018-10-07 13:05:48 End queue run: pid=11812
2018-10-07 13:35:49 Start queue run: pid=11955
2018-10-07 13:35:49 1g8oBv-0000L0-JO Message is frozen
2018-10-07 13:35:49 1g8uZF-00027o-TS Message is frozen
2018-10-07 13:35:49 End queue run: pid=11955

Any suggestions are welcome.

1 Answer 1

0

Ping localhost resulted in

PING localhost(localhost (::1)) 56 data bytes
64 bytes from localhost (::1): icmp_seq=1 ttl=64 time=0.039 ms
64 bytes from localhost (::1): icmp_seq=2 ttl=64 time=0.046 ms
64 bytes from localhost (::1): icmp_seq=3 ttl=64 time=0.047 ms

IPv6, clearly.

Running

netstat -anp

showed that port 2003 was not being listened to on IPv6, only IP4.

Changing the exim transport hosts to this fixed it.

cyrus_ltcp:
  driver = smtp
  protocol = lmtp
  hosts = 127.0.0.1
  port = 2003
  allow_localhost

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .