[or-cvs] r17038: {projects} Kaner is totally awesome: * clean up request/reply code * cl (in projects/gettor: . i18n/de i18n/en)

ioerror at seul.org ioerror at seul.org
Thu Oct 2 19:41:44 UTC 2008


Author: ioerror
Date: 2008-10-02 15:41:43 -0400 (Thu, 02 Oct 2008)
New Revision: 17038

Modified:
   projects/gettor/gettor.py
   projects/gettor/gettor_requests.py
   projects/gettor/gettor_responses.py
   projects/gettor/i18n/de/gettor_de.po
   projects/gettor/i18n/en/gettor_en.po
Log:
Kaner is totally awesome:
* clean up request/reply code
* cleanup main mail processing routine (tis far more classy)
* update i18n messages
* fix language switch for log/reply mails


Modified: projects/gettor/gettor.py
===================================================================
--- projects/gettor/gettor.py	2008-10-02 15:51:09 UTC (rev 17037)
+++ projects/gettor/gettor.py	2008-10-02 19:41:43 UTC (rev 17038)
@@ -98,16 +98,6 @@
     return True
 
 def processMail(conf, log, logLang, packageList):
-    # Get message from stdin
-    rawMessage = gettor_requests.getMessage()
-    parsedMessage = gettor_requests.parseMessage(rawMessage)
-    if not parsedMessage:
-        log.info(_("No parsed message. Dropping message."))
-        exit(1)
-    signature = False
-    signature = gettor_requests.verifySignature(rawMessage)
-    log.info(_("Signature is: %s") % str(signature))
-    replyTo = False
     srcEmail = conf.getSrcEmail()
     # Check package list sanity
     for key, val in packageList.items():
@@ -119,80 +109,53 @@
         log.info(_("Sorry, your package list is unusable."))
         return False
 
-    # XXX TODO: Ensure we have a proper replyTO or bail out (majorly malformed mail).
-    replyTo = gettor_requests.parseReply(parsedMessage)
-
-    # Get disired reply language, if any
-    replyLang = gettor_requests.parseLocale(parsedMessage)
+    # Receive mail
+    rmail = gettor_requests.requestMail(packageList)
+    rawMessage = rmail.getRawMessage()
+    if not rawMessage:
+        log.error(_("No raw message. Something went wrong."))
+        return False
+    parsedMessage = rmail.getParsedMessage()
+    if not parsedMessage:
+        log.error(_("No parsed message. Dropping message."))
+        return False
+    # XXX TODO: Ensure we have a proper replyTO or bail out
+    replyTo = rmail.getReplyTo()
+    if not replyTo:
+        log.error(_("No help dispatched. Invalid reply address for user."))
+        return False
+    # Get desired reply language, if any
+    replyLang = rmail.getLocale()
     if not replyLang:
         replyLang = logLang
-
+    # Initialize response
+    respmail = gettor_responses.gettorResponse(replyLang, logLang)
+    signature = rmail.hasVerifiedSignature()
+    log.info(_("Signature is: %s") % str(signature))
     if not signature:
-        # Check to see if we've helped them to understand that they need DKIM in the past
+        # Check to see if we've helped them to understand that they need DKIM
+        # in the past
         previouslyHelped = gettor_blacklist.blackList(replyTo)
-    
-    if not replyTo:
-        log.info(_("No help dispatched. Invalid reply address for user."))
-        return False
-
     if not signature and previouslyHelped:
         log.info(_("Unsigned messaged to gettor by blacklisted user dropped."))
         return False
-
     if not signature and not previouslyHelped:
         # Reply with some help and bail out
         gettor_blacklist.blackList(replyTo, True)
-        switchLocale(replyLang)
-        message = _("""
-Hello! This is the "get tor" robot.
-
-Unfortunately, we won't answer you at this address. We only process
-requests from email services that support "DKIM", which is an email
-feature that lets us verify that the address in the "From" line is
-actually the one who sent the mail.
-
-Gmail and Yahoo Mail both use DKIM. You will have better luck sending
-us mail from one of those.
-
-(We apologize if you didn't ask for this mail. Since your email is from
-a service that doesn't use DKIM, we're sending a short explanation,
-and then we'll ignore this email address for the next day or so.
-        """)
-        switchLocale(logLang)
-        gettor_responses.sendHelp(message, srcEmail, replyTo)
-        log.info(_("Unsigned messaged to gettor. We issued some help about using DKIM."))
+        respmail.sendHelp(srcEmail, replyTo)
+        log.info(_("Unsigned messaged to gettor. We issued some help."))
         return True
-
     if signature:
         log.info(_("Signed messaged to gettor."))
-        
-        try:
-            package = gettor_requests.parseRequest(parsedMessage, packageList)
-        except:
-            package = None
-
+        package = rmail.getPackage()
         if package != None:
             log.info(_("Package: %s selected.") % str(package))
-            switchLocale(replyLang)
-            message = _("""
-Here's your requested software as a zip file. Please unzip the 
-package and verify the signature.
-            """)
-            switchLocale(logLang)
-            gettor_responses.sendPackage(message, srcEmail, replyTo, packageList[package])  
-            return True
+            respmail.sendPackage(srcEmail, replyTo, packageList[package])  
         else:
-            switchLocale(replyLang)
-            message = [_("Hello, I'm a robot. ")]
-            message.append(_("Your request was not understood. Please select one of the following package names:\n"))
+            respmail.sendPackageHelp(packageList, srcEmail, replyTo)
+            log.info(_("We issued some help about proper email formatting."))
 
-            for key in packageList.keys():
-                message.append(key + "\n")
-            message.append(_("Please send me another email. It only needs a single package name anywhere in the body of your email.\n"))
-            switchLocale(logLang)
-            gettor_responses.sendHelp(''.join(message), srcEmail, replyTo)
-            log.info(_("Signed messaged to gettor. We issued some help about proper email formatting."))
-            return True
+    return True
 
 if __name__ == "__main__":
     # Parse command line, setup config, logging and language

Modified: projects/gettor/gettor_requests.py
===================================================================
--- projects/gettor/gettor_requests.py	2008-10-02 15:51:09 UTC (rev 17037)
+++ projects/gettor/gettor_requests.py	2008-10-02 19:41:43 UTC (rev 17038)
@@ -1,7 +1,14 @@
 #!/usr/bin/python2.5
 # -*- coding: utf-8 -*-
 """
-This library implements all of the email parsing features needed for gettor.
+ gettor_config.py - Parse configuration file for gettor
+
+ Copyright (c) 2008, Jacob Appelbaum <jacob at appelbaum.net>, 
+                     Christian Fromme <kaner at strace.org>
+
+ This is Free Software. See LICENSE for license information.
+
+ This library implements all of the email parsing features needed for gettor.
 """
 
 import sys
@@ -9,60 +16,75 @@
 import dkim
 import re
 
-def getMessage():
-    """ Read the message into a buffer and return it """
-    rawMessage = sys.stdin.read()
-    return rawMessage
+class requestMail:
 
-def verifySignature(rawMessage):
-    """ Attempt to verify the DKIM signature of a message and return a positive or negative status """
-    signature = False
+    defaultLang = "en"
+    supportedLangs = { "en": "English", 
+                       "de": "Deutsch" }
 
-    # TODO XXX:
-    # This should catch DNS exceptions and fail to verify if we have a 
-    # dns timeout
-    if dkim.verify(rawMessage):
-        signature = True
-        return signature
-    else:
-        return signature
+    def __init__(self, packages):
+        """
+        Read message from stdin, parse all the stuff we want to know
+        """
+        self.rawMessage = sys.stdin.read()
+        self.parsedMessage = email.message_from_string(self.rawMessage)
+        self.signature = False
+        # TODO XXX:
+        # This should catch DNS exceptions and fail to verify if we have a 
+        # dns timeout
+        # We also should catch totally malformed messages here
+        try:
+            if dkim.verify(self.rawMessage):
+                self.signature = True
+        except:
+            pass
 
-def parseMessage(message):
-    """ parse an email message and return a parsed email object """
-    return email.message_from_string(message)
+        # TODO XXX: 
+        # Scrub this data
+        self.replyToAddress = None
+        self.replytoAddress = self.parsedMessage["from"]
+        # If no package name could be recognized, use 'None'
+        self.returnPackage = None
+        # XXX TODO:
+        # Should we pick only the first line of the email body. Drop the rest?
+        # It may be too unfriendly to our users
+        for line in email.Iterators.body_line_iterator(self.parsedMessage):
+            for package in packages.keys():
+                match = re.match(package, line)    
+                if match: 
+                    self.returnPackage = package
 
-def parseReply(parsedMessage):
-    """ Return an email address that we want to email """
-    # TODO XXX: 
-    # Scrub this data
-    address = parsedMessage["from"]
-    return address
+        self.replyLocale = None
+        pattern = re.compile("^Lang:\s+(.*)$")
+        for line in email.Iterators.body_line_iterator(self.parsedMessage):
+            match = pattern.match(line)
+            if match:
+                self.replyLocale = match.group(1)
 
-def parseRequest(parsedMessage, packages):
-    """ This parses the request and returns the first specific package name for
-    sending. If we do not understand the request, we return None as the package
-    name."""
-    # XXX TODO:
-    # Should we pick only the first line of the email body. Drop the rest?
-    # It may be too unfriendly to our users
-    for line in email.Iterators.body_line_iterator(parsedMessage):
-        for package in packages.keys():
-            match = re.match(package, line)    
-            if match: 
-                return package
-    # If we get here, we didn't find a package we're currently serving
-    return None
+        for (key, lang) in self.supportedLangs.items():
+            if self.replyLocale == key:
+                break
+        else:
+            self.replyLocale = self.defaultLang
 
-def parseLocale(parsedMessage):
-    """Check if the user wants a reply in a certain language"""
-    pattern = re.compile("^Lang:\s+(.*)$")
-    for line in email.Iterators.body_line_iterator(parsedMessage):
-        match = pattern.match(line)
-        if match:
-            return match.group(1)
-    else:
-        return None
+    def getRawMessage(self):
+        return self.rawMessage
 
+    def hasVerifiedSignature(self):
+        return self.signature
+
+    def getParsedMessage(self):
+        return self.parsedMessage
+
+    def getReplyTo(self):
+        return self.replytoAddress
+
+    def getPackage(self):
+        return self.returnPackage
+
+    def getLocale(self):
+        return self.replyLocale
+
 if __name__ == "__main__" :
     """ Give us an email to understand what we think of it. """
     packageList = { 
@@ -72,23 +94,24 @@
         "source-bundle": "/var/lib/gettor/pkg/source-bundle.z"
         }
 
-    print _("Fetching raw message.")
-    rawMessage = getMessage()
+    rmail = requestMail(packageList)
+    print "Fetching raw message."
+    rawMessage = rmail.getRawMessage()
     # This doesn't work without DNS ( no wifi on board current airplane )
-    print _("Verifying signature of message.")
-    signature = verifySignature(rawMessage)
-    print _("Parsing Message.")
-    parsedMessage = parseMessage(rawMessage)
-    print _("Parsing reply.")
-    parsedReply = parseReply(parsedMessage)
-    print _("Parsing package request.")
-    package = parseRequest(parsedMessage, packageList)
+    print "Verifying signature of message."
+    signature = rmail.hasVerifiedSignature()
+    print "Parsing Message."
+    parsedMessage = rmail.getParsedMessage()
+    print "Parsing reply."
+    parsedReply = rmail.getReplyTo()
+    print "Parsing package request."
+    package = rmail.getRequestPackage()
     if package == None:
-        package = "help"        
+        packageFile = "help"        
     else:
-        package = packageList[package]
+        packageFile = packageList[package]
 
-    print _("The signature status of the email is: %s") % str(signature)
-    print _("The email requested the following reply address: %s") % parsedReply
-    print _("It looks like the email requested the following package: %s") % package
-    print _("We would select the following package file: ") % package
+    print "The signature status of the email is: %s" % str(signature)
+    print "The email requested the following reply address: %s" % parsedReply
+    print "It looks like the email requested the following package: %s" % package
+    print "We would select the following package file: %s" % packageFile

Modified: projects/gettor/gettor_responses.py
===================================================================
--- projects/gettor/gettor_responses.py	2008-10-02 15:51:09 UTC (rev 17037)
+++ projects/gettor/gettor_responses.py	2008-10-02 19:41:43 UTC (rev 17038)
@@ -1,69 +1,138 @@
 #!/usr/bin/python2.5
 # -*- coding: utf-8 -*-
-""" This library implements all of the email replying features needed for gettor. """
+"""
+ gettor_config.py - Parse configuration file for gettor
 
+ Copyright (c) 2008, Jacob Appelbaum <jacob at appelbaum.net>, 
+                     Christian Fromme <kaner at strace.org>
+
+ This is Free Software. See LICENSE for license information.
+
+ This library implements all of the email replying features needed for gettor. 
+"""
+
 import smtplib
 import MimeWriter
 import StringIO
 import base64
+import gettext
 
-def sendHelp(message, source, destination):
-    """ Send a helpful message to the user interacting with us """
-    help = constructMessage(message, source, destination)
-    try:
-        status = sendMessage(help, source, destination)
-    except:
-        status = False
-    return status
 
-def sendPackage(message, source, destination, filelist):
-    """ Send a message with an attachment to the user interacting with us """
-    package = constructMessage(message, source, destination, filelist)
-    try:
-        status = sendMessage(package, source, destination)
-    except:
-        status = False
-    return status
+class gettorResponse():
 
-def constructMessage(messageText, ourAddress, recipient, fileList=None, fileName="requested-files.z"):
-    """ Construct a multi-part mime message, including only the first part
-    with plaintext."""
+    def __init__(self, mailLang="en", logLang="en"):
+        self.mailLang = mailLang
+        self.logLang = logLang
 
