include a return address in error mail
[invirt/packages/invirt-web.git] / code / main.py
index 540b3f4..a324306 100755 (executable)
@@ -645,7 +645,8 @@ Subject: %s
 
 %s
 """ % (to, config.web.hostname, subject, body)
-    p = subprocess.Popen(['/usr/sbin/sendmail', to], stdin=subprocess.PIPE)
+    p = subprocess.Popen(['/usr/sbin/sendmail', '-f', to, to],
+                         stdin=subprocess.PIPE)
     p.stdin.write(mail)
     p.stdin.close()
     p.wait()