Recipe: Bloglines to Gmail

plugins:
  - module: Subscription::Bloglines
    config:
      username: foobar@example.com
      password: p4ssw0rd

  - module: Publish::Gmail
    config:
      mailto:   example@gmail.com
      mailfrom: you@example.com
      mailroute:
        via: smtp_tls
        host: smtp.gmail.com:587
        username: example@gmail.com
        password: p4ssw0rd

This config allows you to take Subscription using Bloglines API, creates HTML rich text mail for each update and send them to your Gmail account example@gmail.com using Gmail's SMTP/TLS server.

If you want to send mail using your own SMTP sever running on localhost, change the mailroute config to:

      mailroute:
        via: smtp
        host: localhost:25

Hack: Using Gmail Filters

By default all the RSS feed updates will be into your Gmail inbox, which might be annoying. I suggest using Gmail's email extension, combined with filter. Namely, set mailto: to something like

      mailto: example+plagger@gmail.com

and create a Gmail filter that does:

Matches: to:(example+plagger@gmail.com)
Do this: Skip Inbox, Apply label "Plagger"

This way, updates will be in "Plagger" label (just like a folder) and not in your Inbox.

Hack: Use Bloglines folder info

Since [208], Subscription::Bloglines has fetch_meta option, which gets Bloglines folder information and store them to $feed->tags, using Bloglines listsubs API. Here's a sample hack using that.

  - module: Subscription::Bloglines
    config:
      username: ...
      password: ...
      fetch_meta: 1

  - module: Publish::Gmail
    rule:
      expression: $args->{feed}->has_tag('Important')
    config:
      mailto: {yourname}+important@gmail.com
      ...

  - module: Publish::Gmail
    config:
      mailto: {yourname}+plagger@gmail.com
      ...

With this config, updates of feeds under 'Important' directory on Bloglines will be sent to {yourname}+important@gmail.com, while all the feeds are still sent to your usual Gmail account with +plagger extension. It works nice with Gmail filters hack, obviously.

Attachments