Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attachment: No such file or directory #82

Closed
marvinwankersteen opened this issue Mar 31, 2024 · 2 comments
Closed

Attachment: No such file or directory #82

marvinwankersteen opened this issue Mar 31, 2024 · 2 comments

Comments

@marvinwankersteen
Copy link

marvinwankersteen commented Mar 31, 2024

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?

@geek-at
Copy link
Member

geek-at commented Mar 31, 2024

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

@marvinwankersteen
Copy link
Author

Thanks for the fast fix! It works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants