[Zope-dev] zope.sendmail Retry fixes and new state machine.

2008-03-09 Thread Matthew Grant
Hi!

Just created a new branch for zope.sendmail. 

This is a result of the state machine analysis work I did on it after
finding that it was creating problems on sending mail to our smart
host...

svn+ssh://[EMAIL PROTECTED]/repos/main/zope.sendmail/branches/grantma-retryfixes

with lots of juicy new fixes including:

- Restructured SMTP mailer and QueueProcessorThread so that all
  SMTP error logic is in the mailer.  Clears the way for another
  mailer for /usr/sbin/sendmail command line can be used with
  QueueProcessorThread.
- Added ability for QueueProcessorThread so that it can handle temporary
  failures in delivery to its smart host - ie administrator reconfiguring
  mailserver, mail server reboot/restart  This was the main error path that
  was missing from the trunk code's state machine.
- Formatted log messages in a consistent fashion so that they can be grepped
  out of z3.log
- Added maildir message filename to log messages as message id - allows
  easy analysis/triage of mail message sending problems
- Added optional cleaning of lock links to QueueProcessorThread so that 
  messages can be resent immediately on Zope3 restart.
- Added pollingInterval (ms), cleanLockLinks (boolean), and retryInterval
  (seconds) configure options to configure.zcml.

Comments welcomed.  I know it is a major portion of code and a bit of a 
restructure,
but I have created unit  tests for all my major changes.  It includes
all the stuff that was missing and that was needed for our production
server.

I imagine that all of this will prove to be really useful when it is added to 
the trunk zope.sendmail

Cheers,

Matthew Grant


signature.asc
Description: This is a digitally signed message part
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zope.sendmail Retry fixes and new state machine.

2008-03-09 Thread Andreas Jung



--On 9. März 2008 21:11:21 +1300 Matthew Grant [EMAIL PROTECTED] 
wrote:



Hi!

Just created a new branch for zope.sendmail.

This is a result of the state machine analysis work I did on it after
finding that it was creating problems on sending mail to our smart
host...

svn+ssh://[EMAIL PROTECTED]/repos/main/zope.sendmail/branches/grantma-
retryfixes

with lots of juicy new fixes including:

- Restructured SMTP mailer and QueueProcessorThread so that all
  SMTP error logic is in the mailer.  Clears the way for another
  mailer for /usr/sbin/sendmail command line can be used with
  QueueProcessorThread.
- Added ability for QueueProcessorThread so that it can handle temporary
  failures in delivery to its smart host - ie administrator reconfiguring
  mailserver, mail server reboot/restart  This was the main error path
that   was missing from the trunk code's state machine.
- Formatted log messages in a consistent fashion so that they can be
grepped   out of z3.log
- Added maildir message filename to log messages as message id - allows
  easy analysis/triage of mail message sending problems
- Added optional cleaning of lock links to QueueProcessorThread so that
  messages can be resent immediately on Zope3 restart.
- Added pollingInterval (ms), cleanLockLinks (boolean), and retryInterval
  (seconds) configure options to configure.zcml.

Comments welcomed.  I know it is a major portion of code and a bit of a
restructure, but I have created unit  tests for all my major changes.  It
includes all the stuff that was missing and that was needed for our
production server.




This sounds pretty impressing!

Tnx,
Andreas

pgpvMnCWGxMaB.pgp
Description: PGP signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Zope Tests: 5 OK

2008-03-09 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Sat Mar  8 12:00:00 2008 UTC to Sun Mar  9 12:00:00 2008 UTC.
There were 5 messages: 5 from Zope Tests.


Tests passed OK
---

Subject: OK : Zope-2.8 Python-2.3.6 : Linux
From: Zope Tests
Date: Sat Mar  8 20:55:47 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-March/009220.html

Subject: OK : Zope-2.9 Python-2.4.4 : Linux
From: Zope Tests
Date: Sat Mar  8 20:57:17 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-March/009221.html

Subject: OK : Zope-2.10 Python-2.4.4 : Linux
From: Zope Tests
Date: Sat Mar  8 20:58:47 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-March/009222.html

Subject: OK : Zope-2.11 Python-2.4.4 : Linux
From: Zope Tests
Date: Sat Mar  8 21:00:18 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-March/009223.html

