New to Python. Help.

emile at fenx.com emile at fenx.com
Fri May 12 15:59:24 EDT 2000


Ron,

What happens if you type these commands into the interpreter?

Emile van Sebille
emile at fenx.com

Ron Holloway <ron at itec.co.za> wrote in message
news:<8fhkv7$86n$1 at ctb-nnrp2.saix.net>...
> 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()
> 
> 
> 
> 
> -- 
> http://www.python.org/mailman/listinfo/python-list
>




More information about the Python-list mailing list