diff options
-rwxr-xr-x | jobs/JobBase.py | 4 | ||||
-rwxr-xr-x | settings.cfg.example | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/jobs/JobBase.py b/jobs/JobBase.py index 8ecdef4..cdb835d 100755 --- a/jobs/JobBase.py +++ b/jobs/JobBase.py @@ -40,7 +40,9 @@ def sendEmail(config, subject, body, to=""): # Prepare actual message # Avoid gmail threading - subject = "[" + config.get('general', 'servername') + "] " + subject + " " + str(random.random()) + subject = "[" + config.get('general', 'servername') + "] " + subject + " " + if config.get('email', 'bustgmailthreading'): + subject += str(random.random()) message = """\From: %s\nTo: %s\nSubject: %s\n\n%s""" \ % (FROM, ", ".join(to), subject, body) try: diff --git a/settings.cfg.example b/settings.cfg.example index 02531cf..3ce86f2 100755 --- a/settings.cfg.example +++ b/settings.cfg.example @@ -11,6 +11,8 @@ imapserver=imap.gmail.com #I create a filter that automatically deletes my sent messages.
# This way, anyone who hacks the account only sees the last 30 days of messages I've sent
ideletesentmessagesautomatically=True
+#If set, append a random number to prevent gmail threading
+bustgmailthreading=False
[peers]
peer1=http://someserver.com:5000,admin@someserverbackup.com
|