As requested, I am posting my patch to sendmail that allows plus addressing
to work properly between Sendmail and LMTP.  We connect to our LMTP via TCP
in the sendmail configuration and I have never been able to get +addressing
to work at all.  I usually get a "user unknown" error, rejecting the e-mail.

Note: If you use the old "cyrus" mailer that calls "deliver" to deliver the
e-mail, plus addressing works just fine there.  You need to include the
FEATURE(`preserve_local_plus_detail') line in the MC file, though.

Anyways, the patch code is only enabled if you include the '&' flag in the
cyrus mailer definition.  Once enabled, when sendmail determines if the
user is valid, it will stop at the '+' character in the username portion of
the e-mail address.  Also, sendmail typically lowercases the username, so
again, it will stop at the '+' when doing the lowercasing.  This allows the
folder names to have their casing preserved.

For testing purposes, I created "test1", "test box1", "Test2", and "Test
Box2" folders and added "anyone: post" ACLs on all of them.  I then used
the following e-mail addresses to test:

 [EMAIL PROTECTED]
 user+test\ [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 user+Test\ [EMAIL PROTECTED]

The only reason I said anything about how I tested is that it isn't common
knowledge about how to test with mailboxes containing spaces in them.  So,
there you have it.

I have submitted the patch to sendmail, so maybe it will get into the next
version... who knows...  The patch applies to sendmail-8.13.0.  I had to
change the flag I was using to an '&'.  My previous version was using 'W',
which now appears to be in use already in 8.13.0.  Ah well.

Thanks,
Scott
--
+-----------------------------------------------------------------------+
     Scott W. Adkins                http://www.cns.ohiou.edu/~sadkins/
  UNIX Systems Engineer                  mailto:[EMAIL PROTECTED]
       ICQ 7626282                 Work (740)593-9478 Fax (740)593-1944
+-----------------------------------------------------------------------+
    PGP Public Key available at http://www.cns.ohiou.edu/~sadkins/pgp/

Attachment: lmtp-8.13.0.patch
Description: Binary data


Attachment: pgprVunpJ7fhB.pgp
Description: PGP signature

Reply via email to