Subject: Help on sendmail-tmail & -procmail-dmail chain

From: "Enrico M.V. Fasanelli" <[email-masked]>
Date: Wed, 3 May 2000 17:11:09 +0200 (MET DST)

Dear Mark, dear all.

	Maybe that tis is not the correct list, my apologies if that.

	I've set up a imap-4.7c1-based imap/pop server using the default
mbx format and the user dir in /var/imap/<username>. Te box, a Digital
UNIX 4.0F, ha also sendmail 8.10.0.

	I've changed the Mlocal line in the /etc/mail sendmail.cf to force
the use of tmail:  

Mlocal, P=/usr/local/sbin/tmail, F=lsDFMAw5:/|@qPrn+,
                S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, E=\r\n,T=DNS/RFC822/X-Unix,
                A=tmail  $u

but if I send a message to [email-masked], the message
is delivered to INBOX. The folder prova.tmail exist (created via
Netscape 4.7 [en] - 19990915).

	In attach the extract of the mail.log file 

	Any hints ?

	TIA for Your help

	Greetings
						Enrico

      Enrico M.V. Fasanelli          Phone +39 0832 320.435/448
Istituto Nazionale Fisica Nucleare   Fax   +39 0832 325128
       Sezione di Lecce              mailto:[email-masked]
  Servizio di Calcolo & Reti         Via per Arnesano, I-73100 LECCE (Italy)

May  3 16:01:58 mbox sendmail[8618]: e43E1wA08618: from=<[email-masked]>, size=815, class=0, nrcpts=1, msgid=<[email-masked]>, proto=ESMTP, daemon=MTA, relay=OSFserver.le.infn.it [192.84.152.11]
May  3 16:01:58 mbox sendmail[8621]: e43E1wA08618: forward /afs/le.infn.it/user/e/enrico/.forward.mbox: World writable directory
May  3 16:01:58 mbox sendmail[8621]: e43E1wA08618: forward /afs/le.infn.it/user/e/enrico/.forward: World writable directory
May  3 16:01:58 mbox tmail[8622]: delivering to enrico+INBOX
May  3 16:01:58 mbox tmail[8622]: Verifying safe delivery to /var/imap/enrico/INBOX by UID 20207
May  3 16:01:58 mbox tmail[8622]: mbx appending to #driver.mbx/INBOX (file /var/imap/enrico/INBOX)
May  3 16:01:58 mbox tmail[8622]: delivered to /var/imap/enrico/INBOX
May  3 16:01:58 mbox tmail[8622]: Verifying safe delivery to /var/imap/enrico/INBOX by UID 20207
May  3 16:01:58 mbox tmail[8622]: all recipients delivered
May  3 16:01:58 mbox sendmail[8621]: e43E1wA08618: to=<[email-masked]>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30291, relay=prova.tmail, dsn=2.0.0, stat=Sent

---

From: "Andrej Borsenkow" <[email-masked]>
Date: Wed, 3 May 2000 19:29:05 +0400

> E=\r\n,T=DNS/RFC822/X-Unix,

A=tmail $u+$h

>
> but if I send a message to
> [email-masked], the message
> is delivered to INBOX.

Yes. sendmail splits user+detail into user part ($u) and detail ($h). It
is a kludge, admittedly ... O.K. it was so up to 8.9.x, I hope it was
not changed in 8.10.x

The folder prova.tmail exist (created via
> Netscape 4.7 [en] - 19990915).

-andrej

---

From: Mark Crispin <[email-masked]>
Date: Wed, 3 May 2000 09:13:50 -0700 (PDT)

According to the log, tmail never got the "+prova.tmail" part of the address.
So the problem is in the sendmail configuration.

I don't know enough about sendmail to say how to fix it, but I see that our
sendmail.cf has a separate "Mlocalplus" rule with "A=tmail -d $u+$h".  There's
also some other stuff that calls localplus.

---

From: "Enrico M.V. Fasanelli" <[email-masked]>
Date: Wed, 3 May 2000 18:33:29 +0200 (MET DST)

> > E=\r\n,T=DNS/RFC822/X-Unix,

	Thanks Andrej, the $u+$h work fine.

	Now the second part of the subject (I've dent the previous message
without write anithing on procmail-dmail)

	Anyone know (and tell me where to read) how to setup procmail
in order to use the dmail module and obtain then a mail delivered in a mbx
format folder ?

	Again TIA
					Enrico

---

From: "Andrej Borsenkow" <[email-masked]>
Date: Thu, 4 May 2000 10:08:12 +0400

> in order to use the dmail module and obtain then a mail

Well, I (and others) answered this more than once, but ... :-)

The procmail/dmail part is trivial. Assuming standard procmail MDA setup
(with +detail) something like

   ...........
#
# Executive Tech Support list
#

:0
* ^TOesi-tech-support@
{
    :0
     | /tools/bin/dmail +Incoming/"ESI tech support"
}

#
# Last resort. If we were given user+folder explicitly,
# try to deliver to this folder
#
:0
        | /tools/bin/dmail +$1

If no +detailt were given, $1 will be empty and "dmail +" will deliver
to INBOX.

As you see, there is no mailbox format specification. That's because
dmail will NOT create mailboxes (but happily deliver into whatever
format you happen to have) - you have to create mailbox in advance. Just
how exactly you do it - is another story alltogether :-) In short, you
either have to setup mbx format as default or use
#driver.mbx/path/to/file for mailbox name; on Unix you can use mbxcreat
utility.

-andrej