Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Phil Mayers
On 24/07/12 11:36, Sarah Addis wrote: > I am currently trying to use a SMTP server to send emails. However I > keep getting the same python authentication error outlined below. The > SMTP server requires authentication and can advertise CRAM-MD5 as an > accepted authentication method but fails when

Re: [Twisted-Python] AMPBox as an Argument?

2012-07-24 Thread Laurens Van Houtven
Sure, I just ended up doing that. Would it be worth creating a ticket, or am I seriously the first person to want this? cheers lvh On 20 Jul 2012, at 10:35, Glyph wrote: > > On Jul 20, 2012, at 1:11 AM, Laurens Van Houtven <_...@lvh.cc> wrote: > >> Hi, >> >> >> Apparently AMPBoxes aren'

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Sarah Addis
Do you mean the smtp.py file? I'm not authorized to display all the code from this file, what should I be looking for specifically? On 24 July 2012 11:54, Phil Mayers wrote: > On 24/07/12 11:36, Sarah Addis wrote: > > I am currently trying to use a SMTP server to send emails. However I > > keep

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Phil Mayers
On 24/07/12 14:15, Sarah Addis wrote: > Do you mean the smtp.py file? I'm not authorized to display all the code > from this file, what should I be looking for specifically? If you can't produce an example of how you are using Twisted, how do you expect people to help you? Which APIs are you cal

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Itamar Turner-Trauring
*** On Tue, Jul 24, 2012 at 6:36 AM, Sarah Addis wrote: > I am currently trying to use a SMTP server to send emails. However I > keep getting the same python authentication error outlined below. The SMTP > server requires authentication and can advertise CRAM-MD5 as an accepted > authentication

Re: [Twisted-Python] AMPBox as an Argument?

