New to Python. Help.

Ron Holloway ron at itec.co.za
Fri May 12 15:08:47 EDT 2000


Hi,

Below is my first Python program.  What I want to do is start the mail queue
for my domain on my ISP's mail server.  If I use the commands via a telnet
session all works fine.  My Python program however fails.  The strange thing
is in both cases the mail log on the ISP side shows the ERTN command and no
errors.  I've tried time.sleep(2) and even time.sleep(100) after the
commands thinking that the program may be doing things to fast.  The debug
also shows the expected output from the mail server.

I'm using Python 1.5.1 on FreeBSD3.0 and my ISP is using Sendmail 8.9.3 on a
FreeBSD3.0 server.

What am I missing?

Thanks,
Ron


#! /usr/local/bin/python

import rfc822
import smtplib

server = smtplib.SMTP()
server.set_debuglevel(1)
server.connect('mail.spoolforme.com')
server.ehlo('me.yourclient.com')
server.docmd('ETRN @yourclient.com')
server.quit()







More information about the Python-list mailing list