← Back to team overview

launchpad-dev team mailing list archive

Re: [Branch ~launchpad-pqm/launchpad/db-devel] Rev 9322: [release-critical=bjornt][r=gary][bug=572077] Revert sendmail.py part

 

On May 04, 2010, at 10:21 PM, Bjorn Tillenius wrote:

>On Mon, May 03, 2010 at 09:46:44AM +1200, Tim Penhey wrote:
>> On Sat, 01 May 2010 08:16:24 you wrote:
>> > Merge authors:
>> >   Björn Tillenius (bjornt)
>> > ------------------------------------------------------------
>> > revno: 9322 [merge]
>> > committer: Launchpad Patch Queue Manager <launchpad@xxxxxxxxxxxxxxxxx>
>> > branch nick: launchpad
>> > timestamp: Fri 2010-04-30 21:13:26 +0100
>> > message:
>> >   [release-critical=bjornt][r=gary][bug=572077] Revert sendmail.py part
>> >   	of db-devel r9205,
>> >   	so that scripts don't use the zope mailers. Scripts need to be
>> >   	configured, and possibly rewritten,
>> >   	before we can use the zope mailers there.
>> > modified:
>> >   lib/lp/services/mail/sendmail.py
>> 
>> Hi Bjorn,
>> 
>> As you probably know already, it was me who did this change.
>
>Yes. I forgot to send an e-mail about it, since it was Friday evening,
>and I had better things to do :)
>
>You might want to read a blog post of mine, although I hope you don't
>take it personal ;) (this was just an excellent real-world example)
>
>    http://tillenius.me/blog/2010/05/03/problems-with-drive-by-fixes/
>
>
>> The primary reason for this was local testing.  I wasn't aware of the full 
>> consequences of the change, and was trying to QA locally.
>> 
>> How should we QA changes locally when dealing with script email?
>
>Unfortunately, it's quite difficult. You could log the mail, or the
>important parts of the mail. Another thing would be to do something
>special for the development config. I think that mailman has a test
>smtp server. It might be possible to look into using that one to store
>the sent mails somewhere.

There's a layer that fires up an SMTP server in a separate thread.  It stores
messages it receives on port 9025 and you can access messages via a
thread-safe API.  It's easy to use if you can arrange to deliver mail on
localhost:9025.

-Barry

Attachment: signature.asc
Description: PGP signature


References