[Mailman-Users] Re: Sendmail vs. envelope sender

Harald Meland Harald.Meland at usit.uio.no
Tue Jun 15 22:03:23 CEST 1999

[Christopher Lindsey]

> > You know, it looks like a LOT of people have this error, from looking at my
> > mailbox over the last month or so!  I have some ideas about why that is.
> > Barry wrote that he couldn't reproduce it on his machine, so perhaps they
> > have turned it off in later versions... I am still on 8.8.7... Anyway, this
> > is the Sendmail that comes on the RedHat distribution... I think at least a
> > few people will have it.
> It still happens in sendmail 8.9.3 for me, and yes, you are 100% right 
> about why it happens.


> > This is further explained on sendmail.org at the following URL:
> > http://www.sendmail.org/faq/section3.html#3.15
> I personally feel that it's a bug on sendmail's part; according to the
> sendmail "bat" book, only aliases that use the 'include:' directive 
> have the envelope rewritten, yet it appears to happen with *any* 
> alias -- be it a pipe, redirect, or whatever.  


> > If the default behavior is left alone, at the very least this info should
> > make it into the documentation (under "Troubleshooting" in the "Why doesn't
> > member_posting_only work?").  If you go to the trouble of instructing
> > people how to turn off the envelope sender option, why not educate them
> > about the problem they're likely to be having first? 

Yup, I'll add some text explaining this sendmail feature.

> > I have removed all my owner-* aliases (actually, having learned my lesson
> > from the listproc days, I never put them in) and envelope sender works fine.
> I'm not contesting that it works for you -- just wanted to get that
> clear first.  :)  However, I have had people send mail to owner-listname
> in the past because it's sort of an unofficial standard.

... but of course it is -- there's even an _sendmail feature_ to ease
implementation of it.  Blech.  Makes me wanna cry, really.

> Sorry.  I think I'm tired...  I just hate making exceptions for software that
> changes the rules...

Me too.  Nevertheless, here's a patch to try specialcasing away those
broken sendmail envelope addresses (and fall back to GetSender()).
The patch (at least) assumes that your "owner-" aliases are inserted
as output by bin/newlist, i.e.

  owner-listname:               listname-admin

I'm not using sendmail myself, so I can't verify whether this works at
all -- please let me know whatever your findings are.

Index: MailList.py
RCS file: /export/public/cvsroot/mailman/Mailman/MailList.py,v
retrieving revision 1.126
diff -u -r1.126 MailList.py
--- MailList.py	1999/06/15 07:50:54	1.126
+++ MailList.py	1999/06/15 19:52:37
@@ -1175,7 +1175,13 @@
         sender = None
         if mm_cfg.USE_ENVELOPE_SENDER:
             sender = msg.GetEnvelopeSender()
-        if not sender:
+        # Specialcase an ugly sendmail feature: If there exists an
+        # "owner-foo: bar" alias and sendmail receives mail for address
+        # "foo", sendmail will change the envelope sender of the message
+        # to "bar" before delivering.  This feature does not appear to
+        # be configurable.  *Boggle*.
+        if (not sender or sender[:len(self._internal_name)+6] ==
+            '%s-admin' % self._internal_name):
             sender = msg.GetSender()
 ##        sys.stderr.write('envsend: %s, sender: %s\n' %
 ##                         (msg.GetEnvelopeSender(), msg.GetSender()))


More information about the Mailman-Users mailing list