From 3b1106ee7641051429c325bebb29943a381891bc Mon Sep 17 00:00:00 2001 From: sebastianserfling Date: Tue, 24 Sep 2024 21:12:34 +0200 Subject: [PATCH] add archiv_server / archiv_mail to env --- python_scripte/.env | 4 +++- python_scripte/imapsync.py | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/python_scripte/.env b/python_scripte/.env index f7119a2..8011aaf 100644 --- a/python_scripte/.env +++ b/python_scripte/.env @@ -3,4 +3,6 @@ SMTP_PORT=587 SMTP_USER=serfling@itdata-gera.de SMTP_PASSWORD="xPElLoyD,94,#" FROM_EMAIL=serfling@itdata-gera.de -TO_EMAIL=b.goetze@trendsetzer.eu +TO_EMAIL= +ARCHIV_SERVER= +ARCHIV_MAIL= \ No newline at end of file diff --git a/python_scripte/imapsync.py b/python_scripte/imapsync.py index b52f716..02cfca2 100644 --- a/python_scripte/imapsync.py +++ b/python_scripte/imapsync.py @@ -93,6 +93,9 @@ while True: username, password, domain = user domain_part = username.split('@')[1] user_part = username.split('@')[0] + archiv_mail = os.getenv('ARCHIV_MAIL') + archiv_server = os.getenv('ARCHIV_SERVER') + print(f"User: {username} running.") # Check if the user previously had an authentication failure @@ -108,8 +111,8 @@ while True: "--host1", domain, "--user1", username, "--password1", password, - "--host2", "192.168.178.90", - "--user2", "archiv@", + "--host2", f"{archiv_server}", + "--user2", f"{archiv_mail}", "--password2", "Ln0m2YQZd23H54L5tCiyjIBWLEn8mk36v7KauqS8QFGzu", "--subfolder2", f"{domain_part}/{user_part}", "--regextrans2", "s/^(.*)$/\\1/",