WP-keitai-mail Plugin v. 1.0

August 23rd, 2004 | Filed under WordPress
 

Finally got around to writing some kind of doc for my mail posting script for WordPress. And I can therefore finally release it for the world to use and enjoy.

Please welcome a new member in the WP plugin & hack family: wp-keitaimail v. 1.0b!

Actually, it is not technically a plugin, nor a hack, rather a standalone script that interfaces with WP to let you post entries to your blog via Email.
The name ‘keitai’ simply means ‘cell phone’ in Japanese… This script might as well have been called wp-cellphone-mail, I just liked the sound of ‘keitai’.

You can see a working demo on the right-hand side of this blog where it powers the “keitai log”. I have been using it for nearly a month now and it should be really stable albeit a tad complicated to set up (see below).

A quick roundabouts of the current features:

  • works as a script executed on email reception (unlike WP’s built-in feature), which means you do not have to run a cron job and your posts appear instantaneously on your blog.
  • handles jpeg pictures, will automatically create a thumbnail if they are too big and insert all necessary code in your post.
  • can be run on a separate machine from your WP install: it uses xmlrpc to post the entry and can be set to use ftp to upload the picture files.
  • can handle as many blogs and authors as you want. For each email account you can customize any aspect of the posts (image formatting, posting category etc). For example, you can easily set up the script to let 5 authors post to your blog with each one under a different category.

Now for the bad news:
This script is not trivial to set up. I have tried to include very detailed instructions that should supposedly be enough for even non technical-minded people. But hooking up the script to the email address can be somewhat complicated, and more importantly, it heavily depends on each hosting solution… which makes it quite hard to document.
Overall, you should be fine if you have ONE of the following:

  • A “mail forward” feature in your server control panel (especially if the control panel in question uses the very common ‘cpanel’ solution) that lets you forward mails to a script (it usually does).
  • OR

  • a file entitled .procmailrc in your server root (meaning your mail server uses procmail).
  • OR

  • an Exim recipe file. However, you will need to know how to edit it (or look it up online, it’s not that hard), since I haven’t had time to write instructions for Exim.

If you think you have one of these, check out the full instructions in keitai-prefs.php for details on hooking the script and set it to use your blog. I tried to be as clear as possible, but if you run into any problems using them, please let me know. You do not have to be a programmer or know anything about PHP to use this script, however, it is probably a good idea to hold on for now if you are not comfortable editing a settings file manually and tweaking around your server settings.

Hopefully, next release (date very much unknown) will make a lot of this easier.

In the meantime, if you wanna use this wonderful little toy, just download the archive here. Unzip it, edit the keitai-prefs.php file, following the detailed instructions it contains and upload the whole lot to your server. The script doesn’t need to be inside your web root (somewhere inside the ‘www’ or ‘public_html’ folders) since it is not accessed through the web, actually, it is preferable if it is not.

Among the features I plan to add for an hypothetical 1.2 version are:

  • Simpler interface to edit the script preferences
  • POP3 support (if you want to use it like WP’s built in script).
  • Password protection for posting.
  • Access to post settings through email commands (e.g. you could choose the category to post it to).
  • Support for more media types (movies, other graphic formats).
  • Support for GPS coordinates.
  • Full kanji support. Although this seems to be problem with the xmlrpc lib, the script has troubles with emails containing kanjis as of now. YMMV though.
  • as well as:

  • Support for EXIF data
  • Better cleaning of content: remove unnecessary new lines etc. (allow textile parsing?)

All that depending on the level of interest and the time I will be able to spend on it (not much for now). If you’d like to see other features or are having issue getting the script to work correctly, please let me know.

Enjoy!

88 Responses to “WP-keitai-mail Plugin v. 1.0”

Damn. And I just got back from the land of keitai. I had written something similar in perl, using procmail and xmlrpc, and it worked fine with MT but not with WP. Oh well. Maybe in another year or so.

2
Christian Says:

Hi!
If it’s neither a plug-in nor a hack, it might be an add-on, I guess… ;)

Hi Jeff,
Actually, I made this as a replacement for the MT script I had been using (also perl+procmail+xmlrpc… seems like there was lots of duplicated effort here ;-) I based mine off a friend’s code, though).
This one was entirely redone from scratch in PHP, as I quite loathe Perl personally, and should benefit from more and more features as I get to add them…
It’s not limited exclusively for keitai use though: it can make for a convenient way to upload pictures to your websites for example (if you can’t be bothered to use a web-upload interface) or simply with a non “keitai” cell phones (surely they do have email on US cell phones nowadays ;-)

I need help setting this script up:

