Re: imapd 2.5.7-8 with virtual domains and sendmail config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stefan,

Thanks for your suggestion.

The virtusertable is actually being used in my config. I think my problem is in the cyrusv2 definition.

My virtusertable contains a mapping domain@xxxxxxxxxxx   joe@xxxxxxxxxxx

The domain part of the address is getting stripped off, and the servers host.domain.tld added, before talking to imapd over lmtp socket.

# sendmail -bv domain@xxxxxxxxxxx
domain@xxxxxxxxxxx... deliverable: mailer cyrusv2, user joe@xxxxxxxxxxxxxxxxxxxxxxxx

Suggestions welcome :)

Regards
Mogens


2016-06-13 19:42 GMT+07:00 Stefan Suurmeijer <stefan@xxxxxxxxxxxx>:
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@xxxxxxxxxxx is a valid user on cyrus, not a login (linux) user.

From cyradm:

localhost.localdomain> lm
user/joe/Drafts@xxxxxxxxxxx (\HasNoChildren)                            
user/joe/Sent@xxxxxxxxxxx (\HasNoChildren)                              
user/joe/Trash@xxxxxxxxxxx (\HasNoChildren)                             
user/joe@xxxxxxxxxxx (\HasChildren)                                     

I have an entry in virtusertable for domain@xxxxxxxxxxx mapping to
joe@xxxxxxxxxxx

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@xxxxxxxxxxx' | sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
 (0)p_lookup: virtuser (domain@xxxxxxxxxxx) returns joe@xxxxxxxxxxx

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

echo "3,0 domain@xxxxxxxxxxx" | 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@xxxxxxxxxxx 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



----
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@xxxxxxxxxxxx
================================================================

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

----
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

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux