[Tutor] sORRY
kirk Bailey
idiot1@netzero.net
Thu, 17 Jan 2002 14:55:27 -0500
dman wrote:
>
> On Thu, Jan 17, 2002 at 01:19:10AM -0500, kirk Bailey wrote:
> | someone on the GMbrianpenn list closed an account and did not tell us
> | od come and do the wtright thing and unsubscribe. We jus tdiscovered
> | the error fed back from sendmail when it cannot connect to the
> | account, the error comnig back blows the acript at that point- and
> | remaining members do nto get the message, but the submiting member
> | DOES get a error message. Removing old members one at a time, I
> | discovered which ones were doing it, and they are not disrupting it
> | any more.
> |
> | I need to set up a Try:/Except ERROR: block with a small program and a
> | tiny dummy message, and see what the errors look like, and prepare to
> | handle them. This shall surely show up again.
>
> Are you doing the SMTP transfer yourself, or are you piping to your
> MTA and letting it deal with it?
TLpost has a loop in it that reads a list variable ('members') and
sends the prepared message to that member with the smtplib functions.
Here is that loop:
server = smtplib.SMTP(localhost)
for to_addr in members : # for each address in 'listnamemembers',
# print "to_addr: ", to_addr
# print "from_addr: ", from_addr
# print "msg=" + CRLF, msg
server.sendmail(from_addr, to_addr, msg) # 400 send envlope and msg!
# don't delete the above line!
server.quit() # then close the connection.
Works fine as long as all the addresses are good ones. Blows out when
there is a bad one involved.
Probably the solution should be something like:
server = smtplib.SMTP(localhost)
for to_addr in members : # for each address in 'listnamemembers',
Try:
# print "to_addr: ", to_addr
# print "from_addr: ", from_addr
# print "msg=" + CRLF, msg
server.sendmail(from_addr, to_addr, msg) # 400 send envlope and msg!
Except ERROR:foofoofoo
# just skip the bad address for now and continue the loop.
#
server.quit() # then close the connection.
Any discussion or suggestions or really sick jokes?
wait, this is not the evil-humor list, skip the last one, save them
for over there.
>
> In the former case, read RFC2821 and the source of some MTA and see
> how to handle errors. (this is why it is better to simply pipe to
> your MTA and let it deal with it)
This can be done 2 ways. One of them is a security problem, and the
other one is a security FAILURE.
1. sendmail calls. We limit recipients per envlope to 10 in the
sendmail.cf file to limit someone getting an account to do a spam
run. TL avoids this by this loop and sending one envlope per
recipient, I am unsure that direct calls and handing it the list would
be friendly to the limitation.
2. outbound aliases. Sendmail compiles aliases and recognizes a few
imbedded commands when doing so. One of these is ':include:'. This is
the method used by majordomo and some other MLM's. such an aslias
would be:
mylist-outgoing::include:/www/www.mydomain.foo/lists/mylist
And when something hits this alias, it goes out. FROM ANYONE. Good
news is sendmail sends it out one envlope per person. There is NO
input filtering, ANY spammeister can play with your list at will.
Now not so long ago,
>
> In the latter case, you need a way to set the envelope sender
> ("MAIL FROM:") to a magic address on your machine that is handled by a
> bot. If a message arrives at that address, your bot removes the
> address from the subscription list. However, don't do that
> immediately, only do it if multiple bounces occur (it may be a
> one-shot problem with the user's setup and you don't want to drop them
> in that case). For example debian-user sets
> "bounce-debian-user=dsh8290=rit.edu@lists.debian.org" as the sender
> address for mail it delivers to me. If the mail is undeliverable,
> that's where the bounce message goes. (unless the system sending the
> bounce is a badly broken (MS) system which sends the bounce to the
> From: address). Then you need to configure your MTA to accept
> pattern addresses and deliver them to the bot.
>
> -D
>
> --
>
> I can do all things through Christ who strengthens me.
> Philippians 4:13
>
> _______________________________________________
> Tutor maillist - Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
--
-Respectfully,
-Kirk D Bailey
Consulting Loose Cannon
end
www.howlermonkey.net highprimate@howlermonkey.net
www.sacredelectron.org idiot1@netzero.net
www.tinylist.org grumpy@tinylist.org
----------------------------------------------------
Sign Up for NetZero Platinum Today
Only $9.95 per month!
http://my.netzero.net/s/signup?r=platinum&refcd=PT97