2 // Copyright 2020 Blue Static <https://www.bluestatic.org>
3 // This program is free software licensed under the GNU General Public License,
4 // version 3.0. The full text of the license can be found in LICENSE.txt.
5 // SPDX-License-Identifier: GPL-3.0-only
17 // Hostname is the name of the MX server that is running.
23 const MailboxAccount = "mailbox@"
26 // Domain is the second component of a mail address: <local-part@domain.com>.
32 // Password for the POP3 mailbox user, mailbox@domain.com.
33 MailboxPassword string
35 // Location to store the mail messages.
38 // Addresses that should not accept mail. This should include the @domain
40 BlockedAddresses []string
43 func (c Config) GetTLSConfig() (*tls.Config, error) {
44 certs := make([]tls.Certificate, 0, len(c.Servers))
45 for _, server := range c.Servers {
46 if server.TLSCertPath == "" {
50 cert, err := tls.LoadX509KeyPair(server.TLSCertPath, server.TLSKeyPath)
54 certs = append(certs, cert)
61 config := &tls.Config{
64 config.BuildNameToCertificate()