I have setup a server with the following settings:
CentOS release 6.3 (Final)
Kernel \r on an \m
Linux version 2.6.32-279.14.1.el6.x86_64 ([email protected]) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Tue Nov 6 23:43:09 UTC 2012
I have installed Qmail and Cron.
When I send an e-mail through a Webmin interface (using Qmail), the mail arrives. However, when I try to send an email through a php script, I get the following error message in /var/log/maillog
:
Failed to create spool file /var/spool/exim/input//1V8rf1-0005w0-Jx-D: Permission denied
Cannot open main log file "/var/log/exim/main.log": Permission denied: euid=93 egid=93
exim: could not open panic log - aborting: see message(s) above
And in /var/log/virtualmin/[host]_error_log
:
PHP Fatal error: <br /><strong>Uncaught Error</strong> of type [Swift_ConnectionException] with message [Sending failed using mail() as PHP's default mail() function returned boolean FALSE
I seems like it is some kind of permission issue (or an issue with qmail and exim), however I am not able to solve it after researching for a few days now. I have Webmin and Virtualmin installed.
Some extra information on permissions:
$ ls -l /var/spool/exim/
total 32
drwxrwxrwx. 2 exim exim 4096 Oct 28 2012 db
drwxrwxrwx. 2 exim exim 24576 Aug 9 16:52 input
drwxrwxrwx. 2 exim exim 4096 Aug 9 16:52 msglog
$ ls -l /usr/sbin/exim
-rwsr-xr-x. 1 root root 1118184 Oct 28 2012 /usr/sbin/exim
Anybody suggestions? Help would be very much appreciated.