“7e04b@ajblog.uni.cc” => array (
login => “7e04b+ajblog.uni.cc”,
pwd => “***”,
cat => “General”, // make sure the category exists
blog_URL => “http://www.ajblog.uni.cc/”, // URL to your blog
blog_folder => “/home/checkm00/public_html/”, // absolute path to your blog folder
pix_folder => “keitai/pix/”), // relative to $blog_folder, MUST BE writable by server (chmod 777)…

on the first line: do I put my e-mail, or the e-mail I’m sending to?

Whose username and pass?

you must put the email address you are sending it to (normally, an account you have specially created for your blog and that you will have hooked to the script following the instructions in this file).

‘login’ and ‘pwd’ are the log and password for the blog user you want entries to be posted under (NOT your email account info). I actually recommend creating a special user with minimum privileges (just enough to post entries) for this (since your password will appear in clear in this file), but you can very well use your main user’s log and pass.

HtH, let me know if you have any other questions.

OK… here’s another two for you.

1. The category doesn’t seem to be working… it’s giving me a “foreach” error in the category functions file. Not setting any category I presume. Do I need to put the category ID instead of the category name?

2. It’s sending me back an e-mail with:
“This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

pipe to |php /home/checkm00/public_html/wp-keitaimail/wp-keitaimail.php
generated by 7e04b@ajblog.uni.cc

The following text was generated during the delivery attempt:

—— pipe to |php /home/checkm00/public_html/wp-keitaimail/wp-keitaimail.php
generated by 7e04b@ajblog.uni.cc ——

Content-type: text/html
X-Powered-By: PHP/4.3.8

—— This is a copy of the message, including all the headers. ——

Return-path:
Received: from [64.233.170.201] (helo=mproxy.gmail.com)
by host.hitstogo.com with esmtp (Exim 4.41)
id 1C0Mev-0008UG-63
for 7e04b@ajblog.uni.cc; Thu, 26 Aug 2004 08:59:29 -0700
Received: by mproxy.gmail.com with SMTP id 78so506175rnl
for <7e04b@ajblog.uni.cc>; Thu, 26 Aug 2004 08:59:25 -0700 (PDT)
Received: by 10.38.99.64 with SMTP id w64mr2582204rnb;
Thu, 26 Aug 2004 08:59:25 -0700 (PDT)
Received: by 10.38.164.52 with HTTP; Thu, 26 Aug 2004 08:59:25 -0700 (PDT)
Message-ID: <1a27051204082608597c3930ee@mail.gmail.com>
Date: Thu, 26 Aug 2004 10:59:25 -0500
From: AIMJournals

Reply-To: AIMJournals

To: Post to blog <7e04b@ajblog.uni.cc>
Subject: [text of subject]
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

[text of post]”

from the “Mail delivery system” is there a way I can stop it from doing this?

I get the following error (by mail):

Warning: main(): SAFE MODE Restriction in effect. The script whose uid is 32137 is not allowed to access /usr/lib/php/PEAR.php owned by uid 0 in /home/leenus/wp-keitaimail/mimedecode.php on line 35

Warning: main(PEAR.php): failed to open stream: No such file or directory in /home/leenus/wp-keitaimail/mimedecode.php on line 35

Fatal error: main(): Failed opening required 'PEAR.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/leenus/wp-keitaimail/mimedecode.php on line 35

Is it impossible to use this script when PHP is running in safe mode?

I guess so… Your hoster must’ve disabled the usage of PEAR. Are you paying for this hosting, or is it free? If it’s free, then you could use a new free host. I reccomend ChromeHost.

I had a problem where the script would die requiring PEAR, so I simply took a copy of PEAR.php and added it in the execution directory wp-keitai. Seems to work or at least the script stops griping about it being missing.

I have a different problem though. The script simply executes quietly without error and yet does not post. I can check the pipe procmail recipe works fine and this happens even with a local execution ( ie. cat samplemail.txt | php wp-keitaimail.php ). I’ve set the debugging level to 3 in wp-keitaimail.php and used samplemail.txt but the log.txt file does not produce any output and still no post.

Could be something wrong with my array but doesn’t look like it.

Anyone have any ideas ? Kind of stumped and put an hour or 2 into getting this working now between procmail and figuring out what was up with the script.

thanks !
Daryl.

