--- mailer.py.orig 2012-10-25 22:39:59.000000000 -0700 +++ mailer.py 2012-10-25 22:49:12.000000000 -0700 @@ -2,7 +2,7 @@ """ __docformat__ = 'restructuredtext' -import time, quopri, os, socket, smtplib, re, sys, traceback, email +import time, quopri, os, socket, smtplib, re, sys, traceback, email, subprocess from cStringIO import StringIO @@ -265,6 +265,9 @@ if not sender: sender = self.config.ADMIN_EMAIL + + sendmail=self.config.SENDMAIL + if self.debug: # don't send - just write to a file, use unix from line so # that resulting file can be openened in a mailer @@ -273,6 +276,9 @@ open(self.debug, 'a').write('%s\nFROM: %s\nTO: %s\n%s\n\n' % (unixfrm, sender, ', '.join(to), message)) + elif sendmail: + mailer = subprocess.Popen([sendmail, ', '.join(to)], stdin=subprocess.PIPE) + print >>mailer.stdin, message else: # now try to send the message try: --- configuration.py.orig 2012-10-25 22:40:33.000000000 -0700 +++ configuration.py 2012-10-25 22:26:05.000000000 -0700 @@ -675,6 +675,9 @@ "This domain is added to those config items if they don't\n" "explicitly include a domain.\n" "Do not include the '@' symbol."), + (Option, "sendmail", NODEFAULT, + "SENDMAIL binary to use (optional)", + ["SENDMAIL"],), (Option, "host", NODEFAULT, "SMTP mail host that roundup will use to send mail", ["MAILHOST"],),