imapd 2.5.7-8 with virtual domains and sendmail config

Mogens Melander trasherdk at gmail.com
Wed Jun 15 11:06:25 EDT 2016


2016-06-13 21:36 GMT+07:00 Stefan Suurmeijer <stefan at raptorweb.nl>:

> On 06/13/2016 03:07 PM, Mogens Melander wrote:
> > Stefan,
> >
> > Thanks for your suggestion.
> >
> > The virtusertable is actually being used in my config. I think my
> > problem is in the cyrusv2 definition.
>
> I know. What I meant was that it looked like it wasn't processed correctly.
> Meanwhile I've found out that for me that happened because I forgot to
> add the test domain to local-host-names. Correcting that fixed my
> problem. With almost the same config your setup is now working for me.
>
> I have example.com in local-host-names and FEATURE(`use_cw_file') in
the .mc file. That's not it.

So it's interesting to see where your config differs from mine:
>
> I have
> Mcyrusv2,       P=[IPC], F=lsDFMnqXzA@/:|m,
>                 S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP
>                 T=DNS/RFC822/SMTP,
>                 A=FILE /var/lib/imap/socket/lmtp
>
> I got my lmtp socket in /var/imap/socket which I believe is the standard.

The Cyrus V2 Mailer specification from cyrusv2.m4 look like this:

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

And the same from my cyrusv2.mc file:

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

I took the E= out for now, as it doesn't seem to do anything.

So the same except for the E= item (I think that's to add > to quoted
> messages?).
>

The > quote thingy is done by the MUA. In my case SqirrelMail.

I'm not sure about what the E=\r\n but it was something about default line
endings,
witch later was changed to LF (\n) as default.

The last time I was fighting with issues like this it was because of the
> mailer definition. What happens if you remove the E= portion?
> I do understand correctly that the bottom mailer definition is the one
> you're using, right?
>

Both definitions end up in sendmail.cf, with the one from .m4 first,
followed
by the one from .mc immediately after.

>
> I'm also assuming the
> # Virtual user table (maps incoming users)
> Kvirtuser hash -o /etc/mail/virtusertable
> class is present in your sendmail.cf?
>
> Yes, it's in there.


> I use
> testdomain.nl             cyrusv2:/var/imap/socket/lmtp
> in mailertable
>
> Anything that you have different?
>
> Well. I'm not using mailertable. I want to use the virtuser function, to
forward
specific addresses to users on other servers.

When sending an mail to domain at example.com I know it's translated to
joe at example.com but the @example.com get stripped off, and servers
host.domain.tld added. From imap 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

# sendmail -bv domain at example.com
       domain at example.com... deliverable: mailer cyrusv2, user
joe at slack-14-1.fumlersoft.dk

# echo "3,0 domain at example.com" | sendmail -v -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> 3,0 domain at example.com
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

Weird. I'm still clueless.

Mogens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20160615/290bbd0b/attachment.html>


More information about the Info-cyrus mailing list