-    message = StringIO.StringIO()
-    mime = MimeWriter.MimeWriter(message)
-    mime.addheader('MIME-Version', '1.0')
-    mime.addheader('Subject', _('Re: Your "get tor" request'))
-    mime.addheader('To', recipient)
-    mime.addheader('From', ourAddress)
-    mime.startmultipartbody('mixed')
+    def setLang(self, language):
+        # XXX: Sorta hack, have nothing better on my mind right now
+        # On every entry to a translation-needing function, call this with lang=maillang
+        # On every exit of a translation-needing function, call this with lang=loglang
+        # :-/
+        trans = gettext.translation("gettor", "/usr/share/locale", [language])
+        trans.install()
 
-    firstPart = mime.nextpart()
-    emailBody = firstPart.startbody('text/plain')
-    emailBody.write(messageText)
+    def sendHelp(self, source, destination):
+        """ Send a helpful message to the user interacting with us """
+        self.setLang(self.mailLang)
+        message = _("""
+    Hello! This is the "get tor" robot.
 
-    # Add a file if we have one
-    if fileList:
-        # XXX TODO: Iterate over each file eventually
-        filePart = mime.nextpart()
-        filePart.addheader('Content-Transfer-Encoding', 'base64')
-        emailBody = filePart.startbody('application/zip; name=%s' % fileName)
-        base64.encode(open(fileList, 'rb'), emailBody)
+    Unfortunately, we won't answer you at this address. We only process
+    requests from email services that support "DKIM", which is an email
+    feature that lets us verify that the address in the "From" line is
+    actually the one who sent the mail.
 
-    # Now end the mime messsage
-    mime.lastpart()
-    return message
+    Gmail and Yahoo Mail both use DKIM. You will have better luck sending
+    us mail from one of those.
 
-def sendMessage(message, src, dst, smtpserver="localhost:25"):
-    try:
-        smtp = smtplib.SMTP(smtpserver)
-        smtp.sendmail(src, dst, message.getvalue())
-        smtp.quit()
-        status = True
-    except:
-        return False
+    (We apologize if you didn't ask for this mail. Since your email is from
+    a service that doesn't use DKIM, we're sending a short explanation,
+    and then we'll ignore this email address for the next day or so.
+        """)
+        help = self.constructMessage(message, source, destination)
+        try:
+            status = self.sendMessage(help, source, destination)
+        except:
+            status = False
+        self.setLang(self.logLang)
 
-    return status
+        return status
 
+    def sendPackageHelp(self, packageList, source, destination):
+        """ Send a helpful message to the user interacting with us """
+        self.setLang(self.mailLang)
+        message = [_("Hello, I'm a robot. ")]
+        message.append(_("Your request was not understood. Please select one of the following package names:\n"))
+
+        for key in packageList.keys():
+            message.append(key + "\n")
+        message.append(_("Please send me another email. It only needs a single package name anywhere in the body of your email.\n"))
+        help = self.constructMessage(''.join(message), source, destination)
+        try:
+            status = self.sendMessage(help, source, destination)
+        except:
+            status = False
+        self.setLang(self.logLang)
+
+        return status
+
+    def sendPackage(self, source, destination, filelist):
+        """ Send a message with an attachment to the user interacting with us """
+        self.setLang(self.mailLang)
+        message = _("""
+    Here's your requested software as a zip file. Please unzip the 
+    package and verify the signature.
+        """)
+        package = self.constructMessage(source, destination, filelist)
+        try:
+            status = self.sendMessage(package, source, destination)
+        except:
+            status = False
+        self.setLang(self.mailLang)
+
+        return status
+
+    def constructMessage(self, messageText, ourAddress, recipient, fileList=None, 
+                         fileName="requested-files.z"):
+        """ Construct a multi-part mime message, including only the first part
+        with plaintext."""
+
+        message = StringIO.StringIO()
+        mime = MimeWriter.MimeWriter(message)
+        mime.addheader('MIME-Version', '1.0')
+        mime.addheader('Subject', _('Re: Your "get tor" request'))
+        mime.addheader('To', recipient)
+        mime.addheader('From', ourAddress)
+        mime.startmultipartbody('mixed')
+
+        firstPart = mime.nextpart()
+        emailBody = firstPart.startbody('text/plain')
+        emailBody.write(messageText)
+
+        # Add a file if we have one
+        if fileList:
+            # XXX TODO: Iterate over each file eventually
+            filePart = mime.nextpart()
+            filePart.addheader('Content-Transfer-Encoding', 'base64')
+            emailBody = filePart.startbody('application/zip; name=%s' % fileName)
+            base64.encode(open(fileList, 'rb'), emailBody)
+
+        # Now end the mime messsage
+        mime.lastpart()
+        return message
+
+    def sendMessage(self, message, src, dst, smtpserver="localhost:25"):
+        try:
+            smtp = smtplib.SMTP(smtpserver)
+            smtp.sendmail(src, dst, message.getvalue())
+            smtp.quit()
+            status = True
+        except:
+            return False
+
+        return status
+
 if __name__ == "__main__" :
     print "This is the response handling code. You probably do not want to call it by hand."
 

