Making list owner (listname-owner) appear in Return Path
![](https://secure.gravatar.com/avatar/ee9aab70f469a2ce0b649c69f8f457e2.jpg?s=120&d=mm&r=g)
We are doing well in our migration from MJ2 to mailman.
The default of sending emails with the -bounce address doesn't fit with our needs. We'd like it to work the way it did with MJ2, where the listname-owner type of address was in the Return-Path. Typically we set our list owner to be some administrative email address which several of us can check for interesting items or bulk delete after some time. In other cases, the owner of some fund raising campaign wants to receive bounce notifications to see immediately what addresses are not current.
I think my answer is to edit SMTPDirect.py to set the Sender and Return Path, but I'm not sure what variable I need to use there. Is 'mlist.owner[:]' what I'll need? I'd want the specific list owner, not the site mailman owner.
None of these are publicly subscribe-able lists, so the features of bounce processing are not valuable to us.
Any suggestions?
--Donald
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
D G Teed wrote:
What you need is mlist.GetOwnerEmail() which will get the list-owner@example.com address.
You don't want mlist.owner[:] because that is a list and you can't have a list of addresses as the SMTP MAIL FROM address (envelope sender).
Any mail returned to the list-owner@example.com address gets delivered to the owner(s) and moderator(s).
None of these are publicly subscribe-able lists, so the features of bounce processing are not valuable to us.
There are lots of reasons why addresses on even non-public lists become undeliverable, but presumably, you are willing to deal with these manually.
If I understand what you want, you can accomplish it by finding the code
# Calculate the non-VERP envelope sender.
envsender = msgdata.get('envsender')
if envsender is None:
if mlist:
envsender = mlist.GetBouncesEmail()
else:
envsender = Utils.get_site_email(extra='bounces')
at the beginning of process() in SMTPDirect.py and changing it to
# Calculate the non-VERP envelope sender.
if mlist:
envsender = mlist.GetOwnerEmail()
else:
envsender = Utils.get_site_email(extra='owner')
The else: clause comes into play for messages that don't come from a list, e.g. monthly password reminders.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
Mark Sapiro wrote:
Actually, the above change is a bad idea. It should really be
# Calculate the non-VERP envelope sender.
envsender = msgdata.get('envsender')
if envsender is None:
if mlist:
envsender = mlist.GetOwnerEmail()
else:
envsender = Utils.get_site_email(extra='owner')
You shouldn't ignore the envsender in the message metadata. It exists to prevent bounce loops. I was thinking they wouldn't occur if the bounces were sent to the list owner directly, but of course, a list owner's address can be undeliverable for many reasons and loops can still occur.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/ee9aab70f469a2ce0b649c69f8f457e2.jpg?s=120&d=mm&r=g)
Hi, That is great. Thanks for the code snippets. Yes, dealing with the bounces manually is what we are largely looking for. I think this code is what we are needing. Thanks again...
On 6/29/07, Mark Sapiro <msapiro@value.net> wrote:
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
D G Teed wrote:
What you need is mlist.GetOwnerEmail() which will get the list-owner@example.com address.
You don't want mlist.owner[:] because that is a list and you can't have a list of addresses as the SMTP MAIL FROM address (envelope sender).
Any mail returned to the list-owner@example.com address gets delivered to the owner(s) and moderator(s).
None of these are publicly subscribe-able lists, so the features of bounce processing are not valuable to us.
There are lots of reasons why addresses on even non-public lists become undeliverable, but presumably, you are willing to deal with these manually.
If I understand what you want, you can accomplish it by finding the code
# Calculate the non-VERP envelope sender.
envsender = msgdata.get('envsender')
if envsender is None:
if mlist:
envsender = mlist.GetBouncesEmail()
else:
envsender = Utils.get_site_email(extra='bounces')
at the beginning of process() in SMTPDirect.py and changing it to
# Calculate the non-VERP envelope sender.
if mlist:
envsender = mlist.GetOwnerEmail()
else:
envsender = Utils.get_site_email(extra='owner')
The else: clause comes into play for messages that don't come from a list, e.g. monthly password reminders.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
Mark Sapiro wrote:
Actually, the above change is a bad idea. It should really be
# Calculate the non-VERP envelope sender.
envsender = msgdata.get('envsender')
if envsender is None:
if mlist:
envsender = mlist.GetOwnerEmail()
else:
envsender = Utils.get_site_email(extra='owner')
You shouldn't ignore the envsender in the message metadata. It exists to prevent bounce loops. I was thinking they wouldn't occur if the bounces were sent to the list owner directly, but of course, a list owner's address can be undeliverable for many reasons and loops can still occur.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/ee9aab70f469a2ce0b649c69f8f457e2.jpg?s=120&d=mm&r=g)
Hi, That is great. Thanks for the code snippets. Yes, dealing with the bounces manually is what we are largely looking for. I think this code is what we are needing. Thanks again...
On 6/29/07, Mark Sapiro <msapiro@value.net> wrote:
participants (2)
-
D G Teed
-
Mark Sapiro