This is a prototype to determine whether we can feasibly allow users to deliver series data by email.
Users will be emailed before a dataset is due for update. The user will be prompted to reply to the email including the URL that points to the new data file (later, perhaps we can try attachments too).
If a user sends an email to the address without replying to a notification email then they will receive a schedule of releases that are due.
- Create a virtualenv
- Clone this repo
- python setup.py develop
pip install -r requirements.txt
- Copy sample_config.yml to config.yml
- Edit config.yml
Before running either of the command below, you should set an environment variable which points to your config file, such as:
export EMAIL_PUB_CONFIG=config.yml
To send notifications, you should use the notify
command which is installed in your virtualenv
To handles responses, you should use the respond
command which is installed in your virtualenv
To test how the HTML emails look, there is a command that can be run that will generate a test email (per template paid) and send it to the specified address
test_templates --to my@mail.com
As email isn't very secure, and it is possible to some degree to fake the sender we have to take extra steps to make sure the user is allowed to publish data.
If someone were to fake the email address of a user, to obtain a schedule, we haven't really leaked anything and so it is probably not a problem.
If someone were to fake the email address of the user and know how to build a target address for publishing data, then that clearly is a problem.
Add a token to all outgoing notification emails so that we can see if we get it back in the response.- Make sure we tell users after we have added a data file so they can check.
- Time limit the replies
- Check DKIM/SPF etc to make sure the email server is also confident on who the sender is.