It could be the params array. The first line of each array in the array should read:
“email” => array ( //change “email” to the e-mail you are sending the post FROM!

Mr Dave,
I was able to install the script with success. Sending emails with attachments from a regular email account works perfect. However, sending it from my cell phone, does not seem to work. It does not decode the attachement and only displays the ’signature’ that my provider adds to the message.
I have put an example of a message online, maybe you could take a look at it and see what can be done. I would greatly appreciate it.
-huph

Modified e-mail to blog.
I’ve modified Dr. Dave’s “WP-keitai-mail Plugin” to work with b2evo (originally it is made for WordPress blog system ).
It was simple – just had to change the format that the XML data was sent in.

The result, I have e-mail-to-blog functionality…

Being fresher to blogs!!…i jus started blogging with wordpress …but i couldnt use email to blog option in wordpress ..i did what they actually said in their help pages…but still i couldn’t do it…pls some one help me …
iam using free host from chromehost.com…..

hope some might help me with this issue!!!!

thanks in advance

Installed 1.0b and it worked like a charm! First tested out sending from normal email and went through succesfully. Then sent an email + photo attachment from my Nokia 7610 on Vodafone GPRS and that too went through beautifully. Also tried sending via O2 MMS and works (albeit with some unsolicited advertising :)

The instructions weren’t as complex as advertised, but they could do with a little more documentation and clarification :)

All in all THANKS!

15
arachnae Says:

There must be some other syntax to use for my particular type of server, to forward posts to the script, because I get this error:

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

pipe to |php /home/admin/public_html/wp-keitai-mail/wp-keitaimail.php
generated by blog@paolalucchesi.com
“php” command not found for virtual_address_pipe transport

I’d be so grateful if you could suggest a solution…

do you have console access on this machine? if so, can you try to run “which php” and/or “where php” in the command line interface (via telnet or other)… If that doesn’t work, ask your host for the “exact server path to the php executable”, and use that instead of “php” in the line you insert…
It is also possible that your host has disabled php as a standalone executable…

GENERAL UPDATE: Btw, all the issues listed above have normally been resolved (and migrated into the downloadable file)… if you do encounter any issue (similar to those above or different), please contact me via email or in the comments…
I should be releasing a new package with better directions and slightly easier configuration real soon now™ (i.e. when I can).

Problems with Wordpress and MySQL 4.1
I’ve stopped using Blogger and have been fighting with the installation of Wordpress, it’s open source php blogging software and most importantly it has a community around it.

So anyway, it turns out that it won’t install with MySQL 4.1 but it’s…

Hi thanks for your comments to my (rather long post). Re: the naming: it’s the I E thing, I always get them mixed up, that’s all. I was going to post to your blog properly when I’d got it working, as I’m a n00b with Blogging I didn’t really know that the trackback would publish my entire post as a comment here!

Anyway, assuming that I get it all working then you’ve saved me a hell of a lot of time, with this plugin, thanks.

I’ll mail you with more formal proposals re: new features when I’m ready to cut some code.

I installed the software just like you said and now all i get is this response after sending the e-mail. My server uses cpanel as its config tool. any advice?

The following text was generated during the delivery attempt:

—— pipe to |php /wp-keitaimail/wp-keitaimail.php
generated by blog@mandebooks.com ——

Status: 404
Content-type: text/html
X-Powered-By: PHP/4.3.8

No input file specified.

—— This is a copy of the message, including all the headers. ——
—— The body of the message is 118939 characters long; only the first
—— 106496 or so are included here.

it then lists out the message that i sent it. thanks for the help…

I have started a project that is an add-on to b2evolution and eventually other blogging software. It will allow processing of plain text and HTML e-mails sent to a special e-mail address and will post them to any software using the Blogger API.

The web page for the project is http://www.lowbatteries.com/b2emo .

21
arachnae Says:

I’ve tried the following (after finding out where php was – btw, I run other php stuff so the problem shouldn’t be that)

|/usr/local/bin/php /home/admin/public_html/wp-keitai-mail/wp-keitaimail.php

and also checked the exim log (I have exim), which shows that the mail has been sent, if I interpret the log correctly, but still it doesn’t get the script going.

Any other suggestions?

thanks…

Arachnae: I have tried repeatedly to contact you ever since your last post. But your email address has bounced all my emails.
Please leave another comment with a valid email address (it won’t appear here) or contact me directly…

Your ISP is STILL rejecting all my emails (including the ones from this server). Either contact them about this issue (they probably have some kind of stupid block on this IP) or contact me with another valid email address.

wp keitai mail – ftp modifications
Since I have my mail server running on a different server, I rely on the FTP features of the script, which needed some tweaking…

Hi! Great script! but I can’t execute it properly:
it keeps me to say:
—GOT—
HTTP/1.1 200 OK
Server: Microsoft-IIS/4.0
Date: Sun, 21 Nov 2004 16:11:25 GMT
Content-type: text/html
X-Powered-By: PHP/4.3.9

—END—
Fault:
Code: 2 Reason ‘Invalid return payload: enabling debugging to examine incoming payload’

any clue?
in wp-keitaimail.php I’ve changed

$client = new xmlrpc_client( $myUrl['path']."xmlrpc.php", $myUrl['host']);

