[GH-ISSUE #10] Emails are stored as root:root #8

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

Originally created by @qdii on GitHub (Jan 26, 2020).
Original GitHub issue: https://github.com/HaschekSolutions/opentrashmail/issues/10

I ran a password-less opentrashmail for a few months, which of course has attracted spammers/robots, etc. I start it the following way:

docker run -d --restart=always --name opentrashmail -e "DOMAINS=XXXXX" -e "DATEFORMAT='YYYY-M-D HH:mm'" -p 80:80 -p 25:25 -v /home/qdii/opentrashmail/data:/var/www/opentrashmail/data hascheksolutions/opentrashmail

However I noticed that the emails are stored either as user "uuidd" (group id 101), or "root"

$ ls -l | tail
drwxr-xr-x 2 root  root  4096 Jan 23 16:42 urgentfiles9@gmail.com
drwxr-xr-x 2 root  root  4096 Jan 23 16:42 urgentfiling@gmail.com
drwxr-xr-x 2 root  root  4096 Jan 23 16:42 urgentmessage2@gmail.com
drwxr-xr-x 2 uuidd uuidd 4096 Jan 12 07:11 uzojohn383@yahoo.com
drwxr-xr-x 2 uuidd uuidd 4096 Jan 12 07:11 uzojohn388@yahoo.com
drwxr-xr-x 2 uuidd uuidd 4096 Jan  2 01:22 vicpamo233@gmail.com
drwxr-xr-x 2 root  root  4096 Jan 24 12:14 westernmoney6111@gmail.com
drwxr-xr-x 2 root  root  4096 Jan 23 16:42 worldbank049@gmail.com
drwxr-xr-x 2 root  root  4096 Jan 23 16:42 worldbanknoti@gmail.com
drwxr-xr-x 2 root  root  4096 Jan 23 16:42 wu9688775@gmail.com

That sounds a bit wrong.

Originally created by @qdii on GitHub (Jan 26, 2020). Original GitHub issue: https://github.com/HaschekSolutions/opentrashmail/issues/10 I ran a password-less opentrashmail for a few months, which of course has attracted spammers/robots, etc. I start it the following way: `docker run -d --restart=always --name opentrashmail -e "DOMAINS=XXXXX" -e "DATEFORMAT='YYYY-M-D HH:mm'" -p 80:80 -p 25:25 -v /home/qdii/opentrashmail/data:/var/www/opentrashmail/data hascheksolutions/opentrashmail ` However I noticed that the emails are stored either as user "uuidd" (group id 101), or "root" ``` $ ls -l | tail drwxr-xr-x 2 root root 4096 Jan 23 16:42 urgentfiles9@gmail.com drwxr-xr-x 2 root root 4096 Jan 23 16:42 urgentfiling@gmail.com drwxr-xr-x 2 root root 4096 Jan 23 16:42 urgentmessage2@gmail.com drwxr-xr-x 2 uuidd uuidd 4096 Jan 12 07:11 uzojohn383@yahoo.com drwxr-xr-x 2 uuidd uuidd 4096 Jan 12 07:11 uzojohn388@yahoo.com drwxr-xr-x 2 uuidd uuidd 4096 Jan 2 01:22 vicpamo233@gmail.com drwxr-xr-x 2 root root 4096 Jan 24 12:14 westernmoney6111@gmail.com drwxr-xr-x 2 root root 4096 Jan 23 16:42 worldbank049@gmail.com drwxr-xr-x 2 root root 4096 Jan 23 16:42 worldbanknoti@gmail.com drwxr-xr-x 2 root root 4096 Jan 23 16:42 wu9688775@gmail.com ``` That sounds a bit wrong.
kerem closed this issue 2026-02-25 23:39:35 +03:00
Author
Owner

@Shocking-Sys commented on GitHub (Sep 25, 2020):

Not wrong check who "launch" dockerd proccess.

<!-- gh-comment-id:698786804 --> @Shocking-Sys commented on GitHub (Sep 25, 2020): Not wrong check who "launch" dockerd proccess.
Author
Owner

@geek-at commented on GitHub (Nov 13, 2021):

yeah it's because python us run as a privilliged user because otherwise it couldn't use port 25. I could switch it to something like 2525 but then the container wouldn't be backward compatible for users who are updating.
I could fix it in the code and chowning the files after write but that wouldn't make sense for anyone NOT running a docker container.
I'll keep it like it is for now until I (or anyone) finds an elegant solution

<!-- gh-comment-id:968092408 --> @geek-at commented on GitHub (Nov 13, 2021): yeah it's because python us run as a privilliged user because otherwise it couldn't use port 25. I could switch it to something like 2525 but then the container wouldn't be backward compatible for users who are updating. I could fix it in the code and [chowning the files](https://www.geeksforgeeks.org/python-os-chown-method/) after write but that wouldn't make sense for anyone NOT running a docker container. I'll keep it like it is for now until I (or anyone) finds an elegant solution
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#8
No description provided.