Bug #78916 [NEW]: php-fpm 7.4.0 don't send mail via mail()

From: Date: Thu, 05 Dec 2019 14:23:23 +0000
Subject: Bug #78916 [NEW]: php-fpm 7.4.0 don't send mail via mail()
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-224073@lists.php.net to get a copy of this message
From:             ilya at ilya dot pp dot ua
Operating system: systemd/linux
PHP version:      7.4.0
Package:          *Configuration Issues
Bug Type:         Bug
Bug description:php-fpm 7.4.0 don't send mail via mail()

Description:
------------
After update to 7.4.0 php-fpm don't send mail via mail()/
In postfix mail log: fatal: inet_addr_local[getifaddrs]: getifaddrs:
Address family not supported by protocol
nginx log empty.

php-fpm.service
CapabilityBoundingSet=CAP_CHOWN CAP_SETGID CAP_SETUID

What else needs to be added here so php can send mail again?

Test script:
---------------
protected static function mail($to,$subject,$body)
	{
		$from = escape(CONFIG['mail']['name']).'
<'.CONFIG['mail']['mail'].'>';
		$headers =
		[
			'MIME-Version' => '1.0',
			'Content-Type' => 'text/html; charset=UTF-8',
			'Content-Transfer-Encoding' => 'binary',
			'From' => $from,
			'Reply-To' => $from,
		];
		return mail($to, $subject, $body, $headers,
'-f'.CONFIG['mail']['mail']);
	}

Expected result:
----------------
Send mail

Actual result:
--------------
fatal: inet_addr_local[getifaddrs]: getifaddrs: Address family not
supported by protocol

-- 
Edit bug report at https://bugs.php.net/bug.php?id=78916&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=78916&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=78916&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=78916&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=78916&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=78916&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=78916&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=78916&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=78916&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=78916&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=78916&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=78916&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=78916&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=78916&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=78916&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=78916&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=78916&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=78916&r=mysqlcfg


Thread (14 messages)

« previous php.bugs (#224073) next »