qmail-queue fails with error 64 on some FreeBSD systems.
# /var/qmail/bin/mailsubj testing root <<EOF just a test EOF qmail-inject: fatal: qq trouble creating files in queue (#4.3.0)
If you have installed qmail correctly, the problem maybe that the sysctl variable security.bsd.hardlink_check_gid is set:
$ sysctl security.bsd.hardlink_check_gid security.bsd.hardlink_check_gid: 1
# sysctl security.bsd.hardlink_check_gid=0
# chmod g+s /var/qmail/bin/qmail-queue
Messages are injected into the qmail queue with a specific sequence of operations to ensure reliability. One of the steps in the sequence is a call to link(2) by the setuid process qmail-queue. The link(2) call fails on FreeBSD systems where the security.bsd.hardlink_check_gid sysctl variable is set to 1.
The purpose of hardlink_check_gid is:
$ sysctl -d security.bsd.hardlink_check_gid security.bsd.hardlink_check_gid: Unprivileged processes cannot create hard links to files owned by other groups
This means that a process whose effective gid and supplemental groups do not match the group of a file cannot create a hard link to that file. This is significant in the case of qmail-queue because of the following sequence of events:
So the workarounds work because either the restriction is lifted, or the effective gid of the process wanting to create the hard link is changed to qmail.
Contact: dl-website at perfec.to. You must include the string soda-straw in the subject line or else your message will bounce.
This page is http://perfec.to/hardlink_check.html.