imapd 2.5.7-8 with virtual domains and sendmail config

Stefan Suurmeijer stefan at raptorweb.nl
Mon Jun 13 08:42:01 EDT 2016


Hi Mogens,

I have almost the same config as you do. Except for not using
virtusertable. So I just ran a little test and got exactly the same
result that you did: it looks like virtusertable is never checked and
delivery fails.

I don't have a solution for you (yet), maybe someone on this list does,
but I do have a workaround if you need it. I also use userdb. Adding the
same entry you use in userdb solves the problem for me. Delivery goes
smoothly.

HTH
Stefan


On 06/13/2016 01:45 PM, Mogens Melander via Info-cyrus wrote:
> 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 <mailto: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 <mailto:Drafts at example.com>
> (\HasNoChildren)                            
> user/joe/Sent at example.com <mailto:Sent at example.com>
> (\HasNoChildren)                              
> user/joe/Trash at example.com <mailto:Trash at example.com>
> (\HasNoChildren)                             
> user/joe at example.com <mailto:joe at example.com>
> (\HasChildren)                                     
>
> I have an entry in virtusertable for domain at example.com
> <mailto:domain at example.com> mapping to
> joe at example.com <mailto:joe at example.com>
>
> example.com <http://example.com> is in local-host-names file.
>
> I have shaved my cyrusv2.mc <http://cyrusv2.mc> down to a bare
> minimum, and the relevant
> section in sendmail.cf <http://sendmail.cf> show the difference
> between cyrusv2.m4 and
> my cyrusv2.mc <http://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 <http://cyrusv2.mc> look like:
>
> include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
> VERSIONID(`@(#)cyrusv2.mc <http://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 <mailto: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
> <mailto:domain at example.com>) returns joe at example.com
> <mailto:joe at example.com>
>
> It looks promising, but then a ruleset 3,0 test
>
> echo "3,0 domain at example.com <mailto: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 <mailto: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
> <http://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
>
>
>
> ----
> Cyrus Home Page: http://www.cyrusimap.org/
> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
> To Unsubscribe:
> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

-- 
================================================================
Stefan Suurmeijer
Raptor Network & Web solutions
Dolomietstraat 46
NL-9743 VB Groningen, The Netherlands
tel: (+31) 50 363 9215 / (+31) 6 52 067 168 (cell)
E-mail: stefan at raptorweb.nl
================================================================

PGP fingerprint: 2CC6 5313 2F58 862F 1542 AECF 2385 6F8A BC45 9F86

Always acknowledge a fault. This will throw those in authority off their guard and give you an opportunity to commit more - Mark Twain

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20160613/99c0ed99/attachment-0001.html>


More information about the Info-cyrus mailing list