Weird case: PHP mail() works for one domain but not the others

SYSTEM INFORMATION
OS type and version Debian 11
Webmin version 1.999
Virtualmin version 7.1-1
Related packages postfix, php-fpm

Disclaimer: I’ve already spent a whole day on this and I’m exhausted after exhausting my options. And I’m not very keen with PHP, but I had some exposure over the years.

The Problem: There are 3 sites/domains (A, B, and C). Using PHP mail() on site A sends email OK. While on sites B and C, it returns False, and that’s it.

Now the details:

  • Sites A and B are imported from another Virtualmin server.
  • Site C is new, created on the current server.
  • The output of phpinfo() on the 3 sites is identical in all the important aspects (tmp dirs differ).
  • However, site A shows 247 for “ImageMagick supported formats”, while sites B, C show 0 supported formats. (How?? Could this give a clue?)
  • All 3 sites are chrooted, so naturally postfix shouldn’t be available. (Then how site A is able to send email?)
  • The chrooted /etc/php7.4/php.ini: the settings under [mail function] are identical, and they mention /usr/sbin/sendmail -t -i, which is not available for the 3 chrooted sites.

Any idea where I can look for any clue?
Any idea why the ImageMagick formats are different for this single site only?

Of course, the answer comes right after writing the post. Which is still good.
I removed the chroot jail for site A, then added it again, and now it behaves like the other two sites (ImageMagick, and mail).

It seems that it wasn’t chrooted properly when it was created/imported…

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.