It's of course not a production code. I'm only trying to learn and understand how exactly it works.
I cannot find anything about "--" in the postfix documentation (or I'm looking on the wrong page?). There is any explanation somewhere? (instead of at the source code). Thanks for your help! 2016-10-14 1:07 GMT+01:00 Wietse Venema <wie...@porcupine.org>: > Pawe? Grzesik: > > I think I can do the same in Ruby using IO.popen like: > > > > IO.popen(["/usr/sbin/sendmail", "-G", "-i", my_str], "w") do |pipe| > > > > as I see in this case I don't even need to use my_str with \" \". > > > > But I'm still confused about -f option in master.cf, and characters "--" > > between ${sender} and ${recipient}. > > Why is that? > > Specify > > popen(["/usr/sbin/sendmail", "-G", "-i", "-f", sender, "--", my_str, "w") > > The -- is needed to close a different security hole. > > If you don't know about these bugs that go back to 1996 and earlier, > then please don't write code that handles network data. > > Wietse >