commit 7853c1264383284b806d41626796f2a6917b55b0 Author: hiro hiro@torproject.org Date: Fri Mar 1 15:16:30 2019 +0100
Update how Gettor processes emails --- gettor.conf.json | 4 ++-- scripts/process_email | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/gettor.conf.json b/gettor.conf.json index d97b4fb..4a0cd27 100644 --- a/gettor.conf.json +++ b/gettor.conf.json @@ -1,7 +1,7 @@ { "platforms": ["linux", "osx", "windows"], - "dbname": "gettor.db", - "email_parser_logfile": "email_parser.log", + "dbname": "/srv/gettor.torproject.org/home/gettor-hiro/gettor.db", + "email_parser_logfile": "/srv/gettor.torproject.org/home/gettor-hiro/log/email_parser.log", "email_requests_limit": 5, "sendmail_interval": 10, "sendmail_addr": "email@addr", diff --git a/scripts/process_email b/scripts/process_email index acbefd6..6fbc8ca 100755 --- a/scripts/process_email +++ b/scripts/process_email @@ -9,14 +9,15 @@ # :license: This is Free Software. See LICENSE for license information.
import sys -sys.path.insert(0, '..') - +import os from twisted.python import log from twisted.internet import defer, reactor
-from gettor import EMAIL_PARSER_LOGFILE +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from gettor.parse.email import EmailParser, AddressError, DKIMError
+EMAIL_PARSER_LOGFILE = "/srv/gettor.torproject.org/home/gettor-hiro/log/email_parser.log" + @defer.inlineCallbacks def process_email(message):
tor-commits@lists.torproject.org