Symptoms
QMail-related task in POA control panel fails with the error like below:
Last execution output Destination host '' (#1001), IP '' : Internal error: /usr/local/qmail/bin/setquota /usr/local/qmail/bin/setquota /usr/local/qmail/shared/mailnames/o/k/-1001/1001/Maildir/ 157286400S failed with code 1 saying: STDOUT: '' STDERR 'Failed to generate new maildir size name of '/usr/local/qmail/shared
One or both of the below is true:
QMail-related folders (mailfolder, new, cur, tmp) within the folder that is mentioned in task error message are missing on the QMail server.
- QMail quota-related binaries have incorrect permissions (see below).
Cause
QMail hosting was removed by another task from POA side or folders/permissions were manually removed.
Resolution
Following resolutions correspond to the symptoms above.
Recreate the missing directories on the QMail server:
# pwd /usr/local/qmail/shared/mailnames/o/k/-1001/1001/Maildir # mkdir mailfolder # mkdir new # mkdir cur # mkdir tmp # ls -ld * drwxr-xr-x 2 root root 4096 Jul 15 17:27 cur drwxr-xr-x 2 root root 4096 Jul 15 17:27 mailfolder drwxr-xr-x 2 root root 4096 Jul 15 17:27 new drwxr-xr-x 2 root root 4096 Jul 15 17:27 tmp # chmod -R 700 * # chown -R mailnames:qmail /usr/local/qmail/shared/mailnames/o/k/-1001/1001/Maildir/
Make sure that setquota and checkquota binaries have proper ownership, fix it if needed:
chown mailnames:qmail /usr/local/qmail/bin/setquota chown mailnames:qmail /usr/local/qmail/bin/checkquota chmod +s /usr/local/qmail/bin/setquota chmod +s /usr/local/qmail/bin/checkquota chmod g-s /usr/local/qmail/bin/checkquota