Quarantine list always empty

Issue #1023 duplicate
Dragos Panoiu created an issue

Quarantine list is always empty after upgrading to v2.3.15 although files are found in the quarantine/tmp folder.

Comments (15)

  1. Dragos Panoiu 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.

  2. Dragos Panoiu 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.

  3. Dragos Panoiu 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.

  4. SH 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?

  5. Dragos Panoiu 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.

  6. Dragos Panoiu 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.

  7. Dragos Panoiu 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).

  8. SH repo owner

    Please try the latest, the permissions problem is an internal bug of NodeJS which I've downgraded until a fix comes.

  9. Dragos Panoiu 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'
    

  10. Log in to comment