summaryrefslogtreecommitdiff
path: root/mail/tmda/patches/patch-ab
blob: 0367d0177384fca6d22a09b1fd2d5c1dc17d6ec9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$NetBSD: patch-ab,v 1.1 2007/01/11 19:22:43 schmonz Exp $

--- TMDA/Util.py.orig	2006-10-29 22:07:56.000000000 -0500
+++ TMDA/Util.py
@@ -596,7 +596,13 @@ def sendmail(msgstr, envrecip, envsender
            Defaults.MAIL_TRANSFER_AGENT in ('postfix', 'qmail') and \
            Defaults.MAIL_TRANSPORT == 'sendmail':
         envsender = ''
-    if Defaults.MAIL_TRANSPORT == 'sendmail':
+    if Defaults.MAIL_TRANSPORT == 'sendmail' and \
+           Defaults.MAIL_TRANSFER_AGENT == 'qmail':
+        # skip "-i" for qmail-inject (invalid option, and it's the default)
+        cmd = (Defaults.SENDMAIL_PROGRAM,
+               '-f', envsender, '--', envrecip)
+        pipecmd(cmd, msgstr)
+    elif Defaults.MAIL_TRANSPORT == 'sendmail':
         # You can avoid the shell by passing a tuple of arguments as
         # the command instead of a string.  This will cause the
         # popen2.Popen3() code to execvp() "/usr/bin/sendmail" with