Modified: projects/gettor/i18n/de/gettor_de.po
===================================================================
--- projects/gettor/i18n/de/gettor_de.po	2008-10-02 15:51:09 UTC (rev 17037)
+++ projects/gettor/i18n/de/gettor_de.po	2008-10-02 19:41:43 UTC (rev 17038)
@@ -15,148 +15,151 @@
 "Generated-By: pygettext.py 1.5\n"
 
 
-#: gettor.py:86
+#: gettor.py:106
+msgid "Warning: %s not accessable. Removing from list."
+msgstr "Warnung: %s nicht zugreifbar. Entferne es von der Liste."
+
+#: gettor.py:109
+msgid "Sorry, your package list is unusable."
+msgstr "Ihre Paketliste ist leider unbenutzbar."
+
+#: gettor.py:116
+msgid "No raw message. Something went wrong."
+msgstr "Keine Email im urspruenglichen Format vorhanden. Irgendetwas muss schief gegangen sein."
+
+#: gettor.py:120
 msgid "No parsed message. Dropping message."
-msgstr "Konnte die Nachricht nicht parsen. Loesche Nachricht."
+msgstr "Keine vorverarbeitete Email vorhanden. Verwerfe Paket."
 
-#: gettor.py:91
+#: gettor.py:125
+msgid "No help dispatched. Invalid reply address for user."
+msgstr "Keine Hilfe versandt. Ungueltige Antwortadresse des Users."
+
+#: gettor.py:134
 msgid "Signature is: %s"
 msgstr "Die Signatur ist: %s"
 
-#: gettor.py:104
+#: gettor.py:140
+msgid "Unsigned messaged to gettor by blacklisted user dropped."
+msgstr "Nicht signierte Nachricht an gettor von einem bereits auf der Blacklist befindlichen User verworfen."
+
+#: gettor.py:146
+msgid "Unsigned messaged to gettor. We issued some help."
+msgstr "Nicht signierte Nachricht an gettor. Hilfe versandt."
+
+#: gettor.py:149
+msgid "Signed messaged to gettor."
+msgstr "Signierte Nachricht an gettor."
+
+#: gettor.py:152
+msgid "Package: %s selected."
+msgstr "Paket %s ausgewaehlt."
+
+#: gettor.py:156
+msgid "We issued some help about proper email formatting."
+msgstr "Hilfe zum richtigen Formatieren einer Anfrage-Mail versandt."
+
+#: gettor.py:170
 msgid "Sorry, %s is not a directory."
-msgstr "Achtung, %s ist kein Verzeichnis."
+msgstr "%s ist kein Verzeichnis."
 
-#: gettor.py:118
-msgid "Warning: %s not accessable. Removing from list."
-msgstr "Achtung: %s unbenutzbar. Entferne von Liste."
+#: gettor.py:177
+msgid "Syncing Tor packages failed."
+msgstr "Synchronisieren der Tor Pakete fehlgeschlagen."
 
-#: gettor.py:121
-msgid "Sorry, your package list is unusable."
-msgstr "Die Paketliste ist unbenutzbar."
+#: gettor.py:180
+msgid "Syncing Tor packages done."
+msgstr "Synchronisieren der Tor Pakete erfolgreich."
 
-#: gettor.py:137
-msgid "No help dispatched. Invalid reply address for user."
-msgstr "Keine Hilfe versandt. Ungueltige Reply Adresse."
+#: gettor.py:184
+msgid "Building packages failed."
+msgstr "Vorbereiten der Pakete fehlgeschlagen."
 
-#: gettor.py:141
-msgid "Unsigned messaged to gettor by blacklisted user dropped."
-msgstr "Unsignierte Nachricht blacklisted und verworfen."
+#: gettor.py:187
+msgid "Building packages done."
+msgstr "Vorbereiten der Pakete erfolgreich."
 
