[Mailman-Users] Remove sender from list?

Mark Sapiro msapiro at value.net
Wed May 10 20:35:15 CEST 2006


alan wrote:
>
>First, what is MUA? (Sorry, but I'm quite new in using mailing lists.)


Brad has answered this one.


>Second, the reason I'm bothering you all with this is to avoid sending big
>attachments back to the user and save him the trouble of seing mail again,
>as you said. But I have no trouble sending him the indication of reposting.


OK. That seems like a good reason.


>Now, since I'm a newbee, can you please explain this to me in more simpla
>way.
>This is What I understood:
>asumming user is "user1" and list is "123"
>To: 123;
>Cc:user1;


Yes, that's what I meant.


>I am using Thunderbird (or OE sometimes) as a mail client to post to the
>list.
>
>I don't understand this part of your answer:
>
>> instead of posting from
>> your MUA which will send the Cc:, post the message directly with
>> sendmail or equivalent, sending the envelope to the list only.


This is the tricky part. Of course, if you just sent the message
addressed as above, 'user1' would receive the direct Cc:, thus
defeating the attempt to spare the user from receiving it again.

This may be more trouble than it's worth, but what you'd need to do in
Tbird is compose/forward/whatever the entire post, addressed as above,
but instead of sending it, save it as a draft (you can't save it
directly as a file because that only saves the 'body'). Then open the
draft and save that as a file.

Now you have a file containing the raw message with headers including
the Cc: user1. Now you need to deliver that message to a mail server
with a recipient of *only* the list. Then it will be sent to the list
only, and Mailman will see the Cc: user1 and not send it to user1
assuming user1 has 'avoid dups' set in her options.

This last step is not easy in a MS Windows environment. If you have a
mail client that supports a 'resend' or 'redirect' operation, you
could open the message with that client and 'resend' it to the list,
but I don't think either MSOE or Tbird will do this.

The following is a minimal python script that can do this.

import sys
import smtplib
SMTPHOST = 'mail.example.com'
SMTPPORT = 25
SMTP_USERNAME = 'you at example.com'
SMTP_PASSWORD = 'yourpw'
fp = open(sys.argv[1])
msg = fp.read()
fp.close()
rcpts = [sys.argv[2]]
env = SMTP_USERNAME
x = smtplib.SMTP()
x.connect(SMTPHOST,SMTPPORT)
x.login(SMTP_USERNAME, SMTP_PASSWORD)
x.sendmail(env,rcpts,msg)
x.quit()

To use the above, you first have to install python
<http://www.python.org/> on your Windows computer. Then save the above
script in the file 'sendmail.py'. Then in a command window, give the
command

python path\to\sendmail.py path\to\saved\message 123 at example.com

This will send the saved message to 123 at example.com only, even though
the saved message contains a Cc: user1 header.

Certain obvious things need to be changed in the above script. Also,
this will only work with an SMTP server that uses user/password
authorization.

-- 
Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan




More information about the Mailman-Users mailing list