Proxmox Mail Gateway Installation on Debian 12

AlphaOmega

Active Member
Sep 2, 2020
11
1
43
34
Hello,

I attempted to install Proxmox Mail Gateway on Debian 12. Everything went well until I encountered the following error logs:

unable to update postfix table /etc/pmg/domains: postmap: fatal: bad string length 0 < 1: mydomain =

unable to update postfix table /etc/pmg/transport: postmap: fatal: bad string length 0 < 1: mydomain =

unable to update postfix table /etc/pmg/tls_policy: postmap: fatal: bad string length 0 < 1: mydomain =

unable to update postfix table /etc/pmg/tls_inbound_domains: postmap: fatal: bad string length 0 < 1: mydomain =

unable to update postfix table /etc/postfix/senderaccess: postmap: fatal: bad string length 0 < 1: mydomain =

unable to update postfix table /etc/postfix/rcptaccess: postmap: fatal: bad string length 0 < 1: mydomain =

unable to update postfix table /etc/postfix/clientaccess: postmap: fatal: bad string length 0 < 1: mydomain =

unable to update postfix table /etc/postfix/postscreen_access: postmap: fatal: bad string length 0 < 1: mydomain =

newaliases: fatal: bad string length 0 < 1: mydomain =

Job for postfix@-.service failed.

See "systemctl status postfix@-.service" and "journalctl -xeu postfix@-.service" for details.

command 'systemctl reload postfix@-' failed: exit code 1



Then I corrected /etc/postfix/main.cf, resulting in:



# grep mydomain /etc/postfix/main.cf



mydomain = example.com



After that, I restarted the postfix@- service and checked the status:



# service postfix@- status

postfix@-.service - Postfix Mail Transport Agent (instance -)

Loaded: loaded (/lib/systemd/system/postfix@.service; enabled-runtime; preset: enabled)

Active: active (running) since Mon 2025-11-24 21:07:47 WIB; 1min 10s ago

Docs: man:postfix(1)

Process: 53466 ExecStartPre=/usr/lib/postfix/configure-instance.sh - (code=exited, status=0/SUCCESS)

Process: 53478 ExecStart=/usr/sbin/postmulti -i - -p start (code=exited, status=0/SUCCESS)

Tasks: 3 (limit: 19178)

Memory: 6.6M

CPU: 448ms

CGroup: /system.slice/system-postfix.slice/postfix@-.service

├─53717 /usr/lib/postfix/sbin/master -w

├─53718 pickup -l -t fifo -u

└─53719 qmgr -l -t fifo -u



Nov 24 21:07:46 systemd[1]: Starting postfix@-.service - Postfix Mail Transport Agent (instance -)...

Nov 24 21:07:47 postfix[53479]: Postfix is using backwards-compatible default settings

Nov 24 21:07:47 postfix[53479]: See http://www.postfix.org/COMPATIBILITY_README.html for details

Nov 24 21:07:47 postfix[53479]: To disable backwards compatibility use "postconf compatibility_level=3.6" and ">

Nov 24 21:07:47 postfix/postfix-script[53715]: starting the Postfix mail system

Nov 24 21:07:47 postfix/master[53717]: daemon started -- version 3.7.11, configuration /etc/postfix

Nov 24 21:07:47 systemd[1]: Started postfix@-.service - Postfix Mail Transport Agent (instance -).

Nov 24 21:07:47 postfix/qmgr[53719]: error: open database /etc/pmg/domains.db: No such file or directory



From the status output, there is an error stating: error: open database /etc/pmg/domains.db: No such file or directory



Then I created the file manually using touch /etc/pmg/domains.db, restarted postfix@-, and checked the status again:


postfix@-.service - Postfix Mail Transport Agent (instance -)

Loaded: loaded (/lib/systemd/system/postfix@.service; enabled-runtime; preset: enabled)

Active: active (running) since Mon 2025-11-24 21:09:11 WIB; 5min ago

Docs: man:postfix(1)

Process: 53768 ExecStartPre=/usr/lib/postfix/configure-instance.sh - (code=exited, status=0/SUCCESS)

Process: 53780 ExecStart=/usr/sbin/postmulti -i - -p start (code=exited, status=0/SUCCESS)

Tasks: 3 (limit: 19178)

Memory: 2.6M

CPU: 430ms

CGroup: /system.slice/system-postfix.slice/postfix@-.service

├─54020 /usr/lib/postfix/sbin/master -w

├─54021 pickup -l -t fifo -u

└─54022 qmgr -l -t fifo -u



Nov 24 21:09:11 systemd[1]: Starting postfix@-.service - Postfix Mail Transport Agent (instance -)...

Nov 24 21:09:11 postfix[53782]: Postfix is using backwards-compatible default settings

Nov 24 21:09:11 postfix[53782]: See http://www.postfix.org/COMPATIBILITY_README.html for details

Nov 24 21:09:11 postfix[53782]: To disable backwards compatibility use "postconf compatibility_level=3.6" and ">

Nov 24 21:09:11 postfix/master[54020]: daemon started -- version 3.7.11, configuration /etc/postfix

Nov 24 21:09:11 systemd[1]: Started postfix@-.service - Postfix Mail Transport Agent (instance -).

Nov 24 21:09:11 postfix/qmgr[54022]: error: open database /etc/pmg/domains.db: Invalid argument


After that, I received a new error:

open database /etc/pmg/domains.db: Invalid argument

Could you please help explain what I might have missed during the installation process and what I can do to fix it?

I would also like to ask: what exactly is the postfix@- service? As far as I know, there is only the standard postfix service, and when I check its status, it is running without errors:

# service postfix status
● postfix.service - Postfix Mail Transport Agent
Loaded: loaded (/lib/systemd/system/postfix.service; enabled; preset: enabled)
Active: active (exited) since Tue 2025-11-25 07:28:37 WIB; 1h 13min ago
Docs: man:postfix(1)
Process: 675 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 675 (code=exited, status=0/SUCCESS)
CPU: 1ms

Nov 25 07:28:37 systemd[1]: Starting postfix.service - Postfix Mail Transport Agent...
Nov 25 07:28:37 systemd[1]: Finished postfix.service - Postfix Mail Transport Agent.
 
I already solved this problem, by doing postmap /etc/pmg/domains

# service postfix@- status
postfix@-.service - Postfix Mail Transport Agent (instance -)
Loaded: loaded (/lib/systemd/system/postfix@.service; enabled-runtime; preset: enabled)
Active: active (running) since Tue 2025-11-25 09:20:40 WIB; 2s ago
Docs: man:postfix(1)
Process: 1975 ExecStartPre=/usr/lib/postfix/configure-instance.sh - (code=exited, status=0/SUCCESS)
Process: 1989 ExecStart=/usr/sbin/postmulti -i - -p start (code=exited, status=0/SUCCESS)
Tasks: 3 (limit: 19128)
Memory: 2.6M
CPU: 392ms
CGroup: /system.slice/system-postfix.slice/postfix@-.service
├─2228 /usr/lib/postfix/sbin/master -w
├─2229 pickup -l -t fifo -u
└─2230 qmgr -l -t fifo -u

Nov 25 09:20:40 systemd[1]: Starting postfix@-.service - Postfix Mail Transport Agent (instance -)...
Nov 25 09:20:40 postfix[1990]: Postfix is using backwards-compatible default settings
Nov 25 09:20:40 postfix[1990]: See http://www.postfix.org/COMPATIBILITY_README.html for details
Nov 25 09:20:40 postfix[1990]: To disable backwards compatibility use "postconf compatibility_level=3.6" and "p>
Nov 25 09:20:40 postfix/postfix-script[2226]: starting the Postfix mail system
Nov 25 09:20:40 postfix/master[2228]: daemon started -- version 3.7.11, configuration /etc/postfix
Nov 25 09:20:40 systemd[1]: Started postfix@-.service - Postfix Mail Transport Agent (instance -).
 
I wonder why the name of your postfix-service now changed from "postfix" to "postfix@-".
AFAIK the "@" was removed from service-name with the last bigger update of the package.
Did you reinstall the postfix-service in an older version or something?
 
are you installing PMG 9.0.4 on top of Debian 12? AFAIK PMG9 needs Debian 13.
At least it says "Proxmox Mail Gateway 9.0 based on Debian 13 “Trixie” " - so I'd also assume that the packages are meant to be install on Debian 13 and not 12.
 
The normal way is to install from the ISO which include Debian13. You can install it on top of your own OS installation but that also needs to be Debian13. PMG8 was based on Debian12.