[SOLVED] Postfix in LXC debian templates

ulvida

Member
Feb 11, 2020
8
6
23
59
AFAIK, exim is the debian default MTA. However, proxmox LXC templates for debian come with postfix installed instead of exim. And, most of all, the /etc/mailname is not created and populated at configuration.

This breaks the installation or configuration of some packages (like sympa) which rely on an appropriate MTA configuration, with /etc/mailname file.

Once the problem undestood, it's not difficult to script a workaround, but it was not easy to identify, and it's not very clean and portable.

So I was the wondering how Proxmox LXC templates are built. I found this thread and read about DAB, but the links in this post are no longer availables and, as far as I can undestand, these DAB configuration files for Debian 10 templates don't include any customization, so I can't understand why and how debian templates come with postfix half installed and not with exim.

Thanks in advance for your lights.
 
Last edited:
Templates are created with dab, and dab uses postfix as default MTA. But the file /etc/mailname is a specific configuration, i.e. we cannot configure that in the template.
 
  • Like
Reactions: Stoiko Ivanov
Postfix works fine without '/etc/mailname' present - it sets '$myorigin' to the fqdn of the host (see `man 5 postconf` and [1]).
The configuration of the package in the debian templates is defaulting to a internet connected site - which is the only option, without any other information pointers (like a smarthost) - just like we cannot sensibly set '/etc/mailname' as @dietmar pointed out.

The issue with sympa is that the postinst script had a bug - [0] (using 'hostname -fqdn' instead of 'hostname --fqdn`), which has been fixed in the package version 6.2.40~dfsg-3 (buster still has 6.2.40~dfsg-1).

I hope this explains it.


[0] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=935882
[1] https://wiki.debian.org/EtcMailName
 
Waw! Thanks for all this insight! If fully explains my doubts. I'll wait to learn more about DAB before asking more questions. Thanks a lot.
 
Last edited:
  • Like
Reactions: Stoiko Ivanov
Glad we managed to point out a few things - feel free to ask if you run into other questions!
(It helped me to verify that '/etc/mailname' does not need to be set ;)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!