LukeSmithxyz / emailwiz

Script that installs/configures a Dovecot, Postfix, Spam Assassin, OpenDKIM Debian web server
GNU General Public License v3.0
1.82k stars 301 forks source link

What's the purpose of group mail? (Also:Maildirs created for system accounts.) #290

Open suonpaa opened 1 year ago

suonpaa commented 1 year ago

What exactly is the purpose of group "mail" in /etc/group? Why should mail users be added in this group? I do not see any effect o whether they are in group or not.

I am running emailwiz on Debian 12.

Perhaps related to this… I mistakenly sent email from outside (Gmail) to address man@fqdn-hostname on my server. The mail was delivered to system account mail and now there is a Maildir in /var/cache/man.

# ls -ld /var/cache/man/Mail/
drwx------ 3 man man 4096 Jul 12 15:03 /var/cache/man/Mail/
# ls -lR /var/cache/man/Mail/
/var/cache/man/Mail/:
total 12
-rw------- 1 man man  452 Jul 12 15:03 dovecot.list.index.log
-rw------- 1 man man    8 Jul 12 15:03 dovecot-uidvalidity
-r--r--r-- 1 man man    0 Jul 12 15:03 dovecot-uidvalidity.64ae9683
drwx------ 5 man man 4096 Jul 12 15:03 Inbox

/var/cache/man/Mail/Inbox:
total 24
drwx------ 2 man man 4096 Jul 12 15:03 cur
-rw------- 1 man man  692 Jul 12 15:03 dovecot.index.cache
-rw------- 1 man man  432 Jul 12 15:03 dovecot.index.log
-rw------- 1 man man   98 Jul 12 15:03 dovecot-uidlist
drwx------ 2 man man 4096 Jul 12 15:03 new
drwx------ 2 man man 4096 Jul 12 15:03 tmp

/var/cache/man/Mail/Inbox/cur:
total 0

/var/cache/man/Mail/Inbox/new:
total 4
-rw------- 1 man man 2954 Jul 12 15:03 '1689163395.M254291P23033.mail,S=2954,W=3012'

/var/cache/man/Mail/Inbox/tmp:
total 0

System account man is not member of group mail.

Should the system behave like this?

suonpaa commented 1 year ago

Does have any ideas on this?

@LukeSmithxyz, can you tell what is the purpose of group "mail"? What does it affect?

ZenitH-AT commented 6 months ago

README.md says that supposedly only users in this group can receive emails but there's nothing in the script that configures this and I've been able to do it without the group just fine.