-#: gettor.py:148
+#: gettor.py:191
+msgid "Tests failed."
+msgstr "Tests fehlgeschlagen."
+
+#: gettor.py:194
+msgid "Tests passed."
+msgstr "Tests bestanden."
+
+#: gettor.py:198
+msgid "Installing cron failed"
+msgstr "Installation von cron fehlgeschlagen."
+
+#: gettor.py:201
+msgid "Installing cron done."
+msgstr "Installation von cron erfolgreich."
+
+#: gettor.py:206
+msgid "Processing mail failed."
+msgstr "Verarbeitung der Email fehlgeschlagen."
+
+#: gettor_responses.py:26
 msgid ""
 "\n"
-"Hello! This is the \"get tor\" robot.\n"
+"    Hello! This is the \"get tor\" robot.\n"
 "\n"
-"Unfortunately, we won't answer you at this address. We only process\n"
-"requests from email services that support \"DKIM\", which is an email\n"
-"feature that lets us verify that the address in the \"From\" line is\n"
-"actually the one who sent the mail.\n"
+"    Unfortunately, we won't answer you at this address. We only process\n"
+"    requests from email services that support \"DKIM\", which is an email\n"
+"    feature that lets us verify that the address in the \"From\" line is\n"
+"    actually the one who sent the mail.\n"
 "\n"
-"Gmail and Yahoo Mail both use DKIM. You will have better luck sending\n"
-"us mail from one of those.\n"
+"    Gmail and Yahoo Mail both use DKIM. You will have better luck sending\n"
+"    us mail from one of those.\n"
 "\n"
-"(We apologize if you didn't ask for this mail. Since your email is from\n"
-"a service that doesn't use DKIM, we're sending a short explanation,\n"
-"and then we'll ignore this email address for the next day or so.\n"
+"    (We apologize if you didn't ask for this mail. Since your email is from\n"
+"    a service that doesn't use DKIM, we're sending a short explanation,\n"
+"    and then we'll ignore this email address for the next day or so.\n"
 "        "
 msgstr ""
 "\n"
-"Hallo! Diese Nachricht kommt vom \"get tor\" robot.\n"
+"   Hallo! Diese Nachricht kommt vom \"get tor\" robot.\n"
 "\n"
-"Leider koennen wir Ihnen auf diese Adresse nicht antworten. Wir koennen\n"
-"nur Requests von Email-Diensten verarbeiten, die den \"DKIM\"-Service\n"
-"unterstuetzen. DKIM ist ein Dienst, der uns ueberpruefen laesst, ob die\n"
-"Absenderadresse einer Email tatsaechlich von dort kommt, woher sie\n"
-"vorgibt zu kommen.\n"
+"   Leider koennen wir Ihnen auf diese Adresse nicht antworten. Wir koennen\n"
+"   nur Requests von Email-Diensten verarbeiten, die den \"DKIM\"-Service\n"
+"   unterstuetzen. DKIM ist ein Dienst, der uns ueberpruefen laesst, ob die\n"
+"   Absenderadresse einer Email tatsaechlich von dort kommt, woher sie\n"
+"   vorgibt zu kommen.\n"
 "\n"
-"(Bitte entschuldigen Sie, wenn diese Email Sie ohne ihr zutuen erreicht.\n"
-"Da diese Email ohnehin von einer Adresse kam, die kein DKIM unterstuetzt,\n"
-"senden wir nur diese kurze Erklaerung und ignorieren Ihre Adresse fuer\n"
-"den naechsten Tag.)\n"
+"   (Bitte entschuldigen Sie, wenn diese Email Sie ohne ihr zutuen erreicht.\n"
+"   Da diese Email ohnehin von einer Adresse kam, die kein DKIM unterstuetzt,\n"
+"   senden wir nur diese kurze Erklaerung und ignorieren Ihre Adresse fuer\n"
+"   den naechsten Tag.)\n"
 "        "
 
-#: gettor.py:165
-msgid "Unsigned messaged to gettor. We issued some help about using DKIM."
-msgstr "Unsignierte Nachricht. Hilfe zu DKIM versandt."
-
-#: gettor.py:169
-msgid "Signed messaged to gettor."
-msgstr "Signierte Nachricht empfangen."
-
-#: gettor.py:177
-msgid "Package: %s selected."
-msgstr "Paket: %s gewaehlt."
-
-#: gettor.py:178
-msgid ""
-"\n"
-"Here's your requested software as a zip file. Please unzip the \n"
-"package and verify the signature.\n"
-"            "
-msgstr ""
-"\n"
-"Hier ist die von Ihnen angeforderte Software als Zip-datei. Bitte\n"
-"entpacken Sie diese und verifizieren Sie die digitale Signatur.\n"
-"            "
-
-#: gettor.py:186
+#: gettor_responses.py:53
 msgid "Hello, I'm a robot. "
-msgstr "Hallo, Ich bin der automatische Mail-Versandt"
+msgstr "Hallo, ich bin der automatische Tor-Mailversandt."
 