to

$client = new xmlrpc_client( $myUrl['path']."wp-includes/class-xmlrpc.php", $myUrl['host']);

I hope it is right: in my $blog_URL I didn’t have xmlrpc.php file.

Thanks in advance for your help!
Emanuel

25
John Says:

I keep getting a 404 error saying that /xmlrpc.php isn’t found on the server. I assume this file needs to be in the default wordpress directory. Is it supposed to come with wordpress? I don’t have it. Where can I get it?

Thanks,

John

26
Alpha Says:

I have tried implementing this script on my blog to no avail. I kept getting the same error many people reported when I tried to post via email.

I get emails back saying that:

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

pipe to |php /home/xxxxxxx/public_html/wp-keitaimail/wp-keitaimail.php
generated by xxxxxx@theomegaattempt.com

I loved the idea of having this running and I appreciate your efforts. If you could offer some assistance, I’d appreciate it.

Hello,

I believe I am having the similar problems as arachnae. I use cpanel and have installed another script that uses email piping. To get that one to work I had to add -q after the php: |php -q /pipe/to/path I tried that with this script, and it suppresses the return emails, however it does not seem to post to the blog. :( Any ideas would be appriciated.

Thanks,

PYRO

I think I found a light in the tunnel. I was having similar problems and I found out the recent few releases of WordPress were missing a file names xmlrpc.php. This is not similar to class-xmlrpc.php, it’s a different thing. Now, to be able to post through mail to a wordpressblog, you need that file. You can find that file in older versions of Wordpress (best one is 1.2 Mingus). Just download that version, take out the xmlrpc.php file and put that file in your wordpress root directory and tadaaa… worked like a charm!

29
arachnae Says:

I had xmlrpc.php all the time (I think “Mingus” is actually the wordrepp version I had installed), so for me at least THAT was not the issue… I rather think that there should be something to add to exim’s configuration – anybody knows how to do that? (my server has exim)

30
allyn fratkin Says:

hi, i am having a problem with ketaimail, my posts never show up in the blog. they are in the database, they show up in the edit/posts page and i can edit them, but if i click on one of the titles, i get a message “Sorry, no posts matched your criteria.”. i am running wordpress 1.2.
any ideas? thanks in advance. ketaimail seems like just what i want, i just can’t get it to work!

31
allyn fratkin Says:

never mind, the problem was time zone bugs in xmlrpc.php postdating the gmt date of the post. keitaimail it working great. thanks for a great script!

Hello
thanks for this script. unfortunately, I’m experiencing this problem…

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es)
failed:

pipe to |php
/home/huanhui/public_html/l-s/wp/wp-keitaimail/wp-keitaimail.php
generated by mobme@em-pathy.net

The following text was generated during the delivery attempt:

—— pipe to |php
/home/huanhui/public_html/l-s/wp/wp-keitaimail/wp-keitaimail.php
generated by mobme@em-pathy.net ——

Content-type: text/html
X-Powered-By: PHP/4.3.10

Could not change to directory:
—— This is a copy of the message, including all the headers. ——

what does “Could not change to directory” mean?

i’ve looked thru all but I can’t find a solution.

I tried to install it but… well, it looks like my provider doesn t want me to make a deviation to a script. I just got a wonderful message that says :
“this is not a valid mail address”

If you have any solution about that… it will be welcome.

Izo

