« サンプル3 | メイン | 馬牛沼の白鳥 »

Post2mt v2.21 bug fix version

Post2MTをバグフィックスしました。(他の変更なし) ダウンロード http://japo.net/miya/post2mt-current.tar.gz 本バージョンでの変更の概要 ・画像添付のないメール受信時、本文中のタグをチェックしていなかったものを修正。 *Note* XML-RPC対応はv3.0となる予定で、本バージョンには含まれません。
postmt.pl v2.21 Feb 12, 2004 Recent http://japo.net/miya/archives/catlist_post2mt.html Configuration [quote][code] # post2mt.pm: post2mt Configuration file # if you use japanese, you must write it in character set EUC-JP # (blog name, category name) package post2mt; # Set configuration variables my %PTCFG; $PTCFG{BLOG_NAME} = "blogname"; #blog name $PTCFG{BLOG_UNAME} = "username"; #blog user name $PTCFG{BLOG_CNAME} = "maillog"; #default category name $PTCFG{IMG_DIR} = "/path/to/image/dir"; #image directory path $PTCFG{IMG_URL} = "http://url/to/image/dir"; #image direcotry URL # thumbnail $PTCFG{MAKETHUMB} = 2; #0: not 1: browser 2: thumbnail file $PTCFG{MAX_W} = "188"; #width of thumbnail $PTCFG{MAX_H} = "230"; #height of thumbnail # pop3 $PTCFG{USE_POP3} = 0; # 0: not use(command) 1: use POP3 2: APOP $PTCFG{POP3_USER} = "account"; #POP3 account $PTCFG{POP3_PWD} = "password"; #POP3 password $PTCFG{POP3_SERVER} = "hostname"; #POP3 server # security # check From: from=>signature %MAILDEF = ( # check From: from,signature strings # followed are samples 'miya@examle.com' => "Photo by miya (DSC-T1)", 'miya@site.example.com' => "", # no signature 'miya@mobile.example.com' => "Photo by miya (A5401CA)", ); sub getconfig { my ($key) = @_; return $PTCFG{$key}; } sub getmaildef { my ($em) = @_; return "__ERROR__" unless defined $MAILDEF{$em}; return $MAILDEF{$em}; } 1; # end of config file [/code][/quote] Summary of post2mt - You may post an entry from e-mail to Movable Type. You can use carrier such as DoCoMo, au(kddi), and vodafone. And of course, usual PC's e-mail. - You might prepare an exclusive e-mail address for post2mt. (pop3 or .forward/.qmail-xx) When you use aliases, you don't need it. - You can include text, tag and image files in your multi-part e-mail. Two types such as text and image are supported. Another types such as sound, movie are not. - You must write subject in e-mail. And text or images or both must follow. - Images must be formatted in BASE64 or quoted-printable in multi-part. - When post2mt receives an e-mail, post2mt post an entry and rebuild index quickly and ping if you set ping URL(s) at blog. - Post2mt now supports one of security matter. You must configure it in post2mt.pm. There is at least one pair of From: address and signature. Post2mt doesn't receive mail from address(From: ) which is not set in post2mt.pm. And if there was set a signature, post2mt locate it at end of the entry. - Thumbnail - If you specify MAKETHUMB = 0, post2mt doesn't touch image files. Only makes HTML img tag. - If you specify MAKETHUMB = 1, post2mt makes HTML with thumbnail but doesn't make thumbnail file. And you will got a thumbnail with specified size.(Max) - If you specify MAKETHUMB = 2, post2mt makes HTML with thumbnail and makes thumbnail file with specified size.(Max) - At last, if there was thumbnail, post2mt rounds it by one line border. - tags - {MORE} You can use this tag to enter followed text into "Extended". - {CAT cat-name} You can use this tag(s) to specify sub-category name(s). The default category name which was specified in post2mt.pm is always main category name.(BLOG_CNAME) - {IMG left|right|none [rot90|rot180|rot270]} You can use this tags to posit an image(s) at here. If no tag were specified, posit text and images are followed. If you specify this tag sometimes, it means posit some images at there. If you specify rot90, rot180 or rot270, post2mt rotate image specified degrees. rot90 means rotate 90 degrees clockwise. - {DRAFT} You can use this tag to enter an entry as draft. If you didn't specify this tag, post2mt will publish the entry in public. Requirement - Linux/FreeBSD/Unix (i tested on linux) - perl 5 - Image::Magick - MIME::Parser - MIME::Base64 - MIME::QuotedPrint - Mail::Header - Mail::Address - Mail::Internet - File::Temp - Jcode - Net::POP3 - Digest::MD5 (if you use APOP) - others *note: I didn't try/test post2mt in windows environment. Install - make sure your environment. - permission of post2mt.pl will be 0755. - when you use pop3 feature, make post2mt.pm permission 0600 and owner you. In another case, make permission 0644. - make image directory. permission will be 0757. - make sure post2mt.pm to adapt your environment. - make sure "aliases", ".forward" if your MTA is sendmail/postfix/exim/.. "|(/path/to/post2mt.pl /path/to/MT-dir /path/to/post2mt.pm-dir)" - make sure ".qmail-xxx" if your MTA is qmail. /path/to/post2mt.pl /path/to/MT-dir /path/to/post2mt.pm-dir - make sure post2mt.pm if you use POP3. And set cron to launch post2mt.pl on each intervals. 10,20,30,40,50 * * * * /path/to/post2mt.pl /path/to/MT-dir /path/to/post2mt.pm-dir /path/to/post2mt.pl is a place where post2mt.pl is. /path/to/MT-dir is MT directory path name where MT is installed. /path/to/post2mt.pm-dir is directory path name where post2mt.pm is. *note: if you make some of post2mt.pm, change directory name but don't change name "post2mt.pm". WARNING - post2mt has security issue so you don't tell e-mail address for post2mt to anyone. - Take risks to use post2mt by yourself. Author of post2mt don't care it. Special thanks - I learned some of Movable Type API from email2blog.pl. I would like to say "thank you" to email2blog.pl's author. LICENSE You might be permitted to use post2mt freely for personal purpose. You are not permitted to use post2mt for commercial purpose without a license from author. Please ask author whether you can use or not if you are not clear. Author - miya http://japo.net/miya/

トラックバック

この一覧は、次のエントリーを参照しています: Post2mt v2.21 bug fix version:

» TaraLog/2004-04-03 from PukiWiki/TrackBack 0.1
post2mt導入顛末 †  この間ずっとMovableType弄りっぱなしで、Wikiクローンについてお留守状態が続いていた。どうもメール更新の誘惑には抗いがたいらしい。てなわけで、外経由以外でもメール更新システムは導入できるのだ、ということを知って格闘。まず見つ... [詳しくはこちら]

» メールでエントリー追加 from Soukaku's Hena-Choko Blog
主には、こっちのBlogで使うことを想定しているんだが、メールからMovableTypeのエントリーを作れるようにしたいと思って、いろいろ調査中。 とりあえず、テンプレート弄ったり、Plugin入れないということであれば、 moblog.uva.ne.jp - moblog mail gateway [dh's memora... [詳しくはこちら]