
I'm trying to use MailMan for its listserve features only. In other words I have _NO_ (ooops) need for the web site interface. In fact, there will be only one person that sends to the list. I'd like to customize the email that is sent out to the list but cannot seem to find a template for that. I'd like to remove things contained in the header including the following:
List-Help: <mailto:sonjaspears-request@SonjaSpears.com?subject=help> List-Post: <mailto:sonjaspears@SonjaSpears.com> List-Subscribe: <http://www.SonjaSpears.com/mailman/listinfo/sonjaspears>, <mailto:sonjaspears-request@SonjaSpears.com?subject=subscribe> List-Id: Sonja Spears Mailing list <sonjaspears.SonjaSpears.com> List-Unsubscribe: <http://www.SonjaSpears.com/mailman/listinfo/sonjaspears>, <mailto:sonjaspears-request@SonjaSpears.com?subject=unsubscribe> List-Archive: <http://www.SonjaSpears.com/pipermail/sonjaspears/>
As I'm using a MySQL table to pull email addresses for the list Canceling through the "normal" method "doesn't work". Users will email the admin directly and they will remove them from the list via a seperate back-end feature not related to Mailman.
Anyone know where the template is that builds the email sent to list users?
-- -Doug

On Tuesday 04 June 2002 02:00 pm, Doug La Farge wrote:
header including the following:
List-Help: <mailto:sonjaspears-request@SonjaSpears.com?subject=help> List-Unsubscribe:
Are you sure you don't want to leave these two in? Generally it's considered good netiquette to make it easy for people to exit a list of which they, for whatever reason, no longer wish to be a member. Or they may wish to set their subscriptions to digest mode, or temporarily turn off mail while on vacation. The list-help address is useful in documenting how to do these things.
Scott
-- -----------------------+------------------------------------------------------ Scott Courtney | "I don't mind Microsoft making money. I mind them courtney@4th.com | having a bad operating system." -- Linus Torvalds http://www.4th.com/ | ("The Rebel Code," NY Times, 21 February 1999)

The avenue for being removed is not through any Mailman functionality. The footer for the email will have instructions for how to leave the list. Basically, the user must email the Admin who will then remove the user from a Contact List manager - which is where all of the email addresses originate. Again, I'm using separate functionality to collect email addresses. There is a one way stream from the MySQL database to the MailMan list. The Admin is using the list to send out a weekly news letter - that is the only piece of email that should ever be sent to the list. With this in mind there is little instruction needed other than how to unsubscribe. It occurs to me that Mailman is overkill for our needs. I thought about hacking a script to edit the virtualusertable file with sendmail to simply send to an alias. This leaves a security hole
- anyone can send to the alias which is not desired.
So where's the template for the email that's sent out? :-)
At 3:07 PM -0400 6/4/02, Scott Courtney wrote:
On Tuesday 04 June 2002 02:00 pm, Doug La Farge wrote:
header including the following:
List-Help: <mailto:sonjaspears-request@SonjaSpears.com?subject=help> List-Unsubscribe:
Are you sure you don't want to leave these two in? Generally it's considered good netiquette to make it easy for people to exit a list of which they, for whatever reason, no longer wish to be a member. Or they may wish to set their subscriptions to digest mode, or temporarily turn off mail while on vacation. The list-help address is useful in documenting how to do these things.
Scott
-- -----------------------+------------------------------------------------------ Scott Courtney | "I don't mind Microsoft making money. I mind them courtney@4th.com | having a bad operating system." -- Linus Torvalds http://www.4th.com/ | ("The Rebel Code," NY Times, 21 February 1999)
Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
-- -Doug

On Tuesday 04 June 2002 03:15 pm, Doug La Farge wrote: [...]
I thought about hacking a script to edit the virtualusertable file with sendmail to simply send to an alias. This leaves a security hole
- anyone can send to the alias which is not desired.
I tend to agree that having e-mail access to scripts that update files anywhere in /etc is a Very Bad Idea (TM) from a security standpoint.
So where's the template for the email that's sent out? :-)
Look in the Mailman/Defaults.py file for the DEFAULT_MSG_FOOTER parameter. Don't change it in this file, but instead copy these lines to your own Mailman/mm_cfg.py file and then edit as you wish.
This affects new lists being created. To change an existing list, the config is stored under lists/<listname>/config.pck as a "pickle" file. You'll need to use Python, preferably the web admin interface, to change it.
Scott
-- -----------------------+------------------------------------------------------ Scott Courtney | "I don't mind Microsoft making money. I mind them courtney@4th.com | having a bad operating system." -- Linus Torvalds http://www.4th.com/ | ("The Rebel Code," NY Times, 21 February 1999)

Look in the Mailman/Defaults.py file for the DEFAULT_MSG_FOOTER parameter. Don't change it in this file, but instead copy these lines to your own Mailman/mm_cfg.py file and then edit as you wish.
This doesn't appear to be what I'm looking for. DEFAULT_MSG_FOOTER contains the default footer info that is easily editable through the admin interface under Regular-member (non-digest) Options. I don't need this on a global level - just for one particular list. The DEFAULT_MSG_HEADER is defaulted to blank. If I change that in the admin area it places that info below the lines I'm trying to get rid of. Any other leads/ideas?
Thanks again....
This affects new lists being created. To change an existing list, the config is stored under lists/<listname>/config.pck as a "pickle" file. You'll need to use Python, preferably the web admin interface, to change it.
Scott
-- -----------------------+------------------------------------------------------ Scott Courtney | "I don't mind Microsoft making money. I mind them courtney@4th.com | having a bad operating system." -- Linus Torvalds http://www.4th.com/ | ("The Rebel Code," NY Times, 21 February 1999)
Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
-- -Doug

<quote who="Doug La Farge">
The avenue for being removed is not through any Mailman functionality.
why do you need mailman?
for $name in list_of_emails sendmail $name < letter.txt end
(clean that up to talk to your SQL database and do the pulls, etc).
-- You are responsible for your rose. "Rule 5: Get Kirsten Dunst wet" (p 74 of Time 20-05-02)

At 2:58 PM -0600 6/4/02, LuKreme wrote:
<quote who="Doug La Farge">
The avenue for being removed is not through any Mailman functionality.
why do you need mailman?
Because the user of this list needs to be able to send from their Outlook Express client with all the fancy images and formatting. It's a bit of a tedious job to "migrate" the email produced in Outlook containing all those either local or remote images to a web form or text file. Currently I have functionality that allows the Admin to send their newsletter via a web form interface but here again it's tough to get the images and formatting "just right". I'm certainly open to suggestions on other ways of doing this but it needs to be "dumbed-down" to users that only understand Outlook Express. Know what I mean? :-\
for $name in list_of_emails sendmail $name < letter.txt end
(clean that up to talk to your SQL database and do the pulls, etc).
Yeah, I've got a basic little Perl script that already does this including the SQL pull. Heck, maybe I can have sendmail write the file to "letter.txt" and run a cron job to send it. I guess the question is where will the images end up....
-- You are responsible for your rose. "Rule 5: Get Kirsten Dunst wet" (p 74 of Time 20-05-02)
Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
-- -Doug

On Tuesday 04 June 2002 05:07 pm, Doug La Farge wrote:
Because the user of this list needs to be able to send from their Outlook Express client with all the fancy images and formatting. It's a bit of a tedious job to "migrate" the email produced in Outlook containing all those either local or remote images to a web form or text file. Currently I have functionality that allows the Admin to send their newsletter via a web form interface but here again it's tough to get the images and formatting "just right". I'm certainly open to suggestions on other ways of doing this but it needs to be "dumbed-down" to users that only understand Outlook Express. Know what I mean? :-\
Perhaps you are working very hard to solve the wrong problem. If the users truly need to fill out a web form, wouldn't it be easier to maintain that form on the web site, and send a URL for the users to click? Practically all GUI- based email clients now support clicking on URLs embedded even in plain-text messages.
How many people receive this mailing? If you can reduce it down to plain text with a link, or even a simple MIME message of Content-type: text/html, you will greatly reduce the amount of bytes your MTA must handle and you will improve performance. What you are proposing to do also will not work for recipients who have HTML email turned off, as quite a few people do for reasons of security or privacy.
If your users are nontechnical, putting the handling of the web forms totally on the server allows you to give them much better direct support, allows you to more easily leverage your previous work (I get the impression that there are differences with every issue but also some fundamental similarities from one to the next), and is compatible with a much larger variety of email clients. It also allows you to make revisions and correct mistakes in the form even after the emails are being sent.
I'm not trying to knock the application itself, but you asked for alternative approaches and I'm suggesting one. Why try to turn an email program into a web browser when users have a perfectly good browser already, and even the most illiterate user can understand how to click on a link in a text message?
If you really must send out web forms, consider using the Perl, PHP, or Java libraries that can generate multipart MIME messages, and then feeding the output to a standard SMTP library function using the algorithm suggested by another member of this list (basically a database row iteration). I agree with the other poster -- if you are disabling all the subscribe/unsubscribe and web-based features of Mailman, and using it only as a mass mailer, you are not using 90% of its capabilities, and there are much better ways to accomplish what you need, with less overhead and less complexity.
Perhaps if you could give us a better idea of the specifics of the application, with particular regard to the form itself, as well as the size and nature of the intended subscription base, we could offer further suggestions that are more targeted to your needs. Nonetheless, I hope that one or more of the ideas I've suggested above might be of benefit, perhaps triggering further ideas of your own.
Kind regards,
Scott
-- -----------------------+------------------------------------------------------ Scott Courtney | "I don't mind Microsoft making money. I mind them courtney@4th.com | having a bad operating system." -- Linus Torvalds http://www.4th.com/ | ("The Rebel Code," NY Times, 21 February 1999)

