From 2651cb2c45094ef15b243840f0f8a4ca3168dcfd Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Fri, 23 Jan 2015 11:52:42 -0600 Subject: Remove footer --- mail/src/leap/mail/outgoing/service.py | 13 ------------- mail/src/leap/mail/outgoing/tests/test_outgoing.py | 4 +--- 2 files changed, 1 insertion(+), 16 deletions(-) (limited to 'mail/src') diff --git a/mail/src/leap/mail/outgoing/service.py b/mail/src/leap/mail/outgoing/service.py index b70b3b1..88b8895 100644 --- a/mail/src/leap/mail/outgoing/service.py +++ b/mail/src/leap/mail/outgoing/service.py @@ -67,8 +67,6 @@ class OutgoingMail: A service for handling encrypted outgoing mail. """ - FOOTER_STRING = "I prefer encrypted email" - def __init__(self, from_address, keymanager, cert, key, host, port): """ Initialize the mail service. @@ -220,7 +218,6 @@ class OutgoingMail: :rtype: Deferred """ # pass if the original message's content-type is "multipart/encrypted" - lines = raw.split('\r\n') origmsg = Parser().parsestr(raw) if origmsg.get_content_type() == 'multipart/encrypted': @@ -230,16 +227,6 @@ class OutgoingMail: username, domain = from_address.split('@') to_address = validate_address(recipient.dest.addrstr) - # add a nice footer to the outgoing message - # XXX: footer will eventually optional or be removed - if origmsg.get_content_type() == 'text/plain': - lines.append('--') - lines.append('%s - https://%s/key/%s' % - (self.FOOTER_STRING, domain, username)) - lines.append('') - - origmsg = Parser().parsestr('\r\n'.join(lines)) - def signal_encrypt_sign(newmsg): signal(proto.SMTP_END_ENCRYPT_AND_SIGN, "%s,%s" % (self._from_address, to_address)) diff --git a/mail/src/leap/mail/outgoing/tests/test_outgoing.py b/mail/src/leap/mail/outgoing/tests/test_outgoing.py index fa50c30..d7423b6 100644 --- a/mail/src/leap/mail/outgoing/tests/test_outgoing.py +++ b/mail/src/leap/mail/outgoing/tests/test_outgoing.py @@ -58,9 +58,7 @@ class TestOutgoingMail(TestCaseWithKeyManager): self.lines = [line for line in self.EMAIL_DATA[4:12]] self.lines.append('') # add a trailing newline self.raw = '\r\n'.join(self.lines) - self.expected_body = ('\r\n'.join(self.EMAIL_DATA[9:12]) + - "\r\n\r\n--\r\nI prefer encrypted email - " - "https://leap.se/key/anotheruser\r\n") + self.expected_body = '\r\n'.join(self.EMAIL_DATA[9:12]) + "\r\n" self.fromAddr = ADDRESS_2 def init_outgoing_and_proto(_): -- cgit v1.2.3