Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>sadiqxs solution is the part of the answer to my question. It fixes the problem that I was calling the function wrong. But it was still not sending email for me. After a while i manage to get it working.</p> <p>One of the things I found out is that there was actually another mail log which I did oversee:</p> <pre><code>/var/log/mail.log.1 </code></pre> <p>It showed me the following error:</p> <pre><code>sendmail[4453]: NOQUEUE: SYSERR(nobody): can not chdir(/var/spool/mqueue-client/): Permission denied </code></pre> <p>I used ls -ld /var/spool/mqueue-client/ to see that the directory is restricted by the smmsp group:</p> <pre><code>drwxrws--- 2 smmsp smmsp 4096 2013-01-12 17:51 /var/spool/mqueue-client/ </code></pre> <p>So I added the nobody user (from the error SYSERR(nobody)) to the smmsp group:</p> <pre><code>usermod -a -G smmsp nobody </code></pre> <p>I tested again, and it doesn't work yet. After checking the log I got the same error. To be sure I rebooted my server and now the error message changed a little bit:</p> <pre><code>NOQUEUE: SYSERR(nobody): can not write to queue directory /var/spool/mqueue-client/ (RunAsGid=65534, required=115): Permission denied </code></pre> <p>After searching and trying useless stuff for a while i decide to change the primary group of nobody to 115 (smmsp) the /etc/psswd file and saw the following settings:</p> <pre><code>nobody:x:65534:65534:nobody:/nonexistent:/bin/sh </code></pre> <p>to</p> <pre><code>nobody:x:65534:115:nobody:/nonexistent:/bin/sh </code></pre> <p>This solved my problem and it's sending mails now. I understand that this is not the best solution, but I don't really know how else I would give nobody access, since it's requiring the specific GID. I hope someone else here does.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload