mass mailing
William Park
opengeometry at NOSPAM.yahoo.ca
Tue Apr 23 13:23:20 EDT 2002
Jonathan Vanasco <jvanasco at hotmail.com> wrote:
> yeah.. thats what i've figured.. i've been playing around with it lately,
> trying to move some of perl's Mail::Bulkmail features into python, based
> on the mailman code... i think what is going to end up happening, is
> sorting a list of emails by domain name, then processing the domains into
> chunks of 100 or less, and feeding those, via smtplib to postfix as a ,
> delimited list (or so the rfc specks say will work)
>
> ideally, that will mean 1 envelope/message per chunk -- so my bandwidth
> and qfiles could go down from anywhere between 100 and 0 %
>
> the extra coding is worth it though -- checking through the mailman
> archives, someone from gnu.org had major problems handling 50,000 emails.
> granted -- this project may never receive more than 100 emails. but
> should it go higher, i want to be prepared. and not recoding something
> under a shitty support rate vs an inflated development one :)
I assume you're the OP of another thread on similiar topics. My news
server lost your original post there. So, sorry if I'm repeating...
- Python would be most useful in generating and formating email
messages (ie. header and body).
- Once you have the messages that you want to send, you can use Mutt or
Sendmail to send the email out.
- You can limit to 100 simultaneous emails by using 'xargs -P 100' or
something like that.
1. I would do something like this. Use Python to generate
file.1, file.2, ..., file.1000
which are emails that you want to send out. To send them out
sequentially,
for i in file.*; do
sendmail -t < $i
done
and, to send 100 emails simultaneously,
ls file.* | xargs -P 100 -n 1 mysender
where 'mysender' is another script which actually calls Sendmail. From
top of my head, it would go like
cat $1 | sendmail -t -f jvanasco at hotmail.com
2. You can also dump all emails into a single file, and then send out 100
messages at a time,
formail -n 100 -s mysender < file.big
where 'mysender' look like
sendmail -t -f jvanasco at hotmail.com
3. You can do this using Mutt directly.
There are so many different ways of doing this. So, can you provide more
detail to your situation?
--
William Park, Open Geometry Consulting, <opengeometry at yahoo.ca>
8 CPU cluster, NAS, (Slackware) Linux, Python, LaTeX, Vim, Mutt, Tin
More information about the Python-list
mailing list