[Mailman-Developers] Re: -admin looping

Scott scott@chronis.icgroup.com
Sun, 20 Sep 1998 10:32:31 -0400


Hmm. I seem to have problems sending these messages.  Below is a
response I accidentally addressed to the -admin address.   And here is
yet another followup:

The patch below will not function properly for lists whose subscriber
list are identical to the owner address list.  I don't think this is a
normal situation, but it's probably best to make the change apply only
to messages directed at the -admin address exclusively 100% of the
time rather than 99.9+% of the time.

At any rate, since I'm no longer in danger of getting into another
-admin mail loop, I'll hold off until I hear something from one of the
other subscribers on the list.  

I really hope this idea takes hold because as a mail administrator of
an email forwarding service, I *know* it's a really bad idea to set
the envelope sender of messages to a forwarding address (the -admin
address) to the address itself.  The envelope sender should be passed
through.  To leave the envelope sender the same is just inviting nasty
mailloops...

scott

On Fri, Sep 18, 1998 at 07:52:10PM -0400, Scott wrote:
| Sorry 'bout the headers on this guy, that's what happens when you mess
| up in mutt have and  'edit_hdrs' set...
| 
| 
| Anyway:
| 
| On Fri, Sep 18, 1998 at 10:58:57PM +0000, Scott wrote:
| | Wouldn't it make sense to have the -admin address NOT set the envelope
| | sender to -admin, but to pass the original envelope sender through?  
| | 
| | If this change was made, any person who mailed a -admin address that
| | was down would receive the error message (rather than the defunct
| | -admin address receiving its own error messages ). 
| | 
| | If a subscriber address were to become defunct and bounce, then the
| | error message directed to the -admin address would have <> or mailer
| | daemon or some such as the envelope sender.  If the -admin address is
| | defunct and preserved the original envelope sender, then the doubly
| | bounced message would bounced back to the mailer daemon of the
| | original error reporting MTA, which again wouldn't cause a loop or
| | present any unusual problems.
| | 
| | The question then is how would it effect messages automatically sent
| | to the -admin address by mailman itself?  Messages to approve or deny
| | questionable post requests, and/or sending the passwords to the
| | -admin address (if the option is set) would have to have an envelope
| | sender set to something other than the -admin address. here we have a
| | few options: 
| 
| On second thought: with the idea of passing through the envelope
| sender, I don't belive that messages generated by mailman need to be
| altered at all, because any bounced message to a list owner address
| will return to the -admin address only once, at which point the
| envelope sender would no longer be "<listname-admin>", but the mailer
| daemon of the machine that bounced the message, so subsequent errors
| would go to that postmaster.
| 
| passing through the envelope senders may also cause errors with
| mailers set up to disallow relaying, even in the event the connection
| making the request is local.  I think most mailers will allow this
| *because* the connection *is* local, but some mailers or some
| configurations may not.  In this case, it makes sense to set the
| envelope sender to mailman-owner.
| 
| Below is a patch which sets the envelope sender to the sender of the
| message being delivered to the -admin address.  This will prevent
| -admin bounces from causing a loop.  If anyone wants to use this, and
| they want to have the sender set to mailman-owner instead of the
| original message sender, just replace "sender = msg.GetSender()" below
| with "sender = "mailman-owner" and apply the patch.
| 
| It is very bad to have -admin mail loops.
| 
| scott
| 
| --------------------------------------------------------------------------------
| patch  -set envelope sender of messages to -admin to sender of those messages
| --------------------------------------------------------------------------------
| *** Mailman/Deliverer.py	Fri Sep 18 19:25:28 1998
| --- /share/src/mailman-1.0b5/Mailman/Deliverer.py	Mon Jul 27 18:48:31 1998
| ***************
| *** 58,71 ****
|               del msg['reply-to']
|               msg.headers.append('Reply-To: %s\n' % self.GetListEmail())
|   	msg.headers.append('Sender: %s\n' % self.GetAdminEmail())
| !         #
| !         # only add errors to -admin if the recipients aren't the
| !         # list owners.  we also set the envelope sender differently
| !         # in this case below.  avoidance of mail loops to -admin
| !         # addresses must be strictly enforced.
| !         # 
| !         if self.owner != recipients:
| !             msg.headers.append('Errors-To: %s\n' % self.GetAdminEmail())
|   	msg.headers.append('X-BeenThere: %s\n' % self.GetListEmail())
|   
|           cmd = "%s %s" % (mm_cfg.PYTHON,
| --- 58,64 ----
|               del msg['reply-to']
|               msg.headers.append('Reply-To: %s\n' % self.GetListEmail())
|   	msg.headers.append('Sender: %s\n' % self.GetAdminEmail())
| ! 	msg.headers.append('Errors-To: %s\n' % self.GetAdminEmail())
|   	msg.headers.append('X-BeenThere: %s\n' % self.GetListEmail())
|   
|           cmd = "%s %s" % (mm_cfg.PYTHON,
| ***************
| *** 73,92 ****
|           cmdproc = os.popen(cmd, 'w')
|   
|           cmdproc.write("%d\n" % self.num_spawns)
| !         #
| !         # mailowner script calls this method and lists recipients as the
| !         # owner addresses of the list.  When a -admin address forwards
| !         # to a defunct address, this causes the resulting bounced
| !         # messages to go back to the -admin address, and there's a mail
| !         # loop.  So we work around this by passing the
| !         # envelope sender of the original message through in this case
| !         # instead of setting it to the -admin address.
| !         #
| !         if self.owner == recipients:    
| !             sender = msg.GetSender()
| !         else:
| !             sender = self.GetAdminEmail()
| !         cmdproc.write("%s\n" % sender)
|           for r in recipients:
|               # Mustn't send blank lines before end of recipients:
|               if not r: continue
| --- 66,72 ----
|           cmdproc = os.popen(cmd, 'w')
|   
|           cmdproc.write("%d\n" % self.num_spawns)
| !         cmdproc.write("%s\n" % self.GetAdminEmail())
|           for r in recipients:
|               # Mustn't send blank lines before end of recipients:
|               if not r: continue
| 
| 
| 
| 
| 
| 
|