back

=begin text
  README for M2WP - Mail 2 WordPress
------------------------------------------------
  Welcome to M2WP, an SMTP mailrobot for posting
  wordpress blog entries via SMTP mail.
  By T.L. (http://www.daemon.de/blog/).
  Where to get
------------------------------------------------
  Download the latest packate at:
     http://www.daemon.de/M2WP
  Requirements
------------------------------------------------
  Your system must fulfill the following requirements:
   - UNIX(TM) clone (linux, *bsd, solaris)
   - perl 5.6 or higher
   - perl modules:
      o WWW::Mechanize
      o MIME::Parser
      o Config::General
     you can get them via CPAN: http://search.cpan.org/
   - your own mail server with root access. the mail server
     must not neccesarily run on the same machine as your
     wordpress blog does.
   - root access on the server
   - some knowledge about unix system configuration
  How to install
------------------------------------------------
  1. Create a robot user in wordpress, assign it access
     level 4.
  2. Download the tarball.
  3. Unpack it to some temporarily location, e.g. /tmp.
  4. Edit the file 'Makefile', the variables to edit are
     described in the comments and are self explanatory.
  5. Run 'make install'.
  6. Edit the M2WP configfile, default config is
     /etc/m2wp.conf. All config parameters are mandatory.
     Be careful with the category section. All categories
     you want to use, must be configured! Go to your WP admin
     backend to lookup the category ids.
     Use the credentials of the previously created user.
  7. Add an mailalias for the robot. Here I will explain it
     for postfix, other mailers maybe different:
       - add a virtual user to /etc/postfix/virtual:
          robot@your.domain    robot
       - add an alias to /etc/postfix/aliases:
          robot: |/usr/local/bin/m2wp
       - rebuild the databases and reload postfix:
          postmap /etc/postfix/virtual
	  postalias /etc/postfix/aliases
	  postfix reload
 
  8. The M2WP script will be executed with the rights of
     the user your mailer runs as, so you have to make sure,
     this user has all appropriate permissions, which are:
       - read+execute /usr/local/bin/m2wp
       - chdir+write  /tmp/m2wp-mail-parser
       - read         /etc/m2wp.conf
  How to use
------------------------------------------------
  Send some email to M2WP. make sure you are using an
  mail account which is allowed (AllowedEmail parameter in
  m2wp.conf).
  The following types of mails are supported:
    - plain text mails (us-ascii)
    - plain text mails (uuencoded)
    - plain text mails (quoted-printable)
    - multipart messages containing:
      o one of the plain text types listed above
      o html messages (the following tags will be removed
        before posting: html, body, head, meta
      o image attachments
    
  In case of multipart mails, the html part will be
  preferred if it exists.
  Future version will support image attachments too.
  The mail may look like this:
    From: you@your.domain
    To: robot@your.domain
    Subject: Test Posting
    Some blah blah.
    .
  This mail will be posted under your default category.
  you may also specify a category, append it to the subject
  separated by a dash:
    Subject: Test Posting - Politiccs
  If you want to post images too, just attach them to your
  mail and refer them in the posting html with it's filename.
  M2WP will then prepend the image base url according to the
  configuration.
  You can also post userdefined fields. Make sure the field
  already exists, M2WP will not create new fields. Then add
  a header field to your mail (please note, that not all mailers
  support the manipulation of mail headers). In this example
  I add technorati tags via the TechnoTag plugin:
    X-Meta-ttaglist: drugs medicine
  As you can see, the field name follows the "X-Meta-" string.
  Only one X-Meta-* Field is supported per post, this seems to
  be a limitation of wordpress, in fact I'm unable to submit
  multiple fields with one post in wp too.
  If some error occurs, M2WP will exit 1 and print a message
  to stderr, which will cause your mailer to create an error
  mail (usually with sender MAILER-DAEMIN). Read the error
  carefully. You may also look in the mail.log syslog file to
  determine what happend.
  M2WP has been tested so far successful with:
    - mutt
    - MS Outlook
    - Google Mail
  How to request help / How to submit feedback
------------------------------------------------
  Just go to http://www.daemon.de/Mail, get the mailaddress
  and send some mail to me. It would be nice if you could
  add the term "M2WP" to your message.
  Copyright / License
------------------------------------------------
  M2WP is copyright 2005-2006 by T.L..
  M2WP is licensed under the terms of the General
  Public License http://www.gnu.org/licenses/gpl.txt
  README Version
------------------------------------------------
  File refers to M2WP version 1.01
=end text