Opened 4 years ago

Last modified 8 months ago

#12627 new defect

canonicalFromSMTP is not what we think it should be

Reported by: sysrqb Owned by: isis
Priority: High Milestone:
Component: Obfuscation/BridgeDB Version:
Severity: Normal Keywords: bridgedb-email
Cc: isis, sysrqb Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

13:29:04 INFO L568:autoresponder.reply() Got an email; deciding whether to reply.
13:29:04 DEBUG L606:autoresponder.runCheck() Canonicalizing client email domain...
13:29:04 DEBUG L613:autoresponder.runCheck() Canonical email domain: gmail.com
13:29:04 ERROR L620:autoresponder.runCheck() SMTP/Email canonical domain mismatch! ponticum vs gmail.com

The last line is generated by:

        # The canonical domains from the SMTP ``MAIL FROM:`` and the email                                                                                   
        # ``From:`` header should match:                                                                                                                     
        if self.incoming.canonicalFromSMTP != canonicalFromEmail:
            logging.error("SMTP/Email canonical domain mismatch!")                                                                                           
            return False

and canonicalFromSMTP is provided by SMTPMessage().

I'm hotfixing it for now.

Child Tickets

Change History (3)

comment:1 Changed 3 years ago by isis

Cc: isis sysrqb added
Keywords: bridgedb-email added; email-distributor removed

comment:2 Changed 3 years ago by isis

I'm re-enabling the following log lines in b.e.a.SMTPAutoresponder.runChecks() in order to facilitate debugging:

commit 43302d0946a13678b4c61300f3646e9f24f03d38 (HEAD, isislovecruft/develop, develop)
Author:     Isis Lovecruft <isis@torproject.org>
AuthorDate: Wed Mar 25 21:54:45 2015 +0000
Commit:     Isis Lovecruft <isis@torproject.org>
CommitDate: Wed Mar 25 21:54:45 2015 +0000

    Log when canonicalFromSMTP doesn't match canonicalFromEmail.

     * ADDS more logging, in order to debug #12627.
       https://bugs.torproject.org/12627

diff --git a/lib/bridgedb/email/autoresponder.py b/lib/bridgedb/email/autoresponder.py
index 4fba40d..0eeb14a 100644
--- a/lib/bridgedb/email/autoresponder.py
+++ b/lib/bridgedb/email/autoresponder.py
@@ -656,12 +656,12 @@ class SMTPAutoresponder(smtp.SMTPClient):

         # The canonical domains from the SMTP ``MAIL FROM:`` and the email
         # ``From:`` header should match:
-        #if self.incoming.canonicalFromSMTP != self.incoming.canonicalFromEmail:
-        #    logging.error("SMTP/Email canonical domain mismatch!")
-        #    logging.debug("Canonical domain mismatch: %s != %s"
-        #                  % (self.incoming.canonicalFromSMTP,
-        #                     self.incoming.canonicalFromEmail))
-        #    return False
+        if self.incoming.canonicalFromSMTP != self.incoming.canonicalFromEmail:
+            logging.error("SMTP/Email canonical domain mismatch!")
+            logging.debug("Canonical domain mismatch: %s != %s"
+                          % (self.incoming.canonicalFromSMTP,
+                             self.incoming.canonicalFromEmail))
+            #return False

         self.incoming.domainRules = self.incoming.context.domainRules.get(
             self.incoming.canonicalFromEmail, list())

comment:3 Changed 8 months ago by teor

Severity: Normal

Set all open tickets without a severity to "Normal"

Note: See TracTickets for help on using tickets.