2012-07-24 Thread exarkun
On 12:48 pm, _...@lvh.cc wrote: >Sure, I just ended up doing that. > >Would it be worth creating a ticket, or am I seriously the first person >to want this? Some general dict argument types would be great. The kind represented by AMPList included. Note that once we have this, AMPList can actua

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Itamar Turner-Trauring
On Tue, Jul 24, 2012 at 6:54 AM, Phil Mayers wrote: > IIRC the Twisted SMTP stuff has support for handling auth errors and > trying other methods; it should "just work". > The code is a bit convoluted, so I can't be sure without more time than I want to spend on it, but I wouldn't expect it to tr

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Jessica McKellar
Phil, that was rather brusque; let's keep things friendly and supportive here. Sarah, can you try to condense your code into a short, self-contained example (http://sscce.org/) that you can share with us? That would be very helpful. Regards, -Jessica On Tue, Jul 24, 2012 at 9:28 AM, Phil Mayers

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Phil Mayers
On 24/07/12 14:29, Itamar Turner-Trauring wrote: > 3. The SMTP server's CRAM-MD5 implementation is buggy. If I understand the issue correctly, this is the case. The server incorrectly advertises CRAM-MD5, but it never succeeds since the server lacks the relevant secret. Obviously this is bad,

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Sarah Addis
Sorry to be unhelpful in describing the issue. The password and username credentials are all correct. I am using BuildBot MailNotifier to send an email each time a build has taken place: from buildbot.status import mail c['status'].append(mail.MailNotifier(

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Phil Mayers
On 24/07/12 14:31, Itamar Turner-Trauring wrote: > > > On Tue, Jul 24, 2012 at 6:54 AM, Phil Mayers > wrote: > > IIRC the Twisted SMTP stuff has support for handling auth errors and > trying other methods; it should "just work". > > > The code is a bit convo

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Sarah Addis
Ok.. so I have found this piece of code in my smtp.py file: def _registerAuthenticators(self): # Register Authenticator in order from most secure to least secure self.registerAuthenticator(CramMD5ClientAuthenticator(self.username)) self.registerAuthenticator(LOGINAuthenticator

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Phil Mayers
On 24/07/12 14:43, Jessica McKellar wrote: > Phil, that was rather brusque; let's keep things friendly and supportive here. That was not my intention. It was terse because I replied in a hurry, since I have a day job. Still, if anyone was offended, then I apologise.

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Phil Mayers
On 24/07/12 14:31, Itamar Turner-Trauring wrote: > > > On Tue, Jul 24, 2012 at 6:54 AM, Phil Mayers > wrote: > > IIRC the Twisted SMTP stuff has support for handling auth errors and > trying other methods; it should "just work". > > > The code is a bit convo

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Phil Mayers
On 24/07/12 15:16, Sarah Addis wrote: > Ok.. so I have found this piece of code in my smtp.py file: > > def _registerAuthenticators(self): > # Register Authenticator in order from most secure to least secure > > self.registerAuthenticator(CramMD5ClientAuthenticator(self.username)) >

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Phil Mayers
On 24/07/12 15:00, Sarah Addis wrote: > Sorry to be unhelpful in describing the issue. The password and username > credentials are all correct. I am using BuildBot MailNotifier to send an > email each time a build has taken place: Ok, upon closer examination my recollection is incorrect; Twisted w

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Phil Mayers
On 24/07/12 15:00, Sarah Addis wrote: > Sorry to be unhelpful in describing the issue. The password and username > credentials are all correct. I am using BuildBot MailNotifier to send an > email each time a build has taken place: One thing - which email server is this, and can you confirm for cer

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Itamar Turner-Trauring
On Tue, Jul 24, 2012 at 9:54 AM, Phil Mayers wrote: > On 24/07/12 14:29, Itamar Turner-Trauring wrote: > > > 3. The SMTP server's CRAM-MD5 implementation is buggy. > > If I understand the issue correctly, this is the case. The server > incorrectly advertises CRAM-MD5, but it never succeeds since

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Phil Mayers
On 24/07/12 15:07, Phil Mayers wrote: > I still think it's bad/buggy server behaviour to present an auth method > unless it can DEFINITELY service it for all clients. But if I understand > the issue correctly, that behaviour exists in the wild. This (and onward links) is relevant, perhaps: https

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Sarah Addis
THANK YOU- the email is now working after switching about the auth modes :) :) :) On 24 July 2012 15:26, Phil Mayers wrote: > On 24/07/12 14:31, Itamar Turner-Trauring wrote: > > > > > > On Tue, Jul 24, 2012 at 6:54 AM, Phil Mayers > > wrote: > > > > IIRC the

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Itamar Turner-Trauring
On Tue, Jul 24, 2012 at 10:16 AM, Sarah Addis wrote: > Ok.. so I have found this piece of code in my smtp.py file: > > def _registerAuthenticators(self): > # Register Authenticator in order from most secure to least secure > > self.registerAuthenticator(CramMD5ClientAuthenticator(self

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Sarah Addis
It is an internal company server. On 24 July 2012 15:32, Phil Mayers wrote: > On 24/07/12 15:00, Sarah Addis wrote: > > Sorry to be unhelpful in describing the issue. The password and username > > credentials are all correct. I am using BuildBot MailNotifier to send an > > email each time a buil

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Phil Mayers
On 24/07/12 15:37, Itamar Turner-Trauring wrote: > Could you file a ticket for implementing this functionality? http://twistedmatrix.com/trac/ticket/5803 I'm not entirely happy with the description; there's actually a bunch of different, subtly overlapping things going on here. But at least it

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Phil Mayers
On 24/07/12 16:01, Sarah Addis wrote: > It is an internal company server. It would be helpful at least to know the product name, assuming it is an off-the-shelf product. But if you can't supply it, I wouldn't worry too much. ___ Twisted-Python mailing

[Twisted-Python] stopping a twistd daemon: SIGTERM or SIGKILL

2012-07-24 Thread Tom Sheffler
Hi Twisted Folks, We use monit to start and stop our twistd daemons. I have set up monit to restart some of the daemons when they grow too large. I use the following command: /bin/bash -c 'kill -s SIGTERM `cat /var/run/sensrtunw/sensrtunw.pid`' Occasionally, this is unsuccessful in killing

Re: [Twisted-Python] stopping a twistd daemon: SIGTERM or SIGKILL

2012-07-24 Thread Justin Venus
I experienced a similar issue with a rather large twisted daemon. I ended up installing my own signal handler and issued a triggerSystemEvent to stop the twisted services. I can point you towards my code if you want to pursue that route. Justin Venus On Jul 24, 2012 10:21 PM, "Tom Sheffler" wro