Skip to content

Fix default sendmail path when not found during build #5548

New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2084,7 +2084,7 @@ dnl Search for the sendmail binary
dnl
AC_DEFUN([PHP_PROG_SENDMAIL], [
PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib
AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH)
AC_PATH_PROG(PROG_SENDMAIL, sendmail, /usr/sbin/sendmail, $PATH:$PHP_ALT_PATH)
PHP_SUBST(PROG_SENDMAIL)
])

Expand Down
4 changes: 1 addition & 3 deletions main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,10 +697,8 @@ PHP_INI_MH(OnChangeBrowscap);
/* Windows use the internal mail */
#if defined(PHP_WIN32)
# define DEFAULT_SENDMAIL_PATH NULL
#elif defined(PHP_PROG_SENDMAIL)
# define DEFAULT_SENDMAIL_PATH PHP_PROG_SENDMAIL " -t -i "
#else
# define DEFAULT_SENDMAIL_PATH "/usr/sbin/sendmail -t -i"
# define DEFAULT_SENDMAIL_PATH PHP_PROG_SENDMAIL " -t -i"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is now the same as in the above elif branch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, since PHP_PROG_SENDMAIL is always defined.

#endif

/* {{{ PHP_INI
Expand Down