This project fetches emails from a specified mailbox and generates an RSS feed for each sender.
- Connects to a Email account using IMAP
- Fetches emails from the last 10 days (configurable)
- Groups emails by sender
- Generates an RSS feed for each sender
- Saves each RSS feed to a file
- Handles errors and logs them
You can configure your email account to connect to and the number of days to fetch emails from by saving lines in .env
:
imap_server=imap.gmail.com_or_some_other_imap_server
userid=[email protected]
userpw=your_password_here
mailbox=your_mailbox_name_to_fetch_emails_from
PORT=8000
If you want to use your own domain and have a SSL certificate, you can use lets encrypt to get a free SSL certificate.
- Install certbot on your server. The command to do this depends on your Linux distribution. For Ubuntu, you can use:
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install certbot python3-certbot-nginx
- Run certbot to obtain the certificates. Replace your-domain.com with your actual domain:
sudo certbot --nginx -d your-domain.com
- now add certfile and keyfile to the .env file
Final .env file should look like this:
imap_server=imap.gmail.com_or_some_other_imap_server
userid=[email protected]
userpw=your_password_here
mailbox=your_mailbox_name_to_fetch_emails_from
PORT=8000
certfile="/etc/letsencrypt/live/your-domain.com/fullchain.pem"
keyfile="/etc/letsencrypt/live/your-domain.com/privkey.pem"
- Clone this repository.
- Rum
make all
to build the docker container. - Copy
dotenv
to.env
and change the values to your email account. - Run
make run
to start the container. - Browse to
http://localhost:8000
to see the generated RSS feeds.
You might want to use Tailscale's funnel
to serve your local server to the internet. This way you can access your RSS feeds from anywhere.
MIT