From: Greg Hurrell on
Just one more question (I think!), Andrzej.

After a little bit more testing, I realize that it isn't actually
working like I though it was. It's connecting to smmapd and giving the
correct answer, but when mail is accepted for a real user it's just
dropped on the floor rather than being delivered to the mailbox by
lmtp. Is it possible that I've made a mistake in my sendmail.mc?

Here is an excerpt showing the old config:

define(`confLOCAL_MAILER', `cyrusv2')dnl
define(`CYRUSV2_MAILER_ARGS', `FILE /var/lib/imap/socket/lmtp')dnl
MAILER(cyrusv2)dnl

And here is what I replaced that with:

define(`SMMAP_SOCKET',`/var/lib/imap/socket/smmapd')dnl
define(`CYRUS_LMTP_SOCKET',`/var/lib/imap/socket/lmtp')dnl
F{VCyrusDomains}/etc/mail/cyrus-virtual-domains
FEATURE(`anfi/vcyrus')dnl
MAILER(`anfi/cyrusv3')dnl

In the past I would see sendmail echo "stat=Sent" and then immediately
after, something like this:

Mar 29 20:20:40 wincent1 lmtpunix[6603]: accepted connection
Mar 29 20:20:40 wincent1 lmtpunix[6603]: lmtp connection preauth'd
as postman
... etc

But now I just see "stat=Sent" and lmtpunix never appears in the log;
the mail gets dropped on the floor and is presumably gone forever. So
I wonder what I'm doing wrong... lmtpd is definitely running, and the
socket is in place at the specified path.

Cheers,
Wincent

From: Andrzej Adam Filip on
Greg Hurrell <greg.hurrell(a)gmail.com> wrote:

> Just one more question (I think!), Andrzej.
>
> After a little bit more testing, I realize that it isn't actually
> working like I though it was. It's connecting to smmapd and giving the
> correct answer, but when mail is accepted for a real user it's just
> dropped on the floor rather than being delivered to the mailbox by
> lmtp. Is it possible that I've made a mistake in my sendmail.mc?
>
> Here is an excerpt showing the old config:
>
> define(`confLOCAL_MAILER', `cyrusv2')dnl
> define(`CYRUSV2_MAILER_ARGS', `FILE /var/lib/imap/socket/lmtp')dnl
> MAILER(cyrusv2)dnl
>
> And here is what I replaced that with:
>
> define(`SMMAP_SOCKET',`/var/lib/imap/socket/smmapd')dnl
> define(`CYRUS_LMTP_SOCKET',`/var/lib/imap/socket/lmtp')dnl
> F{VCyrusDomains}/etc/mail/cyrus-virtual-domains
> FEATURE(`anfi/vcyrus')dnl
> MAILER(`anfi/cyrusv3')dnl
>
> In the past I would see sendmail echo "stat=Sent" and then immediately
> after, something like this:
>
> Mar 29 20:20:40 wincent1 lmtpunix[6603]: accepted connection
> Mar 29 20:20:40 wincent1 lmtpunix[6603]: lmtp connection preauth'd
> as postman
> ... etc
>
> But now I just see "stat=Sent" and lmtpunix never appears in the log;
> the mail gets dropped on the floor and is presumably gone forever. So
> I wonder what I'm doing wrong... lmtpd is definitely running, and the
> socket is in place at the specified path.

Could you post log entries generated by RTCyrus3?

Do two tests:
1) What sendmail selects for delivery?
sendmail -bv valid_cyrus_account(a)cyrus.virtual.domain
sendmail -bv invalid_cyrus_account(a)cyrus.virtual.domain

2) Send one message as root in verbose mode

(echo "subject: test"; echo) | sendmail -v valid_cyrus_account(a)cyrus.virtual.domain


--
[pl>en: Andrew] Andrzej Adam Filip : anfi(a)priv.onet.pl : anfi(a)xl.wp.pl
Open-Sendmail: http://open-sendmail.sourceforge.net/
Unless you love someone, nothing else makes any sense.
-- e.e. cummings
From: Wincent Colaiuta on
On 30 mar, 03:02, Andrzej Adam Filip <a...(a)onet.eu> wrote:
>
> Do two tests:
> 1) What sendmail selects for delivery?
> sendmail -bv valid_cyrus_acco...(a)cyrus.virtual.domain
> sendmail -bv invalid_cyrus_acco...(a)cyrus.virtual.domain

It does the right thing here:

$ sendmail -bv foo(a)wincent.com
foo(a)wincent.com... User unknown
$ sendmail -bv win(a)wincent.com
win(a)wincent.com... deliverable: mailer local, user win_example_com

> 2) Send one message as root in verbose mode
>
> (echo "subject: test"; echo) | sendmail -v valid_cyrus_acco...(a)cyrus.virtual.domain
>

This works, as you can see, but it uses the "local" mailer instead of
the "anfi/cyrusv3" one (will paste the log excerpt below):

# (echo "subject: test"; echo) | sendmail -v win(a)wincent.com
win(a)wincent.com... Connecting to [127.0.0.1] via relay...
220 wincent1.inetu.net ESMTP Sendmail 8.13.8/8.13.8; Sat, 29 Mar 2008
21:17:27 -0400
>>> EHLO wincent1.inetu.net
250-wincent1.inetu.net Hello localhost.localdomain [127.0.0.1],
pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5 LOGIN PLAIN
250-STARTTLS
250-DELIVERBY
250 HELP
>>> STARTTLS
220 2.0.0 Ready to start TLS
>>> EHLO wincent1.inetu.net
250-wincent1.inetu.net Hello localhost.localdomain [127.0.0.1],
pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5 LOGIN PLAIN
250-DELIVERBY
250 HELP
>>> MAIL From:<root(a)wincent1.inetu.net> SIZE=15 AUTH=root(a)wincent1.inetu.net
250 2.1.0 <root(a)wincent1.inetu.net>... Sender ok
>>> RCPT To:<win(a)wincent.com>
>>> DATA
250 2.1.5 <win(a)wincent.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 m2U1HRS8008108 Message accepted for delivery
win(a)wincent.com... Sent (m2U1HRS8008108 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 wincent1.inetu.net closing connection

And here is the correspnding log excerpt:

Mar 29 21:17:27 wincent1 sendmail[8108]: STARTTLS=server,
relay=localhost.localdomain [127.0.0.1], version=TLSv1/SSLv3,
verify=NO, cipher=DHE-RSA-AES256-SHA, bits=256/256
Mar 29 21:17:27 wincent1 sendmail[8108]: m2U1HRS8008108:
from=<root(a)wincent1.inetu.net>, size=301, class=0, nrcpts=1,
msgid=<200803300117.m2U1HR7N008107(a)wincent1.inetu.net>, proto=ESMTP,
daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Mar 29 21:17:27 wincent1 sendmail[8109]: m2U1HRS8008108:
to=<win(a)wincent.com>, ctladdr=<root(a)wincent1.inetu.net> (0/0),
delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30590, dsn=2.0.0,
stat=Sent

Note the "mailer=local" there in the last entry. That's all there is;
no lmtpunix entries follow. Compare that with how things are without
RTCyrus3:

Mar 29 21:20:00 wincent1 sendmail[8220]: m2U1Jxh3008220:
to=win(a)wincent.com, delay=00:00:01, xdelay=00:00:01, mailer=cyrusv2,
pri=34431, relay=localhost [[UNIX: /var/lib/imap/socket/lmtp]],
dsn=2.0.0, stat=Sent

Which is then followed by a bunch of lmtpunix entries...

W

From: Andrzej Adam Filip on
Wincent Colaiuta <win(a)wincent.com> wrote:

> On 30 mar, 03:02, Andrzej Adam Filip <a...(a)onet.eu> wrote:
>>
>> Do two tests:
>> 1) What sendmail selects for delivery?
>> sendmail -bv valid_cyrus_acco...(a)cyrus.virtual.domain
>> sendmail -bv invalid_cyrus_acco...(a)cyrus.virtual.domain
>
> It does the right thing here:
>
> $ sendmail -bv foo(a)wincent.com
> foo(a)wincent.com... User unknown

It is right.

> $ sendmail -bv win(a)wincent.com
> win(a)wincent.com... deliverable: mailer local, user win_example_com

It is not right answer for RTCyrus3.
It does not use local mailer, it does not strip domain part of recipient.

Do you use RTCyrus3 of one of RTCyru2 variants? [Which one?]


>> 2) Send one message as root in verbose mode
>>
>> (echo "subject: test"; echo) | sendmail -v valid_cyrus_acco...(a)cyrus.virtual.domain
>>
>
> This works, as you can see, but it uses the "local" mailer instead of
> the "anfi/cyrusv3" one (will paste the log excerpt below):
> [...]

To get meaningful result you should also use (as root) additional -Am
command line switch I have forgotten to mention :-)

> And here is the correspnding log excerpt:
> [...]
> Mar 29 21:17:27 wincent1 sendmail[8109]: m2U1HRS8008108:
> to=<win(a)wincent.com>, ctladdr=<root(a)wincent1.inetu.net> (0/0),
> delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30590, dsn=2.0.0,
> stat=Sent
>
> Note the "mailer=local" there in the last entry. That's all there is;
> no lmtpunix entries follow. Compare that with how things are without
> RTCyrus3:
>
> Mar 29 21:20:00 wincent1 sendmail[8220]: m2U1Jxh3008220:
> to=win(a)wincent.com, delay=00:00:01, xdelay=00:00:01, mailer=cyrusv2,
> pri=34431, relay=localhost [[UNIX: /var/lib/imap/socket/lmtp]],
> dsn=2.0.0, stat=Sent
>
> Which is then followed by a bunch of lmtpunix entries...

Send me (via email) results of the test given below:
1)
echo '3,0 valid_a(a)cyrus.virtual.domain' | sendmail -d21.12 -d60.5 -bt
2)
echo '5 valid_a(a)cyrus.virtual.domain' | sendmail -d21.12 -d60.5 -bt
3) echp '=M' | sendmail -bt | grep local


--
[pl>en: Andrew] Andrzej Adam Filip : anfi(a)priv.onet.pl : anfi(a)xl.wp.pl
Open-Sendmail: http://open-sendmail.sourceforge.net/
"Irrigation of the land with seawater desalinated by fusion power is ancient.
It's called 'rain'."
-- Michael McClary, in alt.fusion
From: Wincent Colaiuta on
On 30 mar, 11:35, Andrzej Adam Filip <a...(a)onet.eu> wrote:
> Wincent Colaiuta <w...(a)wincent.com> wrote:
> > On 30 mar, 03:02, Andrzej Adam Filip <a...(a)onet.eu> wrote:
>
> >   $ sendmail -bv w...(a)wincent.com
> >   w...(a)wincent.com... deliverable: mailer local, user win_example_com
>
> It is not right answer for RTCyrus3.
> It does not use local mailer, it does not strip domain part of recipient.
>
> Do you use RTCyrus3 of one of RTCyru2 variants? [Which one?]

This is with RTCyrus3 1.0 downloaded from the SourceForge page. I
never actually installed or tried any other variant.

> >> 2) Send one message as root in verbose mode
>
> >> (echo "subject: test"; echo) | sendmail -v valid_cyrus_acco...(a)cyrus.virtual.domain
>
> To get meaningful result you should also use (as root) additional -Am
> command line switch I have forgotten to mention :-)

For bad user:

bad(a)wincent.com... User unknown
root... aliased to win(a)wincent.com
/root/dead.letter... Saved message in /root/dead.letter

For good user:

win(a)wincent.com... Connecting to local...
win(a)wincent.com... Sent

> Send me (via email) results of the test given below:
> 1)
> echo '3,0 vali...(a)cyrus.virtual.domain' | sendmail -d21.12 -d60.5 -bt
> 2)
> echo '5 vali...(a)cyrus.virtual.domain' | sendmail -d21.12 -d60.5 -bt
> 3) echp '=M' | sendmail -bt | grep local

Ok, I'll see what I can come up with and forward it to you.

Cheers,
Wincent