~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to scripts/process-one-mail.py

  • Committer: mbp at canonical
  • Date: 2011-09-15 06:39:13 UTC
  • mto: This revision was merged to the branch mainline in revision 13963.
  • Revision ID: mbp@canonical.com-20110915063913-xea8ii1ih18x21ws
process-one-mail arranges for sent mail to be printed to stdout.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
    Process one incoming email, read from the specified file or from stdin.
29
29
 
 
30
    Any mail generated in response is printed to stdout.
 
31
 
30
32
    """ + __doc__
31
33
 
32
34
    def main(self):
43
45
        file_alias = save_mail_to_librarian(raw_mail)
44
46
        self.logger.debug("saved to librarian as %r" % (file_alias,))
45
47
        parsed_mail = signed_message_from_string(raw_mail)
 
48
        # Kinda kludgey way to cause sendmail to just print it.
 
49
        config.sendmail_to_stdout = True
46
50
        handle_one_mail(
47
51
            self.logger, parsed_mail,
48
52
            file_alias, file_alias.http_url,