On Jun 4, 2002 at 14:07, Doug La Farge wrote:
Because the user of this list needs to be able to send from their Outlook Express client with all the fancy images and formatting.
Yeah, I've got a basic little Perl script that already does this including the SQL pull. Heck, maybe I can have sendmail write the file to "letter.txt" and run a cron job to send it. I guess the question is where will the images end up....
Scott Courtney has some very good suggestions. Here's mine. Have your OE user send the form to a specific address on your mailserver.
Now the magic starts. Have sendmail (or whoever) hand the email off to your perl script, which can then inject it back into the mail system with appropriate SMTP envelopes, leaving the SMTP body alone.
I still prefer Scott's solution, but YMMV.
-- Satya. <URL:http://satya.virtualave.net/> A year spent in artificial intelligence is enough to make one believe in God.

I think scott basically said this, but to simplify matters: if your user wants to send a webpage instead of an email, post the webpage on the intranet and email the URL to the intended recipients.
~steven
-----Original Message----- From: mailman-users-admin@python.org [mailto:mailman-users-admin@python.org] On Behalf Of Satya Sent: Tuesday, June 04, 2002 4:03 PM To: mailman-users@python.org Subject: Re: [Mailman-Users] Email Header
On Jun 4, 2002 at 14:07, Doug La Farge wrote:
Because the user of this list needs to be able to send from their Outlook Express client with all the fancy images and formatting.
Yeah, I've got a basic little Perl script that already does this including the SQL pull. Heck, maybe I can have sendmail write the file to "letter.txt" and run a cron job to send it. I guess the question is where will the images end up....
Scott Courtney has some very good suggestions. Here's mine. Have your OE user send the form to a specific address on your mailserver.
Now the magic starts. Have sendmail (or whoever) hand the email off to your perl script, which can then inject it back into the mail system with appropriate SMTP envelopes, leaving the SMTP body alone.
I still prefer Scott's solution, but YMMV.
-- Satya. <URL:http://satya.virtualave.net/> A year spent in artificial intelligence is enough to make one believe in God.
Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py

Thanks one and all for the ideas. LuKreme started me off on the "right" track. I think I now have it dialed in.
using .procmailrc:
:0
- ^To:.*newsletter
- ^Subject:.*Newsletter | ./sendletter.pl
Looking at sendletter.pl:
#!/usr/bin/perl use Mail::Sendmail;
while (<>){ $email .= $_ } $sql = "select email from users"; #loop the SQL call %mail = ( To => "#emailaddress", From => 'ournewsletter@foo.com', Subject => 'Our weekly news letter', Message => "$email" ); sendmail(%mail) or die $Mail::Sendmail::error; #end the SQL call
Some trickery is still require to strip out all the header info and just grab the body.
So Mailman is bagged - and probably for the better. It's cool so it will stay in my bag of tricks if needed again. If anyone is interested in the final script email me and let me know. I'll send you the full working version.
Again, thanks for all the input!
At 4:28 PM -0700 6/4/02, Steven Shults wrote:
I think scott basically said this, but to simplify matters: if your user wants to send a webpage instead of an email, post the webpage on the intranet and email the URL to the intended recipients.
~steven
-----Original Message----- From: mailman-users-admin@python.org [mailto:mailman-users-admin@python.org] On Behalf Of Satya Sent: Tuesday, June 04, 2002 4:03 PM To: mailman-users@python.org Subject: Re: [Mailman-Users] Email Header
On Jun 4, 2002 at 14:07, Doug La Farge wrote:
Because the user of this list needs to be able to send from their Outlook Express client with all the fancy images and formatting.
Yeah, I've got a basic little Perl script that already does this including the SQL pull. Heck, maybe I can have sendmail write the file to "letter.txt" and run a cron job to send it. I guess the question is where will the images end up....
Scott Courtney has some very good suggestions. Here's mine. Have your OE user send the form to a specific address on your mailserver.
Now the magic starts. Have sendmail (or whoever) hand the email off to your perl script, which can then inject it back into the mail system with appropriate SMTP envelopes, leaving the SMTP body alone.
I still prefer Scott's solution, but YMMV.
-- Satya. <URL:http://satya.virtualave.net/> A year spent in artificial intelligence is enough to make one believe in God.
Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
-- -Doug

(04/06/2002 17:13) Doug La Farge:
using .procmailrc:
:0
- ^To:.*newsletter
- ^Subject:.*Newsletter | ./sendletter.pl
Looking at sendletter.pl:
#!/usr/bin/perl use Mail::Sendmail;
while (<>){ $email .= $_ } $sql = "select email from users"; #loop the SQL call %mail = ( To => "#emailaddress", From => 'ournewsletter@foo.com', Subject => 'Our weekly news letter', Message => "$email" ); sendmail(%mail) or die $Mail::Sendmail::error; #end the SQL call
Some trickery is still require to strip out all the header info and just grab the body.
It can easily be done within the procmail recipe:
:0
SELECTING RULES { :0 fBw | sendletter.pl
# apply further rules to the MAIL e.g save to another mailbox # or pipe/save into /dev/null # ... :0 a..... ... }
The trick is the "B" switch: "f"ilter "B"ody and "w"ait.
-- Sinan Kaan Yerli <sinan@skyerli.org>
participants (6)
-
Doug La Farge
-
LuKreme
-
Satya
-
Scott Courtney
-
Sinan Kaan Yerli
-
Steven Shults