473,748 Members | 7,590 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

smtplib, auth and covad

Hi,

I had been using smptlib to send email via my covad relay previously (several months ago), and it worked fine. Covad requires authentication, and this was accomplished fine with smtp.login(usrn ame, pwd).

Today when I tried the program, it stopped working. Using the smtp debug option, I determined that when

send: 'AUTH PLAIN abcdef\r\n'

I would get the exception:

smtplib.SMTPSer verDisconnected : Connection unexpectedly closed
Soooooo, it turns out that the covad mail server does not like to have the base64 username/password in the same line as the AUTH PLAIN. While it appears that the RFC2554 allows for this, covad does not (anymore).

I had to modify smtplib.login() to do the following:

send 'AUTH PLAIN'
wait for status code 334
send the base64 username/password
wait for status code 235

--------------------------------------- CODE
elif authmethod == AUTH_PLAIN:
(code, resp) = self.docmd("AUT H", AUTH_PLAIN)
if code != 334:
raise SMTPAuthenticat ionError(code, resp)
(code, resp) = self.docmd(enco de_plain(user, password),"")
-------------------------------------------------

Question: should the official smtplib be modified to allow for this situation?

(Python 2.3)

Thanks!

David Geller

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Jul 18 '05 #1
0 1418

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2909
by: David Hughes | last post by:
I wonder if anyone can help me resolve this problem. Although my ISP (One and One) provides the facility to run Python 2.2 CGI programs, their technical support people don't seem to have any Python expertise. I am trying to run Gypsymail.py as a CGI program from a web form. It is nearly all working, except for the part that I have reduced to the following code: #!/usr/bin/python # the line above must contain the path to Python on your...
0
1748
by: Frank Zheng | last post by:
I wrote some code to test "smtplib", but i met a problem when i call the "login(user,pass)" of the "SMTP" object. here are the codes: >>> s = smtplib.SMTP() >>> s.set_debuglevel(1) >>> s.connect('smtp.263.net') connect: ('smtp.263.net', 25) connect: ('smtp.263.net', 25) reply: '220 Welcome to coremail System(With Anti-Spam) 2.1 for
1
3042
by: Wayne Pierce | last post by:
I have a script that checks a POP3 mailbox and sends the emails to different people based upon some settings. For some reason my script cannot send any emails, the error I am getting is: reply: '550 Administrative prohibition\r\n' reply: retcode (550); Msg: Administrative prohibition data: (550, 'Administrative prohibition') send: 'rset\r\n' reply: '250 Reset OK\r\n' reply: retcode (250); Msg: Reset OK
6
10022
by: Matthias Kluwe | last post by:
Hi! After getting a @gmail.com address, I recognized I had to use TLS in my python scripts using smtplib in order to get mail to the smtp.gmail.com server. Things work well so far, apart from an unexpected error. Here's my sample code: import smtplib
5
1248
by: COVAD | last post by:
To Whom It May Concern: Good morning. I am Seann P. Courtney with Covad Communications an the reason that I am contacting you is because I am looking for referral partner to do some business with. I will pay you $400.00, free and clear, if during the normal course of your days business yo can refer a T1 line to me and I am cutting checks, free and clear, fo up to $175.00 if you can refer a business class SDSL line. It should b noted...
3
4402
by: Van_Gogh | last post by:
Hi, I am learning how to use the smtplib module, but am having some very early problems, maybe because I don't understand it. So, am I correct that by following the example in the Python: >>> import smtplib >>> server = smtplib.SMTP('localhost') >>> server.sendmail('soothsayer@example.org', 'jcaesar@example.org', """To: jcaesar@example.org
2
6135
by: carlistixx | last post by:
Hi, I'm using the roundup issue tracker (http://roundup.sourceforge.net) which uses smtplib to send mail. It all worked until we moved to a hosted Exchange MTA. The hosting provider requires the use of TLS. Now roundup can't send mail. My version of python is: Python 2.3.4 (#1, Feb 6 2006, 10:38:46) on linux2
0
1874
by: Roger | last post by:
I am having a problem sending email through smtp.gmail.com using smtplib. Everything works and the mail is sent and received, except quit. The following shows the problem (without bothering to login or do the sendmail): I have not had this problem with other mail servers (but only tried two). A solution for gmail seems to be to replace the server.quit() with server.close(). The difference between the two commands is quit() sends a...
1
2393
by: Hunter | last post by:
I am writing a script that needs to send some emails. And I've used smtplib in the past and it is pretty easy. But I thought, gee it would be easier if I could just call it as a function, passing the from, to, subject, and message text. So I wrote it up as a function and it sort of works, but I get a weird error. When it runs it inserts a "\t" tab character before each item during the send portion (which I can see when I turn on...
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9374
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9325
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9249
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8244
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.