Subject: OK : Zope-trunk Python-2.4.4 : Linux
From: Zope Tests
Date: Sat Mar  8 21:01:48 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-March/009224.html

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zope.sendmail Retry fixes and new state machine.

2008-03-09 Thread Gary Poster

These changes sound great.

I just looked for your checkins in the checkins list.  I didn't find  
them.  If I recall correctly, this usually happens if the committer is  
not subscribed to the list and has not been blessed by an admin to let  
the messages through anyway.


So, if I'm right, it would be cool if these happened:

1) someone with admin privs on the checkins list released Matthew's  
messages, and
2) either Matthew joined the checkins list or an admin blessed his  
messages so they could come through anyway.


Gary


On Mar 9, 2008, at 4:11 AM, Matthew Grant wrote:


Hi!

Just created a new branch for zope.sendmail.

This is a result of the state machine analysis work I did on it after
finding that it was creating problems on sending mail to our smart
host...

svn+ssh://[EMAIL PROTECTED]/repos/main/zope.sendmail/branches/ 
grantma-retryfixes


with lots of juicy new fixes including:

- Restructured SMTP mailer and QueueProcessorThread so that all
 SMTP error logic is in the mailer.  Clears the way for another
 mailer for /usr/sbin/sendmail command line can be used with
 QueueProcessorThread.
- Added ability for QueueProcessorThread so that it can handle  
temporary
 failures in delivery to its smart host - ie administrator  
reconfiguring
 mailserver, mail server reboot/restart  This was the main error  
path that

 was missing from the trunk code's state machine.
- Formatted log messages in a consistent fashion so that they can be  
grepped

 out of z3.log
- Added maildir message filename to log messages as message id -  
allows

 easy analysis/triage of mail message sending problems
- Added optional cleaning of lock links to QueueProcessorThread so  
that

 messages can be resent immediately on Zope3 restart.
- Added pollingInterval (ms), cleanLockLinks (boolean), and  
retryInterval

 (seconds) configure options to configure.zcml.

Comments welcomed.  I know it is a major portion of code and a bit  
of a restructure,

but I have created unit  tests for all my major changes.  It includes
all the stuff that was missing and that was needed for our production
server.

I imagine that all of this will prove to be really useful when it is  
added to

the trunk zope.sendmail

Cheers,

Matthew Grant
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-09 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Gary Poster wrote:
 These changes sound great.
 
 I just looked for your checkins in the checkins list.  I didn't find  
 them.  If I recall correctly, this usually happens if the committer is  
 not subscribed to the list and has not been blessed by an admin to let  
 the messages through anyway.
 
 So, if I'm right, it would be cool if these happened:
 
 1) someone with admin privs on the checkins list released Matthew's  
 messages, and
 2) either Matthew joined the checkins list or an admin blessed his  
 messages so they could come through anyway.

I just flushed a bunch of pending-good checkin messages from the admindb
queue for the zope-checkins list.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH1F4K+gerLs4ltQ4RAqPUAJ9KLYVgwUnFsQlh9O+7gXyhaLNOagCdH5eo
GE6Xg7P44syij9hmL3MwARs=
=U+nr
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zope.sendmail Retry fixes and new state machine.

2008-03-09 Thread Gary Poster
I did a five-minute skim of the checkin but hope to look a bit more  
tomorrow.  Hopefully Marius, Benji, Albertas, or someone else who has  
actually done work on this package will take a look and chime in.


I did have one somewhat trivial thought.  I generally prefer durations  
and intervals expressed as datetime.timedeltas myself, because they  
convey their meaning without having to look it up docs (is that number  
value a number of seconds?  milliseconds?  minutes?).  There might  
even be a zcml built in for schema field for that; I believe I  
remember that there is in ZConfig.


Also, some variety of doctest would be nice.  Even when a package is  
not using doctests, I add new tests as doctest unless there's a really  
good reason not to.


In this case, it looks like you've made the code significantly more  
robust, which has added some probably necessary complexity.  The code  
looks readable, but I recommend a maintainer-oriented overview/ 
introduction as a doctest, at the least.  For instance, perhaps you  
could think about documentation about the rationale for the approach  
and about the dance that this code participates in (with the lock  
files and all the possible SMTP error conditions and the code's  
responses).  Of course, even more friendly docs than that would be  
nice, but I'm only asking for what I myself tend to give, unfortunately.


Gary
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )