Giter VIP home page Giter VIP logo

mailblog's Introduction

mailblog

blog posts by sending emails to a nominated address.

Installation

pip install mailblog

If you want to modify code or templates, you need "development mode"

git clone https://github.com/ihaywood3/mailblog
cd mailblog
pip install -e .

This provides a command mailblog, run mailblog -h to see the full options.

Database

mailblog uses a SQLite database, which must be initialised: mailblog create.

Mailserver

Your system's mailserver must be configured to run the command mailblog mail and send the incoming e-mail on standard input when an e-mail is sent to the address you want to associate with the blogging service.

I use maildrop, the relevant part of my recipe is:

if (/^To:.*[email protected]/)
{
    cc $HOME/Mail/.World
    to "|mailblog mail"
}

NOTE: mailblog itself will accept an e-mail from anyone on the Internet and create a blog for them. Consequently you need either a spam filter or a fixed list of allowed senders that it is checked before mailblog mail is run. I have written a Bayesian spam filter in Python: spamprobe.py

Webserver

mailblog does not serve Web pages, it generates HTML files and writes to a directory (by default $HOME/public_html but can be changed with the -o option.

A webserver must then be configured to serve these files under the URL path /blog/ This can't be changed currently.

Here is my Apache configuration:

Alias /blog /home/ian/public_html
<Directory /home/ian/public_html >
	order allow,deny
	allow from all
</Directory>

CSS

The generated HTML loads its stylesheet from blog/style.css. A basic style.css is provided in the source repository, this, or your own stylesheet, must be copied to the Web directory.

Demonstration Server

This is running here

mailblog's People

Contributors

ihaywood3 avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.