Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Hiro
GetTor
Commits
7853c126
Commit
7853c126
authored
Mar 01, 2019
by
Hiro
🏄
Browse files
Update how Gettor processes emails
parent
dd799fd5
Changes
2
Hide whitespace changes
Inline
Side-by-side
gettor.conf.json
View file @
7853c126
{
"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"
,
...
...
scripts/process_email
View file @
7853c126
...
...
@@ -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
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment