- changed status to closed
Quarantine list always empty
Quarantine list is always empty after upgrading to v2.3.15 although files are found in the quarantine/tmp folder.
Comments (15)
-
repo owner -
reporter I found some errors regarding permissions: 2023-12-04 10:36:44.812938500 [ERROR] [56CDE0BD-E2F9-4707-B534-D82CDE99E1BF.1] [queue/quarantine] Error writing quarantine file: Error: EPERM: operation not permitted, link '/data/quarantine/tmp/56CDE0BD-E2F9-4707-B534-D82CDE99E1BF.1' -> '/data/quarantine/20231204/56CDE0BD-E2F9-4707-B534-D82CDE99E1BF.1'
Also, I tried to reinstall it, using a new data folder, but the same error appears.
-
reporter - changed status to open
Maybe a quarantine folder permissions issue?
-
repo owner Please try latest version and let me know
-
reporter I removed the quarantine folder and updated the container to v2.3.16, the quarantine folder was recreated on start but had the same error:
2023-12-04 19:49:15.003061500 [ERROR] [24E844B4-566A-40D9-A1A1-E2A6D2285432.1] [queue/quarantine] Error writing quarantine file: Error: EPERM: operation not permitted, link '/data/quarantine/tmp/24E844B4-566A-40D9-A1A1-E2A6D2285432.1' -> '/data/quarantine/20231204/24E844B4-566A-40D9-A1A1-E2A6D2285432.1'
2023-12-04 19:49:15.038906500 [CRIT] [24E844B4-566A-40D9-A1A1-E2A6D2285432.1] [core] Plugin queue/decide failed: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined 2023-12-04 19:49:15.038912500 at new NodeError (node:internal/errors:406:5) 2023-12-04 19:49:15.038914500 at validateString (node:internal/validators:162:11) 2023-12-04 19:49:15.038914500 at Object.dirname (node:path:1279:5) 2023-12-04 19:49:15.038915500 at exports.hook_queue_ok (/opt/haraka-smtp/plugins/queue/decide.js:87:19) 2023-12-04 19:49:15.038916500 at plugins.run_next_hook (/usr/lib/node_modules/Haraka/plugins.js:535:28) 2023-12-04 19:49:15.038917500 at callback (/usr/lib/node_modules/Haraka/plugins.js:488:32) 2023-12-04 19:49:15.038918500 at exports.update_sender (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-known-senders/index.js:53:36) 2023-12-04 19:49:15.038919500 at plugins.run_next_hook (/usr/lib/node_modules/Haraka/plugins.js:535:28) 2023-12-04 19:49:15.038920500 at callback (/usr/lib/node_modules/Haraka/plugins.js:488:32) 2023-12-04 19:49:15.038920500 at exports.hook_queue_ok (/opt/haraka-smtp/plugins/stats.js:114:5)
In the quarantine folder there are 2 subfolders: tmp and 20231204. One file can be found in the tmp folder.
These are the permissions for quarantine folder: drwxrwxr-x 3 88 mail 4096 Dec 4 17:39 quarantine
And 755 is the permission for 20231204 subfolder.
Thanks.
-
repo owner Do your mount on data folder support hard links? It seems that error happens right here https://github.com/haraka/Haraka/blob/5a5e1062a084ae4652561b1599972aebb1c9faeb/plugins/queue/quarantine.js#L114
-
reporter Yes, the volume for data is a local folder, is a separate machine with Debian, and a single container for the mail server.
It worked fine until v2.3.15. I will try to downgrade to v2.3.14 to see if it’s fixed there.
I found myself where is the source for the hard link, I will try to create the hard link from inside the container to see the result.
-
repo owner There was upgrade to node 20 at 2.3.15. Maybe low-level link handling changed. What do you use for sharing, NFS?
-
reporter No, it’s an empty Debian 11 machine with only Docker and poste.io.
I will try it on a new machine, I have no idea what is happening. Hard links are working fine when created from terminal.
-
reporter Just a short update:
I have a new VM with a clean install of Debian 12 + Docker, and run the container with a local folder for data.
Now there are files in the /data/quarantine/20231210 folder, so the hard links work now, but in the admin interface there are no records displayed for this date.
And I checked the logs and I found a new error:
2023-12-10 06:13:57.239850500 [CRIT] [-] [core] Error: EPERM: operation not permitted, chmod '/data/quarantine/20231210'
So I guess there is some issue somewhere regarding the permissions.
-
reporter So it works if I manually set chmod to 775 of the
/data/quarantine/20231210
folder. But the next ones are created with the wrong permissions (755). -
repo owner Finally I have reproduced same issue. Will let you know with the progress
-
repo owner - changed status to duplicate
Duplicate of
#1018. -
repo owner Please try the latest, the permissions problem is an internal bug of NodeJS which I've downgraded until a fix comes.
-
reporter Updated to v2.3.18, but the issue with the permissions persists:
2023-12-15 13:10:19.940294500 [CRIT] [-] [core] Error: EPERM: operation not permitted, chmod '/data/quarantine/20231215'
- Log in to comment
tmp folder in quarantine is only for temporary files (see https://github.com/haraka/Haraka/blob/master/plugins/queue/quarantine.js) ... if something really ends up in quarantine you will see something like "quarantine/yyyymmdd/84B27AFD-7DA6-4CA3-A69B-B014366DF8FA.1"