ContactAddress » History » Revision 12
Revision 11 (Denis 'GNUtoo' Carikli, 04/20/2020 03:39 PM) → Revision 12/23 (Denis 'GNUtoo' Carikli, 04/20/2020 03:47 PM)
h1. ContactAddress h2. Design This system was designed to be as simple as possible: It was designed in a way that enables it to receive mail but it does not to need to send any mail: * There is no need of reverse DNS for the IP address. * We don't need to use DKIM. * It's easier to get the setup right and secure. We don't even need any authentication to receive the mail. * We don't need to make sure that the system cannot be abused to send arbitrary mail to arbitrary address by anyone as it's not supposed to send any mail in the first place. If we want to send mail we would need to implement all that: * We would need to see with the FSF if they could handle us the control of the reverse DNS for the IP address we use. * For DKIM, we would need to look if Trisquel 8 has DKIM implementations (like dkimproxy) that are easy to integrate with OpenSMTPD. * We would need to make sure that the server configuration cannot be abused to send mails to arbitrary address by anyone else it would ended up being blacklisted by companies and project trying to fight SPAM. We could also whitelist the servers used by the people receiving this mail through this system, through SPF, if we want people to send mail to the same address they received it from (which is probably not very important). The DNS zones are configured to set the MX to the Replicant vm at the FSF. For more details on how the DNS is hosted, see [[DNS]]. For now this uses OpenSMTPD just because the person implementing that system initially (GNUtoo) already used OpenSMTPD at home, so it was faster as the configurations could be partially reused and the setup compared. For consulting the mail we will use dovecot as the person willing to implement it (GNUtoo) already uses that at home too. This will still need some authentication but as it's a separate part it also limit the risk of missconfiguration as for the ability to abuse the system to send mails. h2. Maintenance h3. Adding Add new people First start by making sure that you have all the required information: * Make sure that the person knows that she will be publicly listed as a person that receives that contact email address * Ask the person for which *lowercase* username they wish to use * Ask the person to run the following command: *@doveadm pw -u <username> -s SHA512-CRYPT@* To enable the a new person to receive mail you will need to: mail: * Add the person to the list of people receiving the address at the "Infrastructure":https://redmine.replicant.us/projects/replicant/wiki/Infrastructure wiki page in the main Replicant wiki. * Create an account inside the vm for the new person. This can be done with the following command: <pre> useradd person: @useradd -m <lowercase_username> <lowercase_username>@ </pre> * Add the lower_case_username to /etc/smtpd/aliases * run @smtpctl update table aliases@ Then To enable a new person to enable consult mail: * ask the person for which *lowercase* username they wish to retrieve use * ask the mail that are being received, you need person to edit run the /etc/dovecot/conf.d/secrets/server.passwd file and add a line that uses this format: <pre> <user>:<password_hash>:<uid>:<gid>::<home>::userdb_mail=maildir:<Maildir_path> </pre> following command: *@doveadm pw -u <username> -s SHA512-CRYPT@* Notes: * The Maildir directory is created automatically when receiving the first mail * There is no need to setup a password for the account * I didn't look how much we can lock down the accounts and still make openstmtpd work. h3. Switching to more recent OpenSMTPD The configuration format changed in newer OpenSMTPD. We will probably have to migrate the configuration when switching to to Trisquel 9. TODO: Document the format change.