[RFCI-Discuss] Need a bot to check addresses
Klaus Alexander Seistrup
kseistrup at gmail.com
Thu Aug 24 02:03:40 EDT 2006
Tristan Miller wrote:
> Needless to say, I don't want to sit in front of a telnet window for three
> hours typing RCPT commands. Is there some bot which I can feed a mail
> server and a list of addresses to check (or better yet, simply a list of
> addresses -- let the bot look up the mx record on its own!), and which
> will log all the applicable communication with the mail server so that I
> can e-mail it to submit-{postmaster|abuse}@rfc-ignorant.org?
Python's smtplib module can do that (well, you'll have to look up the
MX record by your own, but it should be simple to write a shell
wrapper that can do that and then call the bot with appropriate
arguments). You can use the .putcmd() and .getreply() methods to
check the RCPT TO, and the .sendmail() methods to submit a report.
See
http://docs.python.org/lib/module-smtplib.html
http://docs.python.org/lib/SMTP-objects.html
for details.
Cheers,
--
Klaus Alexander Seistrup
Copenhagen · Denmark
http://magnetic-ink.dk/
More information about the RFCI-Discuss
mailing list