On Tue, Sep 04, 2007 at 11:56:47AM +0200, Thomas Keller wrote:
> Matthew Sackman schrieb:
> > Currently it calls /usr/bin/mail which might mean you're out of luck on
> > Windows. It sets the From header to be the value of the author cert and
> > the Sender can be set to anything you like.
>
> A minor thing, but maybe you want to use all gathered author cert values
> and just concatenate them for the "Reply-to" header?
Yes, I have done this now and a patch is attached. According to RFC
2822, you can have multiple addresses on the From header, but after some
discussion and thought, the Reply-To seems to match the intended
semantics better.
If you could just apply the patch please!
Cheers,
Matthew
--
Matthew Sackman
http://www.wellquite.org/
#
# old_revision [200a3708be1462bb1ad08f2b9d4440f61a020297]
#
# patch "contrib/monotone-mail-notify-standalone.lua"
# from [be58dde21383408beaafcda9dd51a86446f0838b]
# to [89e0cd79a1a44761c15a9f3556e6b62313c6e605]
#
============================================================
--- contrib/monotone-mail-notify-standalone.lua be58dde21383408beaafcda9dd51a86446f0838b
+++ contrib/monotone-mail-notify-standalone.lua 89e0cd79a1a44761c15a9f3556e6b62313c6e605
@@ -13,7 +13,7 @@ _errfile = "/tmp/processor-err"
_outfile = "/tmp/processor-out"
_errfile = "/tmp/processor-err"
-_sender = "[EMAIL PROTECTED]"
+_from = "[EMAIL PROTECTED]"
function get_notify_recipients(branch)
local emailfile = io.open(get_confdir() .. "/notify", "r")
@@ -117,10 +117,14 @@ function note_netsync_end (session_id, s
file:write(summarize_certs(rev_data))
file:close()
local subject = make_subject_line(rev_data)
- local from_header = "From: " .. rev_data["certs"]["author"][1]
+ local reply_to = "Reply-To: "
+ for j,auth in pairs(rev_data["certs"]["author"]) do
+ reply_to = reply_to .. auth
+ if j < # (rev_data["certs"]["author"]) then reply_to = reply_to .. ", " end
+ end
for j,addr in pairs(rev_data["recipients"]) do
- spawn_redirected(filename, _outfile, _errfile, "/usr/bin/mail", "-e", "-a", from_header, "-a", "Sender: " .. _sender, "-s", subject, addr)
+ spawn_redirected(filename, _outfile, _errfile, "/usr/bin/mail", "-e", "-a", reply_to, "-a", "From: " .. _from, "-s", subject, addr)
end
os.remove(filename)
_______________________________________________
Monotone-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/monotone-devel