sendmail and cyrus-imap - delivery problem

Duncan Gibb duncan.gibb at
Sun Mar 22 06:51:15 EDT 2009

Mario Pavlov wrote:

MP> I've setup sendmail 8.14.3 to work with cyrus-imapd 2.3.13 on
MP> FreeBSD 7-STABLE but I have a delivery issue

> localhost> lm
> user/boo at (\HasNoChildren)

> Mar 21 09:55:57 yo sm-mta[3465]: n2L9tvmO003426: to=<boo at>,
>    delay=00:00:00, xdelay=00:00:00, mailer=cyrusv2, pri=31599,
>    relay=localhost, dsn=5.1.1, stat=User unknown

MP> cyrus knows about user/boo at
MP> but does sendmail know about it ?
MP> or it thinks it's just boo at

MP> what do you think could be the problem ?

I think your problem is that for Cyrus virtdomains to work the MTA needs
to send the _full_ address in the LMTP transaction.  When Sendmail
speaks to Cyrus lmtpd, it needs to say

  RCPT TO:<boo at>

rather than just

  RCPT TO:<boo>

Sendmail's definition of the cyrusv2 mailer
(/usr/share/sendmail/cf/mailer/cyrusv2.m4 on Debian, possibly elsewhere
on FreeBSD) sets "R=EnvToL/HdrToL", but for virtdomains you want
"R=EnvToSMTP".  It's also recommended that you change
"S=EnvFromSMTP/HdrFromL" to "S=EnvFromSMTP/HdrFromSMTP".

As a quick hack, you can change those in situ; or - more gracefully -
you can define a new mailer which works this way and use it instead.
The Open-Sendmail project has bells-and-whistles implementation,
cyrusv3.m4, within RTCyrus3:

but it is quite complicated to install.

> FEATURE(local_lmtp)
> MAILER(local)

It's not clear to me what the above lines are achieving when you also
have the below:

> define(`confLOCAL_MAILER', `cyrusv2')
> MAILER(`cyrusv2')



Duncan Gibb - Technical Director
Sirius Corporation plc - control through freedom || t: +44 870 608 0063

More information about the Info-cyrus mailing list