[GH-ISSUE #82] Attachment: No such file or directory #55

Closed
opened 2026-02-25 23:39:44 +03:00 by kerem · 2 comments
Owner

Originally created by @marvinwankersteen on GitHub (Mar 31, 2024).
Original GitHub issue: https://github.com/HaschekSolutions/opentrashmail/issues/82

Hi,

I run opentrashmail in docker/kubernetes. Everything is working except for the display or download of the attachments.
The mail with attachment is displayed. The link to view/download is:

https://trash.<domain>.com/api/attachment/gamest.kitchen@trash.<domain>.com/a1d1ced77b0f5f90f42c62d373600bcdcert7.gif

If you click on the link, the Nginx:

404 Not Found
nginx

The nginx log and the content of the container:

server-6f679f8f66-5brpf:/var/www/opentrashmail# cat logs/web.error.log 
2024/03/31 15:55:16 [error] 22#22: *667 open() "/var/www/opentrashmail/web/api/attachment/gamest.kitchen@trash.<domain>.com/a1d1ced77b0f5f90f42c62d373600bcdcert7.gif" failed (2: No such file or directory), client: 10.x.x.x, server: , request: "GET /api/attachment/gamest.kitchen@trash.<domain>.com/a1d1ced77b0f5f90f42c62d373600bcdcert7.gif HTTP/1.1", host: "trash.<domain>.com"

server-6f679f8f66-5brpf:/var/www/opentrashmail# ls -al web/api/attachment/gamest.kitchen@trash.<domain>.com/a1d1ced77b0f5f90f42c62d373600bcdcert7.gif
ls: web/api/attachment/gamest.kitchen@trash.<domain>.com/a1d1ced77b0f5f90f42c62d373600bcdcert7.gif: No such file or directory

server-6f679f8f66-5brpf:/var/www/opentrashmail# ls -al "data/gamest.kitchen@trash.<domain>.com/attachments/a1d1ced77b0f5f90f42c62d373600bcdcert7.gif" 
-rw-r--r--    1 nginx    nginx        25414 Mar 31 15:54 data/gamest.kitchen@trash.<domain>.com/attachments/a1d1ced77b0f5f90f42c62d373600bcdcert7.gif

The owner nginx is recursively set to /var/www/opentrashmail/data with rwX.

ENV-Vars:

URL: https://trash.<domain>.com
DOMAINS: trash.<domain>.com
ADMIN_PASSWORD: 123456789
ADMIN_ENABLED: "true"
SHOW_ACCOUNT_LIST: "true"
SHOW_LOGS: "true"
DATEFORMAT: YYYY-MM-DD HH:mm:ss
DISCARD_UNKNOWN: "false"
ATTACHMENTS_MAX_SIZE: "2000000"

I have image hascheksolutions/opentrashmail:1 running.

Any idea what is the problem?

Originally created by @marvinwankersteen on GitHub (Mar 31, 2024). Original GitHub issue: https://github.com/HaschekSolutions/opentrashmail/issues/82 Hi, I run opentrashmail in docker/kubernetes. Everything is working except for the display or download of the attachments. The mail with attachment is displayed. The link to view/download is: ``` https://trash.<domain>.com/api/attachment/gamest.kitchen@trash.<domain>.com/a1d1ced77b0f5f90f42c62d373600bcdcert7.gif ``` If you click on the link, the Nginx: ``` 404 Not Found nginx ``` The nginx log and the content of the container: ``` server-6f679f8f66-5brpf:/var/www/opentrashmail# cat logs/web.error.log 2024/03/31 15:55:16 [error] 22#22: *667 open() "/var/www/opentrashmail/web/api/attachment/gamest.kitchen@trash.<domain>.com/a1d1ced77b0f5f90f42c62d373600bcdcert7.gif" failed (2: No such file or directory), client: 10.x.x.x, server: , request: "GET /api/attachment/gamest.kitchen@trash.<domain>.com/a1d1ced77b0f5f90f42c62d373600bcdcert7.gif HTTP/1.1", host: "trash.<domain>.com" server-6f679f8f66-5brpf:/var/www/opentrashmail# ls -al web/api/attachment/gamest.kitchen@trash.<domain>.com/a1d1ced77b0f5f90f42c62d373600bcdcert7.gif ls: web/api/attachment/gamest.kitchen@trash.<domain>.com/a1d1ced77b0f5f90f42c62d373600bcdcert7.gif: No such file or directory server-6f679f8f66-5brpf:/var/www/opentrashmail# ls -al "data/gamest.kitchen@trash.<domain>.com/attachments/a1d1ced77b0f5f90f42c62d373600bcdcert7.gif" -rw-r--r-- 1 nginx nginx 25414 Mar 31 15:54 data/gamest.kitchen@trash.<domain>.com/attachments/a1d1ced77b0f5f90f42c62d373600bcdcert7.gif ``` The owner `nginx` is recursively set to `/var/www/opentrashmail/data` with `rwX`. ENV-Vars: ``` URL: https://trash.<domain>.com DOMAINS: trash.<domain>.com ADMIN_PASSWORD: 123456789 ADMIN_ENABLED: "true" SHOW_ACCOUNT_LIST: "true" SHOW_LOGS: "true" DATEFORMAT: YYYY-MM-DD HH:mm:ss DISCARD_UNKNOWN: "false" ATTACHMENTS_MAX_SIZE: "2000000" ``` I have image `hascheksolutions/opentrashmail:1` running. Any idea what is the problem?
kerem closed this issue 2026-02-25 23:39:44 +03:00
Author
Owner

@geek-at commented on GitHub (Mar 31, 2024):

Ah I think I know what the problem is. Will put out a fix soon

<!-- gh-comment-id:2028902018 --> @geek-at commented on GitHub (Mar 31, 2024): Ah I think I know what the problem is. Will put out a fix soon
Author
Owner

@marvinwankersteen commented on GitHub (Mar 31, 2024):

Thanks for the fast fix! It works now.

<!-- gh-comment-id:2028909380 --> @marvinwankersteen commented on GitHub (Mar 31, 2024): Thanks for the fast fix! It works now.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentrashmail#55
No description provided.