r-raymond / nixos-mailserver

A complete and Simple Nixos Mailserver
GNU General Public License v3.0
181 stars 27 forks source link

Suggestion: Add option for admin email #102

Open tokudan opened 6 years ago

tokudan commented 6 years ago

This would allow to create some common aliases automatically, for example: abuse@domain1 postmaster@domain1 abuse@domain2 postmaster@domain2 (catchall)@localhost (catchall)@[mailserver.fqdn]

r-raymond commented 6 years ago

Sounds great. I guess this should be a per domain setting. We could turn the domain list into a more sophisticated data type.

On the other hand we could also add an admin list to the user record, that adds postmaster and abuse .

Or are you thinking about a super admin for all listed domains? Then we could simply add an option for it and maybe merge it with the alert address.

tokudan commented 6 years ago

I was thinking about two settings:

  1. admin of the mailserver that gets all abuse and postmaster messages
  2. root account that gets mail sent to @localhost and @mailserver.fqdn Both are just aliases to an existing configured account. As this is probably often the same person, it might make sense to just merge them into one setting.

Per domain would make sense for bigger hosters with multiple customers. I think nixos-mailserver isn't aimed at them, but more towards single persons administrating their own mailserver or small businesses that just need a mailserver for their own domains. So having that setting per domain is probably overkill. I guess that if there's a simple "this account should receive all admin and locally generated email" alias, then that's good enough for most.

phdoerfler commented 6 years ago

Please have a look at the NixOS options in networking.defaultmailserver: https://nixos.org/nixos/options.html#networking.defaultmailserver

In particular networking.defaultMailServer.root and of course .domain and .hostName.

tokudan commented 6 years ago

@phdoerfler that partially sounds good. But it just seems to be a setting for ssmtp, not for postfix or this project. The ssmtp nixos module seems to have hijacked the "defaultmailserver" hierarchy.