This script automaticaly send incoming emails to a new email address.
The script needs Python 3.x This script is using following packages:
- imaplib
- configparser
- smtplib
- logging
- email
All packages should be pre installed.
To download the scripts enter git clone https://github.com/dnlwttnbrg/automatic-email-forward.git into the console.
Execute the script by entering python3 automatic_email_forward.py. On a linux server type python3 automatic_email_forward.py & to run the script in the background.
If you update the script, make sure you backuped your config-file, because it will be overwritten.
There are several configurations that needs to be done. All configurations can be done in config.ini.
- language: There are at the moment two languages available.
germanandenglish.
- host: The IMAP-host-server. For example
imap.gmail.com. - port: The Imap-Port. For example (google):
993. - name: Login name. Check your provider what credentials you need to use.
- password: Password for your account. Check your provider what credentials you need to use.
- host: The SMTP-host-server. For example
smtp.gmail.com. - port: The SMTP-Port. For example (google):
465. - name: Login name. Check your provider what credentials you need to use.
- password: Password for your account. Check your provider what credentials you need to use.
- sender: The email-address the new email is send from.
- targets: The email.address the new email is send to.