Personal Mail server
Go to file
2023-06-23 22:03:58 -04:00
deploy_configs add deploy configs 2023-06-20 21:45:14 -04:00
mail4one Allow multiple servers of same type 2023-06-23 22:03:58 -04:00
scripts Add version info from git tags 2023-06-23 21:30:31 -04:00
tests Improve logging 2023-06-16 23:42:30 -04:00
.gitignore Working build 2023-06-13 20:45:28 -04:00
LICENSE Add LICENSE 2018-12-18 17:12:08 +00:00
Makefile Add version info from git tags 2023-06-23 21:30:31 -04:00
Pipfile add jata 2023-05-12 16:49:51 -04:00
Pipfile.lock update dependencies 2023-06-13 14:18:29 -04:00
README.md fix running just pop server 2020-08-06 19:52:05 -04:00
requirements.txt get compiling with python 3.10 and remove pipenv for build 2023-06-14 11:00:09 -04:00
run.py migrate pop3 2018-12-18 18:36:13 -05:00
runtests.sh add docker tests and fix sorting 2023-06-14 15:25:42 -04:00
TODO.md Merge branch 'master' into dev 2023-05-12 16:51:03 -04:00

mail4one

Mail server for single user #asyncio #python

Features

  • smtp server with STARTTLS
  • pop3 server with TLS
  • Both running on single thread using asyncio
  • Saves mails in simple Maildir format (i.e one file per email message)
  • After opening port, drops root privileges. So the process will not running as nobody

How to use

echo -n "balki is awesome+<YOUR PASSWORD>" | sha256sum 
pipenv install
sudo $(pipenv --venv)/bin/python ./run.py --certfile /etc/letsencrypt/live/your.domain.com/fullchain.pem --keyfile /etc/letsencrypt/live/your.domain.com/privkey.pem /var/mails --password_hash <PASSWORD_HASH_FROM_ABOVE>

Just pop server for debugging

pipenv run python -m mail4one.pop3 /path/to/mails 9995 your_password

Nextups

  • Support sending emails - Also support for popular services like mailgun/sendgrid
  • Smart assistant like functionality. For e.g.
    • You don't need all emails of package deliver status. Just the latest one would be enough.
    • Some type of emails can auto expire. Old newsletters are not very helpful
    • Aggregate emails for weekend reading.
  • Small webserver
  • SPAM filtering - not that important as you can use unique addresses for each service. e.g. facebook@mydomian.com, bankac@mydomain.com, reddit@mydomain.com etc. You can easily figure out who sold your address to spammers and block it.

Goals

  • Intended to be used for one person. So won't have features that don't make sense in this context. e.g. LDAP AUTH, Mail quota, etc,
  • Supports only python3.7. No plans to support older versions

Known to work

  • Server: Google Cloud f1-micro with Ubuntu 18.04 - Always Free instance
  • Clients: thunderbird, evolution, k9mail
  • smtp: Received email from all. Didn't see any drops. Tested from gmail, protonmail, reddit and few others

Contribution

Pull requests and issues welcome