imapd 2.5.7-8 with virtual domains and sendmail config

Mogens Melander trasherdk at gmail.com
Mon Jun 13 07:45:24 EDT 2016


This is driving me nuts. I really need some help here.

I'm running a test sendmail (8.15.2) and a cyrus-imapd 2.5.7 on
slackware 14.1 running in a virtualbox.

joe at example.com is a valid user on cyrus, not a login (linux) user.

>From cyradm:

localhost.localdomain> lm
user/joe/Drafts at example.com (\HasNoChildren)
user/joe/Sent at example.com (\HasNoChildren)
user/joe/Trash at example.com (\HasNoChildren)
user/joe at example.com (\HasChildren)

I have an entry in virtusertable for domain at example.com mapping to
joe at example.com

example.com is in local-host-names file.

I have shaved my cyrusv2.mc down to a bare minimum, and the relevant
section in sendmail.cf show the difference between cyrusv2.m4 and
my cyrusv2.mc (R=EnvToL/HdrToL => R=EnvToSMTP)

-------
Mcyrusv2,    P=[IPC], F=lsDFMnqXzA@/:|m,
        S=EnvFromSMTP/HdrFromL, R=EnvToL/HdrToL, E=\r\n,
        T=DNS/RFC822/SMTP,
        A=FILE /var/imap/socket/lmtp

Mcyrusv2,    P=[IPC], F=lsDFMnqXzA@/:|m,
        S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, E=\r\n,
        T=DNS/RFC822/SMTP,
        A=FILE /var/imap/socket/lmtp
------

This is what my current cyrusv2.mc look like:

include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
VERSIONID(`@(#)cyrusv2.mc fumlersoft ver 1.1 2016-06-13')dnl
OSTYPE(linux)dnl
DOMAIN(generic)dnl

FEATURE(`use_cw_file')dnl    /etc/mail/local-host-names
FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access')dnl
FEATURE(`virtusertable', `hash /etc/mail/virtusertable')dnl

define(`confBIND_OPTS', `-DNSRCH -DEFNAMES')dnl
define(`confLOCAL_MAILER',`cyrusv2')dnl

MAILER(`smtp')dnl
MAILER(`local')dnl
MAILER(`cyrusv2')dnl

MAILER_DEFINITIONS
Mcyrusv2,    P=[IPC], F=lsDFMnqXzA@/:|m,
        S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, E=\r\n,
        T=DNS/RFC822/SMTP,
        A=FILE /var/imap/socket/lmtp


When checking address test:

echo '/map virtuser domain at example.com' | sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
 (0)p_lookup: virtuser (domain at example.com) returns joe at example.com

It looks promising, but then a ruleset 3,0 test

echo "3,0 domain at example.com" | sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> canonify     input: domain @ example . com
Canonify2      input: domain < @ example . com >
Canonify2      returns: domain < @ example . com . >
canonify        returns: domain < @ example . com . >
parse            input: domain < @ example . com . >
Parse0          input: domain < @ example . com . >
Parse0          returns: domain < @ example . com . >
ParseLocal    input: domain < @ example . com . >
ParseLocal    returns: domain < @ example . com . >
Parse1          input: domain < @ example . com . >
Recurse        input: joe @ example . com
canonify        input: joe @ example . com
Canonify2      input: joe < @ example . com >
Canonify2      returns: joe < @ example . com . >
canonify        returns: joe < @ example . com . >
parse            input: joe < @ example . com . >
Parse0          input: joe < @ example . com . >
Parse0          returns: joe < @ example . com . >
ParseLocal    input: joe < @ example . com . >
ParseLocal    returns: joe < @ example . com . >
Parse1          input: joe < @ example . com . >
Parse1          returns: $# cyrusv2 $: joe
parse            returns: $# cyrusv2 $: joe
Recurse        returns: $# cyrusv2 $: joe
Parse1          returns: $# cyrusv2 $: joe
parse            returns: $# cyrusv2 $: joe

When sending a mail to domain at example.com I get in the logfile:

 master[22245]: about to exec /usr/cyrus/bin/lmtpd
 lmtpunix[22245]: SQL backend defaulting to engine 'mysql'
 lmtpunix[22245]: executed
 lmtpunix[22245]: accepted connection
 lmtpunix[22245]: connection from [unix socket] preauth'd as postman
 lmtpunix[22245]: verify_user(slack-14-1.fumlersoft.dk!user.joe) failed:
Mailbox does not exist

I'm totally lost, and have no idea where to look.

Regards
Mogens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20160613/6f3861c8/attachment.html>


More information about the Info-cyrus mailing list