Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fix sendmail key #3261

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

craz commented Dec 20, 2012

change key for additional_parameters argument

fix:
sendmail error
sendmail: illegal option -- r
sendmail: usage: sendmail [ -t ] [ -fsender ] [ -Fname ] [ -bp ] [ -bs ] [ arg ... ]

Update library/Zend/Mail/Transport/Sendmail.php
change key for additional_parameters argument

fix: 
sendmail error
sendmail: illegal option -- r
sendmail: usage: sendmail [ -t ] [ -fsender ] [ -Fname ] [ -bp ] [ -bs ] [ arg ... ]
Owner

weierophinney commented Jan 2, 2013

There's a bigger problem -- the flag differs based on the sendmail implementation. If you use postfix, sendmail is symlinked to postfix, and -r is correct. If you use sendmail itself, "-f". (The postfix sendmail compat script actually can use either -f or -r, which tells me we should use -f by default.)

As such, we should likely specify the flag to use with the from address, as well as whether or not whitespace is allowed (postfix requires a space between the flag and the address; sendmail does not). The problem, of course, is figuring out what the most common options are.

@ghost ghost assigned weierophinney Jan 2, 2013

weierophinney added a commit that referenced this pull request Jan 2, 2013

[#3261] use -f switch instead of -r
- "-r" is evidently a deprecated/obsolete synonym for "-f", and not
  present on current versions of sendmail (though still present on many
  clones, including postfix, exim, and qmail)
  - updated tests to refer to "-f" instead of "-r"

weierophinney added a commit that referenced this pull request Jan 2, 2013

Owner

weierophinney commented Jan 2, 2013

Actually, it looks like "-r"has been deprecated in sendmail for some time, in favor of "-f". Most MTAs with a sendmail compat layer allow both, but defaulting to "-f" is a sane change.

weierophinney added a commit to zendframework/zend-mail that referenced this pull request May 14, 2015

[zendframework/zendframework#3261] use -f switch instead of -r
- "-r" is evidently a deprecated/obsolete synonym for "-f", and not
  present on current versions of sendmail (though still present on many
  clones, including postfix, exim, and qmail)
  - updated tests to refer to "-f" instead of "-r"

weierophinney added a commit to zendframework/zend-mail that referenced this pull request May 14, 2015

weierophinney added a commit to zendframework/zend-mail that referenced this pull request May 14, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment