So yesterday Webmin deleted my /etc/passwd and although it looks like everything is working, I can't get sendmail to work when used in a PHP script.
Using mail() returns false, using PHPMailer results in "Mailer cannot execute sendmail".
I am 100% sure that this problem has happened because of the passwd file, I just can't figure out how to fix it.
I noticed a few users got corrupt and I had to replace them.
I should probably mention, if I try and send it through sendmail itself it works perfectly.
For people saying restore the /etc/passwd, I have already done this and the issue still remains.
grep smmsp /etc/group smmsp:x:51: ls -ld /var/spool/mqueue/ drwx------ 2 root mail 4096 Nov 8 02:56 /var/spool/mqueue/ ls -ld /var/spool/clientmqueue/ drwxrwx--- 2 smmsp smmsp 4096 Nov 8 02:55 /var/spool/clientmqueue/ ls -ld /var/spool/mail/ drwxrwxr-x 2 root mail 4096 Nov 8 02:18 /var/spool/mail/ ls -l /usr/sbin/sendmail lrwxrwxrwx 1 root root 21 Aug 8 21:29 /usr/sbin/sendmail -> /etc/alternatives/mta ls -l /usr/sbin/sendmail.sendmail -rwxrwsrwx 1 root smmsp 806460 Aug 11 17:32 /usr/sbin/sendmail.sendmail
Nov 8 15:58:18 jbrunton sendmail: pA8FwIPJ006222: SYSERR(UID0): Who are you?: Permission denied Nov 8 15:58:18 jbrunton sendmail: pA8FwIPJ006222: firstname.lastname@example.org, size=456, class=0, nrcpts=1, msgid=<email@example.com>, relay=root@localhost Nov 8 15:58:18 jbrunton sendmail: pA8FwIdW006225: SYSERR(root): collect: Cannot write ./dfpA8FwIdW006225 (bfcommit, uid=0, gid=51): Permission denied Nov 8 15:58:18 jbrunton sendmail: pA8FwIdW006225: from=<firstname.lastname@example.org>, size=598, class=0, nrcpts=1, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1] Nov 8 15:58:18 jbrunton sendmail: pA8FwIPJ006222: email@example.com, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30456, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: 421 4.3.0 collect: Cannot write ./dfpA8FwIdW006225 (bfcommit, uid=0, gid=51): Permission denied