Browse Source

Rename sort_recipients to deliver_message, remove unused imports

pull/91/head
Piotr F. Mieszkowski 3 weeks ago
parent
commit
5ffbbec5f0
  1. 22
      gpg-mailgate.py
  2. 2
      lacre/mailgate.py

22
gpg-mailgate.py

@ -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))

2
lacre/mailgate.py

@ -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…
Cancel
Save