Trees | Indices | Help |
|
---|
|
twisted.application.service.Service --+ | twisted.application.service.MultiService --+ | MaildirService
I watch a maildir for new messages. I should be placed as the service child of some MultiService instance. When running, I use the linux dirwatcher API (if available) or poll for new files in the 'new' subdirectory of my maildir path. When I discover a new message, I invoke my .messageReceived() method with the short filename of the new message, so the full name of the new file can be obtained with os.path.join(maildir, 'new', filename). messageReceived() should be overridden by a subclass to do something useful. I will not move or delete the file on my own: the subclass's messageReceived() should probably do that.
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
Class Variables | |
pollinterval = 10
|
|
Inherited from Inherited from |
Method Details |
Create the Maildir watcher. BASEDIR is the maildir directory (the one which contains new/ and tmp/)
|
|
|
|
Call this from messageReceived to start processing the message; this moves the message file to the 'cur' directory and returns an open file handle for it.
|
Process a received message. The filename is relative to self.newdir. Returns a Deferred. |
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Mar 25 19:40:36 2012 | http://epydoc.sourceforge.net |