-
Notifications
You must be signed in to change notification settings - Fork 9
Documentation:PostOffice
In case someone happens to stumble across this...
This is a collection of preliminary notes on how to get the PostOffice plugin working, and what it does. It is not intended to be final end-user documentation yet, or possibly ever in this form.
PostOffice needs the following Perl modules:
- Email::Address
- Email::MIME
- Email::MIME::ContentType
- Email::MIME::Encodings
- IO::Socket::SSL (for IMAP w/SSL)
- Mail::POP3Client
- Mail::IMAPClient
The source for these can just be added to the 'PostOffice/lib/' directory, eg.:
lib/Email/Address.pm lib/Email/MIME.pm lib/Email/MIME/ContentType.pm lib/Email/MIME/Encodings.pm
The plugin settings are pretty self-explanatory. Reading and filling them out will give you a basic idea what needs to happen in terms of initial preparation.
I've only so far tested with setting up a single blog, not the system-level config.
- PostOffice defines a scheduled task for pulling messages, which will be triggered in the usual ways.
- If a message from a non-allowed e-mail address is encountered(see plugin settings), an error will be reported to STDERR, and the message skipped.
-
[Untested] You can use GMail-style "plus addressing" to specify which blog an e-mail will be posted to. So, if you create the receiving address
postoffice@mydomain.com
Sending a message topostoffice+2@mydomain.com
will post your e-mail to the blog with blog_id of 2. - You can specify what category posts will end up in by titling your e-mails in the format "[Category] Title Goes Here" (no quotes)
- The space after the closing bracket is not required, but probably looks better.
- If the category you specify doesn't exist, it will be created.
- There appears to be some normalization here. I sent an e-mail with category of "test" in the subject, and it was assigned to the existing category "Test," even though the system does allow those to be separate things. This may need pointing out.
- The category block is retained in the post title. (Ew. Fbz case filed.)
- Images can be posted to your blog by sending as attachments which will be saved by MT as assets, with the file placed in the relevant blog root. See open issue below
- Multiple images are displayed(as opposed to styled) as block. Fbz case filed to get some explanation before raising objections.
- Other filetypes are output as a link on its own line.
- There are some issues with attachments causing content to be lost. No clue if it can be resolved from the MT side, but triggering cases:
- GMail-- Rich formatting, text and attached image: text is lost
- Thunderbird-- HTML formatting, image dragged inline (text optional): image is lost
- I haven't been able to get the PO job to pull items from IMAP(via Google Apps, if it ends up being a factor). If someone could confirm it works, possibly on other servers, that would be great.
- I have not tried the "require API key in address" function.
- I haven't used the plus addressing feature, since only one blog was set up. I assume this is why the plugin has system-level settings, and that to use this properly will require moving the configuration there.
- Use of subject category assignment throws warning "Use of uninitialized value in length at lib/MT/Template/ContextHandlers.pm line 4794." from the cron job. (This does not prevent publishing.)
http://bugs.movabletype.org/default.asp?pg=pgList&search=2&searchFor=postoffice
(If you don't have fbz access, the important items are mentioned inline above. The rest are mostly display or markup related.)