On 3 Feb 2015, at 17:48, Viktor Dukhovni <postfix-us...@dukhovni.org> wrote: > > Actually, DO put a space in. Some day you'll write a shell script > of the form: > > /usr/sbin/sendmail -f "$sender" ... > > which will work even when the sender address is empty, the non-space > variant will break: > > /usr/sbin/sendmail -f"$sender" ...
This isn't a typical shell script - it's called from PHP internals, and I think it escapes the spaces, so it would end up with the sender address given as ' foo...@example.org' (with a leading space) and not just 'foo...@example.org'. I guess in some contexts that would make no difference, but leaving a space certainly used to break PHP mail, which is why most uses of it don't add one (including the PHP docs, drupal, PHPMailer), but I just tested it on PHP 5.6.5 with postfix and it worked with and without, so it may have been fixed. I don't think significant spaces in getopt are that unusual - I know the -p option to mysql does not allow a following space. Marcus
signature.asc
Description: Message signed with OpenPGP using GPGMail