Postfix /etc/systemd/postfix@.service

Original ๐Ÿ“‹ Debian 9 (Stretch) 19 lines

Works On

Viewing:
Debian 9 (Stretch)
Same on:
Debian 10 (Buster) Debian 11 (Bullseye) Debian 12 (Bookworm) Ubuntu 18.04 LTS (Bionic Beaver) Ubuntu 20.04 LTS (Focal Fossa) Ubuntu 22.04 LTS (Jammy Jellyfish) Ubuntu 24.04 LTS (Noble Numbat)
Other versions:

Details

Size
19 lines
MD5
4224e053e1fa1cb321f51b18026bb698
SHA256
01730141e4cda8aa4240438c09e52746e5c61672a854f683469659be7ae9f7b5

Copy & Paste

curl:
curl https://exampleconfig.com/api/v1/config/original/4224e053e1fa1cb321f51b18026bb698?hint=postfix@.service
wget:
wget -O postfix@.service https://exampleconfig.com/api/v1/config/original/4224e053e1fa1cb321f51b18026bb698?hint=postfix@.service

For AI Agents

You are a DevOps agent. Fetch the default Postfix config for Debian 9 (Stretch) from https://exampleconfig.com/api/v1/config/original/4224e053e1fa1cb321f51b18026bb698?hint=postfix@.service. Compare with my current /etc/systemd/postfix@.service and summarize differences and safe changes.

Copy this prompt into Claude, ChatGPT, or other AI assistants.

/etc/systemd/postfix@.service
[Unit]
Description=Postfix Mail Transport Agent (instance %i)
Documentation=man:postfix(1)
PartOf=postfix.service
Before=postfix.service
ReloadPropagatedFrom=postfix.service
After=network-online.target nss-lookup.target
Wants=network-online.target

[Service]
Type=forking
GuessMainPID=no
ExecStartPre=/usr/lib/postfix/configure-instance.sh %i
ExecStart=/usr/sbin/postmulti -i %i -p start
ExecStop=/usr/sbin/postmulti -i %i -p stop
ExecReload=/usr/sbin/postmulti -i %i -p reload

[Install]
WantedBy=multi-user.target

Install Postfix

Alpine Linux

sudo apk add postfix

Debian

sudo apt update && sudo apt install postfix

Red Hat Enterprise Linux

sudo yum install postfix

Ubuntu

sudo apt update && sudo apt install postfix

File Location

File Path
/etc/systemd/postfix@.service
Directory
/etc/systemd/
Significance
System-wide configuration directory
Description
Files in /etc/ contain system-wide configuration settings that affect all users.

FAQ

When should I use this postfix@.service?

Restore it. Compare it. Start clean.

How do I restore Postfix defaults?

Download, replace, restart.

Is postfix@.service safe for production?

Yes. This is exactly what shipped. Safe starting point.

How does this differ from other OS versions?

Defaults change. This one is specific to Debian 9 (Stretch).

Can I use this for Postfix troubleshooting?

Absolutely. Diff this against yours to spot the problem.