blog posts from emails
Project description
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:.*world@haywood.id.au/)
{
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mailblog-0.0.2.tar.gz.
File metadata
- Download URL: mailblog-0.0.2.tar.gz
- Upload date:
- Size: 22.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.8.0 tqdm/4.32.2 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e9720d94d3959afc26ccca82a954654d502eec39c17480f4ca602d6d8d4a4a5
|
|
| MD5 |
953eb7df9a26afa69a4a2bca6a5a190d
|
|
| BLAKE2b-256 |
6a7b2150b4a07cba26e17929d3fa5419a410284dfaea0b5019934221cf582b29
|
File details
Details for the file mailblog-0.0.2-py3-none-any.whl.
File metadata
- Download URL: mailblog-0.0.2-py3-none-any.whl
- Upload date:
- Size: 22.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.8.0 tqdm/4.32.2 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7784aafcb39f1a96740b29928d77b9da0120be03c8ecc20fdeaeee27853c9503
|
|
| MD5 |
72067b838fc95fa92dbbee25bf07141b
|
|
| BLAKE2b-256 |
9f8cf4fc357f19f56004ec022b7942fe2b0091781796a78a67280186edee86a5
|