forked from Disroot/gpg-lacre
Rename sort_recipients to deliver_message, remove unused imports
This commit is contained in:
parent
b627fde510
commit
5ffbbec5f0
2 changed files with 3 additions and 21 deletions
|
@ -19,30 +19,12 @@
|
|||
# along with gpg-mailgate source code. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
from configparser import RawConfigParser
|
||||
from email.mime.base import MIMEBase
|
||||
from email.mime.multipart import MIMEMultipart
|
||||
import copy
|
||||
import email
|
||||
import email.message
|
||||
import email.utils
|
||||
import GnuPG
|
||||
import os
|
||||
import re
|
||||
import smtplib
|
||||
import sys
|
||||
import syslog
|
||||
import traceback
|
||||
import time
|
||||
|
||||
|
||||
# imports for S/MIME
|
||||
from M2Crypto import BIO, Rand, SMIME, X509
|
||||
from email.mime.message import MIMEMessage
|
||||
|
||||
import logging
|
||||
|
||||
import lacre
|
||||
import lacre.text as text
|
||||
import lacre.config as conf
|
||||
import lacre.mailgate as mailgate
|
||||
|
||||
|
@ -65,7 +47,7 @@ from_addr = raw_message['From']
|
|||
to_addrs = sys.argv[1:]
|
||||
|
||||
# Let's start
|
||||
mailgate.sort_recipients(raw_message, from_addr, to_addrs)
|
||||
mailgate.deliver_message(raw_message, from_addr, to_addrs)
|
||||
(elapsed_s, process_t) = mailgate.exec_time_info(start)
|
||||
|
||||
LOG.info("Elapsed-time: {elapsed:.2f}s; Process-time: {process:.4f}s".format(elapsed=elapsed_s, process=process_t))
|
||||
|
|
|
@ -394,7 +394,7 @@ def send_msg( message, recipients ):
|
|||
else:
|
||||
LOG.info("No recipient found")
|
||||
|
||||
def sort_recipients( raw_message, from_address, to_addrs ):
|
||||
def deliver_message( raw_message, from_address, to_addrs ):
|
||||
global LOG
|
||||
global from_addr
|
||||
|
||||
|
|
Loading…
Reference in a new issue