resize images to fit in the sidebar… [UPDATE] Found one! Thanks to Dr. Dave’s Keitai Mail script (heavily modified to work on a Windows server an [...]

WP cool plugin list wpPaginate: make a nice pagination WP-Mail: WP-keitai-mail Plugin: interfaces with WP to let you post entries to yo [...]

s! As you can see from the post below, I can now blog-via-email. I’m using the Keitai plugin to do it, and it works much better than the built-in [...]

37
Mark Zimmerman Says:

When I send a message to my moblog address I get the following:

—– The following addresses had permanent fatal errors —–
“|/usr/local/bin/php -e /wp-keitaimail/wp-keitaimail.php”
(reason: 255)
(expanded from: )

—– Transcript of session follows —–
554 5.3.0 unknown mailer error 255
Reporting-MTA: dns; domain.com
Received-From-MTA: DNS; smtpout.mac.com
Arrival-Date: Mon, 28 Feb 2005 20:57:02 -0700

Final-Recipient: RFC822; moblogaddress@domain.com
X-Actual-Recipient: X-Unix; |/usr/local/bin/php -e /wp-keitaimail/wp-keitaimail.php
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Unix; 255
Last-Attempt-Date: Mon, 28 Feb 2005 20:57:02 -0700

Any suggestions as to where I might start debugging this? I enabled the PHP debugging with the -e however the failure messages are no more informative.

Thanks,

Mark

Anyone ever get this working on unix under wordpress 1.5?

Thanks!

Moses

39
splunk Says:

Dr. Dave, hopefully you can be of assistance. Trying to get this to work, I put the files in the correct directory and edited the prefs to what they should be, including username/pw etc for the blog user. I set up my .procmailrc file with the recipe from the prefs file. When I send an email to the blog email, it goes through procmail and I get this in my log file…

procmail: Locking “msgid.lock”
procmail: Executing “/usr/bin/formail,-D,8192,msgid.cache”
procmail: Non-zero exitcode (1) from “/usr/bin/formail”
procmail: Assigning “LASTFOLDER=/usr/bin/formail -D 8192 msgid.cache”
procmail: Unlocking “msgid.lock”
procmail: Match on “(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?).*moblog@dark7.org”
procmail: Executing “/usr/bin/php,/home/e-smith/files/ibays/journal/html/wp-keitaimail/wp-keitaimail.php”
procmail: Assigning “LASTFOLDER=/usr/bin/php /home/e-smith/files/ibays/journal/html/wp-keitaimail/wp-keitaimail.php”
Subject: please work
Folder: /usr/bin/php /home/e-smith/files/ibays/journal/html/wp-keita 1771
procmail: Assigning “LASTFOLDER=/home/e-smith/files/users/moblog/Maildir/new/1109965955.29833_1.snoopy”
Subject: please work
Folder: /home/e-smith/files/users/moblog/Maildir/new/1109965955.2983 1771

It’s not posting on the blog, and I’m not too technical so I’m not sure if that’s what the log file should be displaying or not for a successful email. Any ideas?

40
splunk Says:

Well, got it sending properly, and found in a log file that it’s having trouble with the PHP. And now I see the person above me trying to get it workin on 1.5 which is the version of WP that I use. Looking forward to it :)

I actually found a different script that uses xmlrpc.php to post to WP1.5, and it works great.

A link to it and a little tech note are on here

I’m interested in trying keitai-mail with 1.5 if anyone does get it working though.

Moses

42
splunk Says:

Was gonna email ya Moses, but couldn’t find a link. I don’t know why I tried this, but it’s working. I went to http://wp-plugins.net and downloaded Keitaimail from there (it states it works for 1.2 and 1.5. Reset my prefs (take note that by default it’s set to identify the senders email addy for it to work, so make sure you have that set right). Then I got the latest xmlrpc.php from the stable 1.5 WP. Now my only problem is that it’s putting out too much info into the post. This is how a post with the body “hahahahhahah” turned out…

hahahahhahah

hahahahhahah

43
splunk Says:

Well, there is a lot of code in there that I forgot to use the tags…

hahahahhahah

hahahahhahah

44
splunk Says:

Maybe a blockquote (sorry people, please don’t hate me :) )

hahahahhahah

hahahahhahah

if that didn’t post the code, I’ll give up trying.

Wordpress Plugins

I’ve finally got around to doing a list of the plugins I’ve installed for Wordpress.

The Wordpress Plugin Database, with a full list of Wordpress Plugins can be found here.

I personally had no problem installing any of them, so if you have had …

I am having the same problem as many others have mentioned here. When I try to send a photo, the following error message is returned.

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

pipe to |php /home/japundit/wp-keitaimail/wp-keitaimail.php

generated by japudit@japundit.com

The following text was generated during the delivery attempt:

—— pipe to |php/home/japundit/wp-keitaimail/wp-keitaimail.php

generated by japundit@japundit.com —-/

Hi,

I had a specialist install the script but I still get the following error whenever I try to post an image from any machine or using any mail address (machine based or keitai based):

The following text was generated during the delivery attempt:

—— pipe to |php /home/japundit/wp-keitaimail/wp-keitaimail.php

Could anyone please help get me past this hurdle?

Everything works fine if I remove the FROM address restriction.

Thanks

JP

Hi,

Anybody home?

The guy who installed the plug-in says that everything works fine when he configures it for his sender address.

When the address is changed to my sender address and I send an image, it is not posted on the page.

Anyone know what we should do?

Thanks.

JP

Hello everybody…

OK, a quick word of update: there are probably a few problems between wp-keitai-mail and WP 1.5. In fact, there was at least one major bug present in the original release of 1.5 (it’s been fixed silently ever since, so no easy way to tell whether you have a fixed version or no).
My version still works fine here, but who knows…

The sad bottom line is that I really cannot even start looking at wp-keitai-mail right now. Plugin development is a hobby, a time-consuming hobby… and currently, I’m already way beyond what I should reasonably be spending on it… If anything, I must admit I am more eager to get Spam Karma 2 off the ground, seeing how it covers more essential needs and cater to a wider userbase…

As such, I am afraid I cannot offer any support at the moment. If you do not seem to be able to fix the problem (the code is fairly simple, and has an easy-to-enable debugging mode, for those who know their way around PHP), assume it’s broken and check out other solutions. I believe Flickr.com is a pretty good way to do that without too much trouble.
As for wp-keitai-mail, there might be an upgrade in a month or two when things will have quieted down, but do not hold your breath…

Sorry about that and thank you all for your support…

If it does not have any sort of protection to limit posting to the blog owner, then what exactly makes it superior to the mail script already included with Wordpress?

51
splunk Says:

It does have protection to limit the poster. You have to set it up to use “allowed” email addresses.

[...] 5
Posted by Dann under General 

I spent a little time today messing around with Dr. Dave’s Keitai Mail Plugin. It didn’t work [...]

53
Sumit Says:

Will this script also post attachments as pdf, doc, etc?

54
Tom Says:

Hi,

I got the latest wordpress at this time so 1.5.
The script doesn’t work because there is no class-xmlrpc.php but only a xmlrpc.php file in the wordpress dir. I changed the require_once in wp-keitai.php. It does’t make any errors but I only have a :

Content-type:_text/html_/_/XML-RPC_server_accepts_POST_requests_only
(extracted from the qmail logfile – current)

What does it mean ?
Thx
Tom

PS: I also don’t understand where the $enforce_senderl=true will find the “friendly emails” but for the moment it’s not really a matter because no mail appears in my blog :(

Okay, i had a little trouble getting this working on 1.5.

First of all i kept geting errors about class-xmlrpc.php being missing, solved this by getting the file(s) from Wordpress 1.2.1.

Then I kept getting an empty error, i was using my email client and i had only set the script to use my mobile.

It’s now working fine, except that my mobile provider is sending the e-mails in html format (tables ‘n’ all), plus they’re including my phone number in the mail, and i can’t use my own subect, http://blog.7784.co.uk/you-have-received-a-new-message/ :O

[...] t at the moment). Actually, I made a whole plugin to do that (and more), it’s there: Keitai Mail Plugin probably other stuff as I come across it… [...]

I have just one question… the script works great. No problems on my blog except that it seems to keep inserting breaks after a certain number of characters which makes it less wide than the space I have allocated. I can’t find where that happens. Could you point me in the right direction? I saw your post abt not supporting any more but I was hoping this would be a simple “look here bone head” kinda thing :)

Thanks

mbx

[...] it seems like I will have to do something with what is available. I have been playing with this plugin for a couple of days. But I am unable to forward the em [...]

[...] Well here it is my modifications to Phone2WP to have the thumbnail functionality of Keitai Mail with a few other little tweaks. To download click here [...]

[...] I need to hack wp-keitaimail to work with wordpress 1.3 as it seems the WP 1.3 uses a newer XML-PRC library, Incutio XML-RPC Library IXR [...]

For some reason when sending an email to the script there is no posting being done. I’ve checked all the categories and I check the file wp-keitaimail-prefs.php and everything seems to be configured the way it is supposed to.

Any ideas?

Suggestions?

[...] Jahaa, het is zo ver, ik ga lekker een weekje op vakantie en aangezien ik te lui ben geweest om een plugin als wp-ketai-mail te installeren, gaan jullie een weekje niets van mij te horen krijgen. Eigenlijk maar goed ook. Hebben jullie ook een weekje vakantie ;) Tot over een week! [...]

Hi,
Great Script – but I am unable to get it to work. I am using a webhost who is providing interface thro cpanel – I guess I have followed most of your instructions – but on sending an email to that address – I get the following reply::

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

pipe to |php /home/***/wp-keitaimail/wp-keitaimail.php
generated by ***@ashwinkumar.net
local delivery failed

The following text was generated during the delivery attempt:

—— pipe to |php /home/***/wp-keitaimail/wp-keitaimail.php
generated by ***@ashwinkumar.net ——

PHP: Error parsing /usr/local/lib/php.ini on line 272
Turck MMCache requires Zend Engine API version 20021010.
The Zend Engine API version 220040412 which is installed, is newer.
Contact Dmitry Stogov at http://turck-mmcache.sourceforge.net for a later version of Turck MMCache.

Status: 404
Content-type: text/html
X-Powered-By: PHP/5.0.3

No input file specified.

—— This is a copy of the message, including all the headers. ——

64
Ashwin Kumar Says:

Sorry for the previous post – I had not set the path correctly – Now I am having a different problem altogether – have posted the error message below

