[tor-bugs] #12627 [BridgeDB]: canonicalFromSMTP is not what we think it should be

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Mar 25 22:04:52 UTC 2015


#12627: canonicalFromSMTP is not what we think it should be
--------------------------+----------------------------
     Reporter:  sysrqb    |      Owner:  isis
         Type:  defect    |     Status:  new
     Priority:  major     |  Milestone:
    Component:  BridgeDB  |    Version:
   Resolution:            |   Keywords:  bridgedb-email
Actual Points:            |  Parent ID:
       Points:            |
--------------------------+----------------------------

Comment (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 at torproject.org>
 AuthorDate: Wed Mar 25 21:54:45 2015 +0000
 Commit:     Isis Lovecruft <isis at 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())
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/12627#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list