Postfix /etc/systemd/postfix-resolvconf.service

Original 📋 Debian 13 (Trixie) 12 lines

Works On

Viewing:
Debian 13 (Trixie)
Same on:
Other versions:

Details

Size
12 lines
MD5
6d5b339a17bfd911b1ae4f485b052d72
SHA256
02e240400af6f87c9fbdad752c4779a5cfdf33590f16acb1302058d798135e80
/etc/systemd/postfix-resolvconf.service
# Update postfix in-chroot copy of /etc/resolv.conf
# Works for main/default postfix instance only
[Unit]
Description=Updates postfix copy of resolv.conf
Documentation=man:postfix(1)
Documentation=file:/usr/share/doc/postfix/README.Debian.gz
ConditionPathExists=/etc/resolv.conf
ConditionPathIsDirectory=/var/spool/postfix/etc

[Service]
Type=oneshot
ExecStart=cp -pLu /etc/resolv.conf /var/spool/postfix/etc/resolv.conf

Copy & Paste

curl:
curl https://exampleconfig.com/api/v1/config/original/6d5b339a17bfd911b1ae4f485b052d72?hint=postfix-resolvconf.service
wget:
wget -O postfix-resolvconf.service https://exampleconfig.com/api/v1/config/original/6d5b339a17bfd911b1ae4f485b052d72?hint=postfix-resolvconf.service

For AI Agents

<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/6d5b339a17bfd911b1ae4f485b052d72?hint=postfix-resolvconf.service' /><config><app>Postfix</app><os>Debian 13 (Trixie)</os><location>/etc/systemd/postfix-resolvconf.service</location><lines>12</lines><md5>6d5b339a17bfd911b1ae4f485b052d72</md5><sha256>02e240400af6f87c9fbdad752c4779a5cfdf33590f16acb1302058d798135e80</sha256></config></prompt>

Paste into Claude, ChatGPT, or any AI assistant.

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-resolvconf.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-resolvconf.service?

Use it to restore a missing default, confirm what shipped, or diff against your current Postfix config.

How do I restore Postfix defaults?

Download the file, back up the current one in /etc/systemd/postfix-resolvconf.service, replace it, then reload or restart Postfix.

Is postfix-resolvconf.service safe for production?

It is the vendor default for Debian 13 (Trixie). Treat it as a baseline and review security and performance settings before production use.

How does this differ from other OS versions?

Defaults vary by distro and version. This copy matches Debian 13 (Trixie).

Can I use this for Postfix troubleshooting?

Yes. Diff it against yours to find drift, then restore only the sections you need.