—— pipe to |php /home/ashwinku/public_html/wp-keitaimail/wp-keitaimail.php
generated by ***@ashwinkumar.net ——

PHP: Error parsing /usr/local/lib/php.ini on line 272
Turck MMCache requires Zend Engine API version 20021010.
The Zend Engine API version 220040412 which is installed, is newer.
Contact Dmitry Stogov at http://turck-mmcache.sourceforge.net for a later version of Turck MMCache.

Content-type: text/html
X-Powered-By: PHP/5.0.3

Warning: main(/home/ashwinku/public_html/blog/wp-includes/class-xmlrpc.php) [function.main]: failed to open stream: No such file or directory in /home/ashwinku/public_html/wp-keitaimail/wp-keitaimail.php on line 31

Fatal error: main() [function.require]: Failed opening required ‘/home/ashwinku/public_html/blog/wp-includes/class-xmlrpc.php’ (include_path=’/home/ashwinku/public_html/wp-keitaimail/:.:/usr/lib/php:/usr/local/lib/php’) in /home/ashwinku/public_html/wp-keitaimail/wp-keitaimail.php on line 31

—— This is a copy of the message, including all the headers. ——

[...] I use Dr. Dave’s wp-keitai-mail script for my moblog postings which works great; however, it depends on some older XMLRPC files from Wordpress 1.2 which unfortunately are vulnerable to remote code execution that has recently been exploited by a worm making its way around the Internet. It looks like Dr. Dave has lost interest in updating it and trying to rewrite it to use the new WP 1.5 XMLRPC libraries is non-trivial. [...]

[...] keitaimail, seems to be more along the lines of what I had in mind (redirecting mails to a script). Unfortunately it’s a php script, if only I could run php at shell all would be coool (yes, with 4 os) [...]

67
gogh Says:

Hi. I love this program.

Let me leave some information for qmail users.
-go to the root directory and find a .qmail-accountname file. Edit it like this,

./.panel/users/*youre-mailaccountname*/
|/usr/local/bin/php /home/*yourdomein*/public_html/*yourdirectry*/wp-keitaimail/wp-keitaimail.php

68
gogh Says:

Hi, Dr. Dave.
If you don’t mind, may I ask how to set up the latest updated pictures on the sidebar like your blog?

I just like to show several thumbnaills and link to the post that has the picture.

Gogh:
Magic of PHP… Hasn’t got anything to do with wp-keitai-mail, all custom PHP code that fetches the posts and cull them in this sort… When I have a sec, I might release such a theme one day… don’t hold your breath though (bit busy these days).

[...] keitai-mail, seems to be more along the lines of what I had in mind (redirecting mails to a script). Unfortunately I can’t get it to work properly, there are issues with ‘class-xmlrpc’ and it ignores both uppercase “Content-transfer-encoding : BASE64″ (not base64, which my phone is sending) and all attachments from a different phone I’ve been using. More likely down to problems in the accompanying mimedecode.php [...]

71
Gogh Says:

Hi, Dr. Dave.

Is it possible to post images as excerpt via keitai? I mean I like to put an attached image into the excerpt form.

The reason is that there is a plugin that generates thumbails from excerpt fields and display them randomly.

If it takes a lot of work for you, please never mind. :)

[...] Dr Dave » Blog Archive » WP-keitai-mail Plugin v. 1.0 Please welcome a new member in the WP plugin & hack family: wp-keitaimail v. 1.0b! Actually, it is not technically a plugin, nor a hack, rather a standalone script that interfaces with WP to let you post entries to your blog via Email. The name ‘keita (tags: wordpress plugin) [...]

Cool script!

A nice feature would be to be able to call the script using Cron, and it would poll a specified POP account for mail and insert into the blog.

That would make the script much easier to implement for people without an own mail server.

Great job though!

Moblogging Redux

Ever since I converted my blog over to WordPress I have been at a loss for a good moblogging solution. In the past I had been using a script found at Tokyo Tidbits which worked well and could be called easily from procmail. Unfortunately once I had con…

Has anyone used this successfully with PHP5? I seem to be hitting a bug in mimedecode.php that causes the script to throw:

“Fatal error: Using $this when not in object context”

It looks like this is fixed in mimedecode.php 1.40 or greater but I’m still not having luck. If anyone has suggestions I’d be appreciative.

I found a solution :)

It looks like the syntax for calling mimedecode.php has changed in PHP 5.x, so a slight tweek to the wp-keitaimail.php was all that was needed to get it working again.

I’ll drop Dr. Dave an email with the fix.

[...] Last month I finally got around to updating to PHP5 which had the unfortunate side effect of breaking Dr. Dave’s excellent wp-keitai-mail script. After upgrading it would throw the following error: [...]

I installed the script and sent a few messages – it works nice :) but I’ve got a problem with Polish characters such as ó ę ź ć etc. There are some incorrect letters displayed instead. I tried setting up UTF-8 and some other encodings in the Thunderbird, but it didn’t help. Is there any solution for this?

Have probs. when I try put pics by mms! Just don’t publish thoses pictures anyone?

[...] The original version of this (by Ryan Duff) can be found here. A modified version to have the thumbnail functionality of Keitai Mail with a few other little tweaks can be found here. A friend of mine has further patched it up for me because it was letting the footer images through (even though it isn’t supposed too). This revision has only been tested on T-Mobile carrier. If you want it, download it here… [...]

[...] Ciao, quello che vi propongo stasera è un articolo leggermente più tecnico del solito, ma a mio avviso interessante e che riguarda un servizio che ho deciso di aggiungere al blog proprio in questi ultimi giorni.Come avrete letto ieri nei commenti miei e di Dromed ( ), ho pensato che sarebbe stato simpatico se avessi avuto la possibilità di aggiornare il blog anche in movimento, via email ma anche via mms, magari inserendo anche qualche foto. Da questa idea mi è venuta voglia di provare a rendere mobile questo blog e ho aggiunto un plugin che mi permette di fare moblogging. Ciò non significa che da ora in poi mi vedrete sempre postare dal cellulare, ma che, qualora mi allontanassi per qualche giorno, avreste comunque mie notizie corredate di immagini (che c**o eh?). E siccome per aggiungere il moblog ho dovuto superare qualche ostacolo facendo prove e chiedendo consigli perché in rete non si trovano grossi tutorial, vi dico quale soluzione ho adottato io e quali altre alternative potrebbero esserci per chi fa uso di Wordpress con Hosting su Aruba (nel mio caso Hosting Linux). Di per sé, Wordpress mette già a disposizione dell’utente la possibilità di inserire post “in movimento”, ma con qualche limitazione. Prima di accorgermi che esistevano dei plugins, come Postie, che aggiungevano funzionalità a quelle di default, mi è caduto l’occhio su quella che sembrava essere una buona soluzione: WP-keitai-mail. Mi piaceva perché dava l’impressione di gestire bene le immagini e non aveva la necessità di impostare un cronjob per chiamare periodicamente il file addetto alla lettura e pubblicazione delle email ricevute. L’unico problema è che su Aruba non è possibile né inoltrare direttamente le email ad uno script, né mettere le mani sul file .procmailrc. E’ sempre possibile, però, creare uno script php che accede alla casella, legge le email e le inoltra allo script wp-keitaimail.php.Vagando per wp-plugins.net mi ero soffermato su WP-MailBlog che mi sembrava unire completezza e semplicità sotto uno stesso prodotto. L’ho subito testato e ho riscontrato due problemi: l’impossibilità di creare un cronjob e l’incompatibilità del fatto di considerare come testo del post ciò che è scritto fra i simboli #, in quanto gli mms di Vodafone arrivano come email tutte colorate e il testo pubblicato non era nient’altro che codice HTML contenuto fra i primi due colori che si incontravano. Mi è bastato modificare il plugin sostituendo il carattere # con un altro che, sicuramente, non si trova utilizzato in HTML e ho risolto, mentre per la questione cron è stato utilissimo il consiglio di Krosis di usare EasyMonitor: in questo modo sono riuscito a far controllare la posta in automatico ogni 15 minuti inserendo come indirizzo da monitorare quello della pagina.php preposta al servizio.Nella speranza di non avervi liofilizzato le balle con questo post, ci risentiamo alla prossima puntata. Avrò in serbo qualche altra novità o notizia sconvolgente? [...]

82
Juanfer Says:

What is the exact command line I have to use, while connected through SSH to my acount, to forward an e-mail address (example at exampledomain dot com) to a file in my hosting account exampledomain.com/wpblog/content/file.php

Thanks in advance.

Juanfer, there’s no way for any of us to know what the exact command line you have to use is. Please contact your hosting provider for assistance.

84
Pascal Says:

Hello,

How can we improve the script to manage category… I would like usage like
subject of the mail : [category]Title of the article
mail : article

idea?
Pascal

[...] Dr Dave » Blog Archive » WP-keitai-mail Plugin v. 1.0 ケータイから投稿 [...]

[...] WP-keitai-mail Plugin v. 1.0 [...]

[...] guys and gals, Here is a test of <a href=“http://unknowngenius.com/blog/archives/2004/08/23/wp-keitai-mail-plugin-v-10/”>WP-keitai-mail Plugin v. [...]

Meanwhile in the... Keitai Logs

040822_0936~01.jpg

Hmmn... I've seen that word somewhere before.