#6768 (How to configure our mail servers)
by Luc Saffre · in Hosting (system administration) · assigned to Luc Saffre
Kokkuvõte
It all started because of #6733 (laudate server not responding and kswapd0 CPU usage at 200%) .
I want a general strategy for our servers so that I get email notifications from monit or cron into my inbox in Thunderbird.
Q: What happens on a virgin Debian when I send an email to root@localhost? A: The information goes nowhere (correct me if I'm wrong). This means that anyway we need to install an MTA.
It's easier to use the same MTA everywhere. I chose Postfix a long time ago and that seems a good choice.
Configuring Postfix as a smart host is more complicated that configuring it as a stand-alone server.
Postfix doesn't work correctly on a server without mailname. For servers like kuu or bombur who don't have a single
nora, pilv and saku should use mail.zone.ee smarthost with the credentials of vps@saffre-rumma.net.
kuu and bombur
inin3 (avanti) and miki should do it as well.
Use farm to occasionally run a manual test from every server to verify whether a mail to root arrives to our inboxes.
lumi should use the mail.zone.ee smarthost with the credentials of vps@laudate.ee
Only LF remains a stand-alone email server (until I will upgrade this server to Debian 13)
cron on lumi sends to root (cron always sends error reports to the owner of the script), which should expand to luc@saffre-rumma.net as specified in the /etc/aliases, but Postfix seems to ignore /etc/aliases and sends it to the zone mx server (who then answers "no such user" as expected).
Children
Kommentaarid
- 2 päeva, 4 tundi ago by Luc Saffre about #6768 (How to configure our mail servers) : After running newaliases it works. I'm quite sure that I did *not* forget newaliases when I changed the file. But this was before I had postfix installed. I had done "apt remove postfix" before the upgrade, so after the upgrade the system was using exim.
- 2 päeva, 4 tundi ago by Luc Saffre about #6768 (How to configure our mail servers) : Same symptom on liiv after the Upgrade to Debian 13, but it doesn't go away when I configure /etc/aliases. . When I say echo "echo Hello" | at now, I receive the email to luc@liiv and not to luc@saffre-rumma.net.
- 1 nädal, 1 päev ago by Luc Saffre in reply to Luc Saffre about #6768 (How to configure our mail servers) : Explanation: my address was missing in /etc/aliases
- 1 nädal, 1 päev ago by Luc Saffre about #6768 (How to configure our mail servers) (1 reply) : There is a postfix config error on miki. The echo "echo Hello" | at now command causes an email to be sent to root, but no mail goes to the outside world.
- 3 kuud, 2 nädalat ago by Luc Saffre about #6768 (How to configure our mail servers) : I added a Check your mail system section on the installation page. And for this I wrote a new admin command "hello", which sends an email to the ADMINS.
- 3 kuud, 2 nädalat ago by Luc Saffre about #6768 (How to configure our mail servers) : I also removed the options --admin-name and --admin-email from getlino configure. On a standard Lino server we now set ADMINS = [(server_nickname, "root@localhost")} and we expect the server admin to edit their /etc/aliases.
- 3 kuud, 2 nädalat ago by Luc Saffre in reply to Luc Saffre about #6768 (How to configure our mail servers) : More precisely, the generic_maps trick works perfectly for cron and django. Only monit seems to use another system for sending out its email alerts.
- 3 kuud, 2 nädalat ago by Luc Saffre about #6768 (How to configure our mail servers) (1 reply) : I'm trying hard to configure postfix so that it replaces "localhost" by stewards.mylino.net in outgoing mails generated by monit and cron. It seems that there is no easy solution. There is a parameter smtp_generic_maps described in multiple places (for example www.cyberciti.biz/tips/howto-postfix-ma...
- 5 kuud, 3 nädalat ago by Luc Saffre about #6768 (How to configure our mail servers) : I restored the CNAME and the A records for saffre-rumma.net and laudate.ee as they were until yesterday because people aren't used to type the www
- 5 kuud, 3 nädalat ago by Luc Saffre about #6768 (How to configure our mail servers) : I think that we still have the problem that "nslookup saffre-rumma.net" returns 51.68.71.43 (sadu's IP address) while "dig -x 51.68.71.43" returns sadu.mylino.net. If a recipient's MTA verifies the PTR, they might think that there is something fishy. But the automatic DNS settings at ZoneMedia say t...
- 5 kuud, 3 nädalat ago by Luc Saffre about #6768 (How to configure our mail servers) : SPF and DMARC were not activated in the Zone manager. I now activated them. Hardenize now starts to be quite satisfied. If continues to complain about 3 issues: Content Security Policy (CSP) is an additional security layer that enables web sites to control browser behavior, creating a safety net tha...
- 5 kuud, 3 nädalat ago by Luc Saffre about #6768 (How to configure our mail servers) : I removed the A record for saffre-rumma.net that pointed to 51.68.71.43 and the CNAME www.SR to SR, then created a single A record for www.saffre-rumma.net pointing to 51.68.71.43. i.e. a link to www.saffre-rumma.net works as before, but saffre-rumma.net causes a security warning in the browser.
- 5 kuud, 3 nädalat ago by Luc Saffre about #6768 (How to configure our mail servers) : Hardenize reports multiple problems for saffre-rumma.net.
- 5 kuud, 3 nädalat ago by Luc Saffre about #6768 (How to configure our mail servers) : I sent the same email again, this time using gmail, because if they have a specially draconic spam filter, my help request might have been blocked as well.
- 5 kuud, 3 nädalat ago by Luc Saffre in reply to Luc Saffre about #6768 (How to configure our mail servers) : I now sent an email to listmaster@lists.debian.org (after reading this).
- 5 kuud, 3 nädalat ago by Luc Saffre about #6768 (How to configure our mail servers) (1 reply) : My mail to energie2030 now passed their spam filter, but my mail to the debian-user mailing still seems to go lost. Unfortunately I have no error message from there.
- 5 kuud, 3 nädalat ago by Luc Saffre about #6768 (How to configure our mail servers) : I tried again to send my mail, after having removed everything i can find of saffre-rumma.net on ovh. But still i'm getting this error.
- 5 kuud, 3 nädalat ago by Luc Saffre about #6768 (How to configure our mail servers) : When sending an email to info@energie2030.de, I got an "Undelivered Mail Returned to Sender": host mx03.secure-mailgate.com[46.243.88.174] said: 550 178.33.248.59 is not allowed to send mail from saffre-rumma.net. Please see the SPF record, with scope mfrom, identity luc@saffre-rumma.net, and ip 178...
- 5 kuud, 3 nädalat ago by Luc Saffre about #6768 (How to configure our mail servers) : I started using my newest knowledge on sadu (alias SR). Sadu still had the postfix and dovecot config from when it was our mail server. It was just not being used because MX for saffre-rumma.net is now managed by ZoneMedia. I configured DNS sadu,mylino.net, purged postfix and dovecot-core and reinst...
- 5 kuud, 3 nädalat ago by Luc Saffre about #6768 (How to configure our mail servers) : So on lumi it is working now, but i'm still a bit worried about that STARTTLS warning on Hardenize that says "All hosts that receive email need encryption to ensure confidentiality of email messages. Email servers thus need to support STARTTLS, as well as provide decent TLS configuration and correct...
- 5 kuud, 3 nädalat ago by Luc Saffre in reply to Luc Saffre about #6768 (How to configure our mail servers) : But meanwhile some light at the end of the tunnel shows up: luc.lino-framework.org/blog/2026/0502.html
- 5 kuud, 3 nädalat ago by Luc Saffre about #6768 (How to configure our mail servers) (1 reply) : OMG! I have been playing now during 2 hours with 7 postfix config parameters (myhostname myorigin mydestination inet_protocols inet_interfaces local_transport smtp_bind_address) on kuu and lumi. And I don't understand the world. I have the feeling that some hidden random error generator is running s...
- 5 kuud, 3 nädalat ago by Luc Saffre about #6768 (How to configure our mail servers) : One thing is probably necessary: make both servers send-only.
- 5 kuud, 3 nädalat ago by Luc Saffre about #6768 (How to configure our mail servers) : Hardenize reports (of course) multiple issues: No HTTP servers STARTTLS. All hosts that receive email need encryption to ensure confidentiality of email messages. Email servers thus need to support STARTTLS, as well as provide decent TLS configuration and correct certificates. There are issues with...
- 5 kuud, 3 nädalat ago by Luc Saffre about #6768 (How to configure our mail servers) : But then I did exactly the same on lumi, and here my message is refused as spam by Zone Meda. I will have to read their recommendations at www.zone.ee/help/en/kb/unsolicited-mail/
- 5 kuud, 3 nädalat ago by Luc Saffre about #6768 (How to configure our mail servers) : On kuu I did the following and now it works perfectly: Setup your DNS and make sure that kuu.mylino.net points to the IP of kuu apt purge postfix apt install postfix (select "Internet" and say "kuu.mylino.net" as this server's name) Edit the /etc/aliases file to contain two lines:
root: luc
luc: lu... - 5 kuud, 3 nädalat ago by Luc Saffre about #6768 (How to configure our mail servers) : Strange: on kuu there is no file /etc/mailname, but postfix is installed. How is that possible? Is it important?
- 5 kuud, 3 nädalat ago by Luc Saffre about #6768 (How to configure our mail servers) : Created new Ticket #6768 (How to configure our mail servers).