-#: gettor.py:187
+#: gettor_responses.py:54
 msgid ""
 "Your request was not understood. Please select one of the following package names:\n"
 msgstr ""
 "Ihre Anfrage war nicht zu verstehen. Bitte waehlen Sie eines der folgenden Paketnamen:\n"
 
-#: gettor.py:191
+#: gettor_responses.py:58
 msgid ""
 "Please send me another email. It only needs a single package name anywhere in the body of your email.\n"
 msgstr ""
 "Bitte senden Sie mir eine weitere Email. Schreiben Sie darin lediglich den Paketnamen.\n"
 
-#: gettor.py:194
-msgid "Signed messaged to gettor. We issued some help about proper email formatting."
-msgstr "Signierte Nachricht empfangen. Hilfe ueber das richtige formatieren von Email versandt."
+#: gettor_responses.py:71
+msgid ""
+"\n"
+"    Here's your requested software as a zip file. Please unzip the \n"
+"    package and verify the signature.\n"
+"        "
+"\n"
+"Hier ist die von Ihnen angeforderte Software als Zip-datei. Bitte\n"
+"entpacken Sie diese und verifizieren Sie die digitale Signatur.\n"
+"            "
 
-#: gettor_requests.py:75
-msgid "Fetching raw message."
-msgstr "Hole Nachricht im Raw-Format."
-
-#: gettor_requests.py:78
-msgid "Verifying signature of message."
-msgstr "Verifiziere Signatur der Nachricht."
-
-#: gettor_requests.py:80
-msgid "Parsing Message."
-msgstr "Verarbeite Nachricht."
-
-#: gettor_requests.py:82
-msgid "Parsing reply."
-msgstr "Verarbeite Antwort."
-
-#: gettor_requests.py:44
-msgid "Parsing package request."
-msgstr "Verarbeite Paketanfrage."
-
-#: gettor_requests.py:91
-msgid "The signature status of the email is: %s"
-msgstr "Der Signatur-Status dieser Email ist: %s"
-
-#: gettor_requests.py:92
-msgid "The email requested the following reply address: %s"
-msgstr "Die verlangte Email hat folgende Antwortadresse: %s"
-
-#: gettor_requests.py:93
-msgid "It looks like the email requested the following package: %s"
-msgstr "Es sieht aus als wuerde die Email folgendes Paket anfodern: %s"
-
-#: gettor_requests.py:94
-msgid "We would select the following package file: "
-msgstr "Folgendes Paket wird ausgeaehlt: "
-
-#: gettor_responses.py:35
+#: gettor_responses.py:92
 msgid "Re: Your \"get tor\" request"
 msgstr "Re: Ihre \"get tor\" Anfrage"
 

Modified: projects/gettor/i18n/en/gettor_en.po
===================================================================
--- projects/gettor/i18n/en/gettor_en.po	2008-10-02 15:51:09 UTC (rev 17037)
+++ projects/gettor/i18n/en/gettor_en.po	2008-10-02 19:41:43 UTC (rev 17038)
@@ -15,128 +15,132 @@
 "Generated-By: pygettext.py 1.5\n"
 
 
-#: gettor.py:86
-msgid "No parsed message. Dropping message."
+#: gettor.py:106
+msgid "Warning: %s not accessable. Removing from list."
 msgstr ""
 
-#: gettor.py:91
-msgid "Signature is: %s"
+#: gettor.py:109
+msgid "Sorry, your package list is unusable."
 msgstr ""
 
-#: gettor.py:104
-msgid "Sorry, %s is not a directory."
+#: gettor.py:116
+msgid "No raw message. Something went wrong."
 msgstr ""
 
-#: gettor.py:118
-msgid "Warning: %s not accessable. Removing from list."
+#: gettor.py:120
+msgid "No parsed message. Dropping message."
 msgstr ""
 
-#: gettor.py:121
-msgid "Sorry, your package list is unusable."
+#: gettor.py:125
+msgid "No help dispatched. Invalid reply address for user."
 msgstr ""
 
-#: gettor.py:137
-msgid "No help dispatched. Invalid reply address for user."
+#: gettor.py:134
+msgid "Signature is: %s"
 msgstr ""
 
-#: gettor.py:141
+#: gettor.py:140
 msgid "Unsigned messaged to gettor by blacklisted user dropped."
 msgstr ""
 
-#: gettor.py:148
-msgid ""
-"\n"
-"Hello! This is the \"get tor\" robot.\n"
-"\n"
-"Unfortunately, we won't answer you at this address. We only process\n"
-"requests from email services that support \"DKIM\", which is an email\n"
-"feature that lets us verify that the address in the \"From\" line is\n"
-"actually the one who sent the mail.\n"
-"\n"
-"Gmail and Yahoo Mail both use DKIM. You will have better luck sending\n"
-"us mail from one of those.\n"
-"\n"
-"(We apologize if you didn't ask for this mail. Since your email is from\n"
-"a service that doesn't use DKIM, we're sending a short explanation,\n"
-"and then we'll ignore this email address for the next day or so.\n"
-"        "
+#: gettor.py:146
+msgid "Unsigned messaged to gettor. We issued some help."
 msgstr ""
 
-#: gettor.py:165
-msgid "Unsigned messaged to gettor. We issued some help about using DKIM."
+#: gettor.py:149
+msgid "Signed messaged to gettor."
 msgstr ""
 
-#: gettor.py:169
-msgid "Signed messaged to gettor."
+#: gettor.py:152
+msgid "Package: %s selected."
 msgstr ""
 
+#: gettor.py:156
+msgid "We issued some help about proper email formatting."
+msgstr ""
+
+#: gettor.py:170
+msgid "Sorry, %s is not a directory."
+msgstr ""
+
 #: gettor.py:177
-msgid "Package: %s selected."
+msgid "Syncing Tor packages failed."
 msgstr ""
 
-#: gettor.py:178
-msgid ""
-"\n"
-"Here's your requested software as a zip file. Please unzip the \n"
-"package and verify the signature.\n"
-"            "
+#: gettor.py:180
+msgid "Syncing Tor packages done."
 msgstr ""
 
-#: gettor.py:186
-msgid "Hello, I'm a robot. "
+#: gettor.py:184
+msgid "Building packages failed."
 msgstr ""
 
 #: gettor.py:187
-msgid ""
-"Your request was not understood. Please select one of the following package names:\n"
+msgid "Building packages done."
 msgstr ""
 
 #: gettor.py:191
-msgid ""
-"Please send me another email. It only needs a single package name anywhere in the body of your email.\n"
+msgid "Tests failed."
 msgstr ""
 
 #: gettor.py:194
-msgid "Signed messaged to gettor. We issued some help about proper email formatting."
+msgid "Tests passed."
 msgstr ""
 
-#: gettor_requests.py:75
-msgid "Fetching raw message."
+#: gettor.py:198
+msgid "Installing cron failed"
 msgstr ""
 
-#: gettor_requests.py:78
-msgid "Verifying signature of message."
+#: gettor.py:201
+msgid "Installing cron done."
 msgstr ""
 
-#: gettor_requests.py:80
-msgid "Parsing Message."
+#: gettor.py:206
+msgid "Processing mail failed."
 msgstr ""
 
-#: gettor_requests.py:82
-msgid "Parsing reply."
+#: gettor_responses.py:26
+msgid ""
+"\n"
+"    Hello! This is the \"get tor\" robot.\n"
+"\n"
+"    Unfortunately, we won't answer you at this address. We only process\n"
+"    requests from email services that support \"DKIM\", which is an email\n"
+"    feature that lets us verify that the address in the \"From\" line is\n"
+"    actually the one who sent the mail.\n"
+"\n"
+"    Gmail and Yahoo Mail both use DKIM. You will have better luck sending\n"
+"    us mail from one of those.\n"
+"\n"
+"    (We apologize if you didn't ask for this mail. Since your email is from\n"
+"    a service that doesn't use DKIM, we're sending a short explanation,\n"
+"    and then we'll ignore this email address for the next day or so.\n"
+"        "
 msgstr ""
 
-#: gettor_requests.py:84
-msgid "Parsing package request."
+#: gettor_responses.py:53
+msgid "Hello, I'm a robot. "
 msgstr ""
 
-#: gettor_requests.py:91
-msgid "The signature status of the email is: %s"
+#: gettor_responses.py:54
+msgid ""
+"Your request was not understood. Please select one of the following package names:\n"
 msgstr ""
 
-#: gettor_requests.py:92
-msgid "The email requested the following reply address: %s"
+#: gettor_responses.py:58
+msgid ""
+"Please send me another email. It only needs a single package name anywhere in the body of your email.\n"
 msgstr ""
 
-#: gettor_requests.py:93
-msgid "It looks like the email requested the following package: %s"
+#: gettor_responses.py:71
+msgid ""
+"\n"
+"    Here's your requested software as a zip file. Please unzip the \n"
+"    package and verify the signature.\n"
+"        "
 msgstr ""
 
-#: gettor_requests.py:94
-msgid "We would select the following package file: "
-msgstr ""
-
-#: gettor_responses.py:35
+#: gettor_responses.py:92
 msgid "Re: Your \"get tor\" request"
 msgstr ""
 



More information about the tor-commits mailing list