chrooted: localhost not reachable & php mail
Summary
php mail() is not working on chrooted websites (php-fpm), still after changing SMTP = localhost
to SMTP = 127.0.0.1
in php.ini-file. localhost is not reachable via chrooted, but that's not the problem with php mail() I think.
Steps to reproduce
- Enable chroot-option for website
- Run example php sendmail script on website
- Check mail logs
Correct behaviour
php mail() should also work in chrooted.
Environment
Server Debian 11 latest ISPConfig version: 3.2.7p1
Proposed fix
Open /etc/php/VERSION/fpm/php.ini & change:
SMTP = localhost
to:
SMTP = 127.0.0.1
After that I have no more clue (fix for first step) :D