Difference between revisions of "Post by email setup"

From Dreamwidth Notes
Jump to: navigation, search
(Add initial basic post by email setup details)
 
Line 21: Line 21:
 
under the "all:" section and then run <tt>bin/worker-manager</tt> which will kick off all the configured workers (and then background itself - if you kill the worker-manager process it will clean up all the workers it's started). Note that this will consume a reasonable amount of resources (especially memory). If you are manually testing your email setup you might find it easier to manually run <tt>bin/worker/incoming-email</tt> (which will stay running in the foreground).
 
under the "all:" section and then run <tt>bin/worker-manager</tt> which will kick off all the configured workers (and then background itself - if you kill the worker-manager process it will clean up all the workers it's started). Note that this will consume a reasonable amount of resources (especially memory). If you are manually testing your email setup you might find it easier to manually run <tt>bin/worker/incoming-email</tt> (which will stay running in the foreground).
  
You should then be able to configure your DW account with a source email address and PIN, email &lt;username&gt;+&ltpin&gt;@post.your.dw.domain from that address and see your email appear as a post on your journal.
+
You should then be able to configure your DW account with a source email address and PIN, email &lt;username&gt;+&lt;pin&gt;@post.your.dw.domain from that address and see your email appear as a post on your journal.

Revision as of 22:49, 23 February 2010

This is a very basic set of notes to help get an initial posting by email setup configured.

First setup TheSchwartz - incoming email is queued by incoming-email-inject.pl and then handled by the incoming-email worker.

Next you need to arrange for email to $LJ::EMAIL_POST_DOMAIN (normally post.your.dw.domain, configurable in etc/config.pl) to be piped into ~/bin/incoming-email-inject.pl. In my case I made all mail for that domain go to the dw user and then created a ~/.forward that just contained

| /home/dw/bin/incoming-mail-inject.pl

You'll need to open up ~/bin/incoming-email-inject.pl in your editor; near the top there's a section that looks like:

BEGIN {
    $ENV{LJHOME} ||= "/home/lj";
}

Make sure this points to your Dreamwidth user home directory - in my case I changed it to /home/dw.

The default workers config doesn't process incoming mail; you'll need to add:

    incoming-email: 1

under the "all:" section and then run bin/worker-manager which will kick off all the configured workers (and then background itself - if you kill the worker-manager process it will clean up all the workers it's started). Note that this will consume a reasonable amount of resources (especially memory). If you are manually testing your email setup you might find it easier to manually run bin/worker/incoming-email (which will stay running in the foreground).

You should then be able to configure your DW account with a source email address and PIN, email <username>+<pin>@post.your.dw.domain from that address and see your email appear as a post on your journal.