什么时候该用这个 postfix-files?
用来恢复缺失的默认文件、确认发行版本带了什么,或拿你的 Postfix config 做 diff。
# # Do not edit this file. # # This file controls the postfix-install script for installation of # Postfix programs, configuration files and documentation, as well # as the post-install script for setting permissions and for updating # Postfix configuration files. See the respective manual pages within # the script files. # # Do not list $command_directory or $shlib_directory in this file, # or it will be blown away by a future Postfix uninstallation # procedure. You would not want to lose all files in /usr/sbin or # /usr/local/lib. # # Each record in this file describes one file or directory. # Fields are separated by ":". Specify a null field as "-". # Missing fields or separators at the end are OK. # # File format: # name:type:owner:group:permission:flags # No group means don't change group ownership. # # File types: # d=directory # f=regular file # h=hard link (*) # l=symbolic link (*) # # (*) With hard links and symbolic links, the owner field becomes the # source pathname, while the group and permissions are ignored. # # File flags: # No flag means the flag is not active. # p=preserve existing file, do not replace (postfix-install). # u=update owner/group/mode (post-install upgrade-permissions). # c=create missing directory (post-install create-missing). # r=apply owner/group recursively (post-install set/upgrade-permissions). # o=obsolete, no longer part of Postfix # 1=optional for non-default instance (config_dir != built-in default). # # Note: the "u" flag is for upgrading the permissions of existing files # or directories after changes in Postfix architecture. For robustness # it is a good idea to "u" all the files that have special ownership or # permissions, so that running "make install" fixes any glitches. # # Note: order matters. Update shared libraries and database plugins # before daemon/command-line programs. $config_directory:d:root:-:755:u $data_directory:d:$mail_owner:-:700:uc $daemon_directory:d:root:-:755:u $queue_directory:d:root:-:755:uc $queue_directory/active:d:$mail_owner:-:700:ucr $queue_directory/bounce:d:$mail_owner:-:700:ucr $queue_directory/corrupt:d:$mail_owner:-:700:ucr $queue_directory/defer:d:$mail_owner:-:700:ucr $queue_directory/deferred:d:$mail_owner:-:700:ucr $queue_directory/flush:d:$mail_owner:-:700:ucr $queue_directory/hold:d:$mail_owner:-:700:ucr $queue_directory/incoming:d:$mail_owner:-:700:ucr $queue_directory/private:d:$mail_owner:-:700:uc $queue_directory/maildrop:d:$mail_owner:$setgid_group:730:uc $queue_directory/public:d:$mail_owner:$setgid_group:710:uc $queue_directory/pid:d:root:-:755:uc $queue_directory/saved:d:$mail_owner:-:700:ucr $queue_directory/trace:d:$mail_owner:-:700:ucr # Update shared libraries and plugins before daemon or command-line programs. $shlib_directory/libpostfix-util.so:f:root:-:755 $shlib_directory/libpostfix-global.so:f:root:-:755 $shlib_directory/libpostfix-dns.so:f:root:-:755 $shlib_directory/libpostfix-tls.so:f:root:-:755 $shlib_directory/libpostfix-master.so:f:root:-:755 $meta_directory/dynamicmaps.cf:f:root:-:644 $meta_directory/main.cf.proto:f:root:-:644 $meta_directory/master.cf.proto:f:root:-:644 $meta_directory/postfix-files.d:d:root:-:755 $meta_directory/postfix-files:f:root:-:644 $daemon_directory/anvil:f:root:-:755 $daemon_directory/bounce:f:root:-:755 $daemon_directory/cleanup:f:root:-:755 $daemon_directory/discard:f:root:-:755 $daemon_directory/dnsblog:f:root:-:755 $daemon_directory/error:f:root:-:755 $daemon_directory/flush:f:root:-:755 $daemon_directory/local:f:root:-:755 $daemon_directory/main.cf:f:root:-:644:o $daemon_directory/master.cf:f:root:-:644:o $daemon_directory/master:f:root:-:755 $daemon_directory/oqmgr:f:root:-:755 $daemon_directory/pickup:f:root:-:755 $daemon_directory/pipe:f:root:-:755 $daemon_directory/post-install:f:root:-:755 # In case meta_directory == daemon_directory. #$daemon_directory/postfix-files:f:root:-:644:o #$daemon_directory/postfix-files.d:d:root:-:755:o $daemon_directory/postfix-script:f:root:-:755 $daemon_directory/postfix-tls-script:f:root:-:755 $daemon_directory/postfix-wrapper:f:root:-:755 $daemon_directory/postmulti-script:f:root:-:755 $daemon_directory/postlogd:f:root:-:755 $daemon_directory/postscreen:f:root:-:755 $daemon_directory/proxymap:f:root:-:755 $daemon_directory/qmgr:f:root:-:755 $daemon_directory/qmqpd:f:root:-:755 $daemon_directory/scache:f:root:-:755 $daemon_directory/showq:f:root:-:755 $daemon_directory/smtp:f:root:-:755 $daemon_directory/smtpd:f:root:-:755 $daemon_directory/spawn:f:root:-:755 $daemon_directory/tlsproxy:f:root:-:755 $daemon_directory/tlsmgr:f:root:-:755 $daemon_directory/trivial-rewrite:f:root:-:755 $daemon_directory/verify:f:root:-:755 $daemon_directory/virtual:f:root:-:755 $daemon_directory/nqmgr:h:$daemon_directory/qmgr $daemon_directory/lmtp:h:$daemon_directory/smtp $command_directory/postalias:f:root:-:755 $command_directory/postcat:f:root:-:755 $command_directory/postconf:f:root:-:755 $command_directory/postfix:f:root:-:755 $command_directory/postkick:f:root:-:755 $command_directory/postlock:f:root:-:755 $command_directory/postlog:f:root:$setgid_group:2755:u $command_directory/postmap:f:root:-:755 $command_directory/postmulti:f:root:-:755 $command_directory/postsuper:f:root:-:755 $command_directory/postdrop:f:root:$setgid_group:2755:u $command_directory/postqueue:f:root:$setgid_group:2755:u $sendmail_path:f:root:-:755 $newaliases_path:l:$sendmail_path $mailq_path:l:$sendmail_path $config_directory/main.cf:f:root:-:644:p $config_directory/master.cf:f:root:-:644:p $manpage_directory/man1/mailq.1.gz:f:root:-:644 $manpage_directory/man1/newaliases.1.gz:f:root:-:644 $manpage_directory/man1/postalias.1.gz:f:root:-:644 $manpage_directory/man1/postcat.1.gz:f:root:-:644 $manpage_directory/man1/postconf.1.gz:f:root:-:644 $manpage_directory/man1/postdrop.1.gz:f:root:-:644 $manpage_directory/man1/postfix-tls.1.gz:f:root:-:644 $manpage_directory/man1/postfix.1.gz:f:root:-:644 $manpage_directory/man1/postkick.1.gz:f:root:-:644 $manpage_directory/man1/postlock.1.gz:f:root:-:644 $manpage_directory/man1/postlog.1.gz:f:root:-:644 $manpage_directory/man1/postmap.1.gz:f:root:-:644 $manpage_directory/man1/postmulti.1.gz:f:root:-:644 $manpage_directory/man1/postqueue.1.gz:f:root:-:644 $manpage_directory/man1/postsuper.1.gz:f:root:-:644 $manpage_directory/man1/sendmail.1.gz:f:root:-:644 $manpage_directory/man5/access.5.gz:f:root:-:644 $manpage_directory/man5/aliases.5.gz:f:root:-:644 $manpage_directory/man5/body_checks.5.gz:f:root:-:644 $manpage_directory/man5/bounce.5.gz:f:root:-:644 $manpage_directory/man5/canonical.5.gz:f:root:-:644 $manpage_directory/man5/cidr_table.5.gz:f:root:-:644 $manpage_directory/man5/generics.5.gz:f:root:-:644:o $manpage_directory/man5/generic.5.gz:f:root:-:644 $manpage_directory/man5/header_checks.5.gz:f:root:-:644 $manpage_directory/man5/ldap_table.5.gz:f:root:-:644 $manpage_directory/man5/lmdb_table.5.gz:f:root:-:644 $manpage_directory/man5/master.5.gz:f:root:-:644 $manpage_directory/man5/memcache_table.5.gz:f:root:-:644 $manpage_directory/man5/mongodb_table.5.gz:f:root:-:644 $manpage_directory/man5/mysql_table.5.gz:f:root:-:644 $manpage_directory/man5/socketmap_table.5.gz:f:root:-:644 $manpage_directory/man5/sqlite_table.5.gz:f:root:-:644 $manpage_directory/man5/nisplus_table.5.gz:f:root:-:644 $manpage_directory/man5/pcre_table.5.gz:f:root:-:644 $manpage_directory/man5/pgsql_table.5.gz:f:root:-:644 $manpage_directory/man5/postconf.5.gz:f:root:-:644 $manpage_directory/man5/postfix-wrapper.5.gz:f:root:-:644 $manpage_directory/man5/regexp_table.5.gz:f:root:-:644 $manpage_directory/man5/relocated.5.gz:f:root:-:644 $manpage_directory/man5/tcp_table.5.gz:f:root:-:644 $manpage_directory/man5/transport.5.gz:f:root:-:644 $manpage_directory/man5/virtual.5.gz:f:root:-:644 $manpage_directory/man8/bounce.8.gz:f:root:-:644 $manpage_directory/man8/cleanup.8.gz:f:root:-:644 $manpage_directory/man8/anvil.8.gz:f:root:-:644 $manpage_directory/man8/defer.8.gz:f:root:-:644 $manpage_directory/man8/discard.8.gz:f:root:-:644 $manpage_directory/man8/dnsblog.8.gz:f:root:-:644 $manpage_directory/man8/error.8.gz:f:root:-:644 $manpage_directory/man8/flush.8.gz:f:root:-:644 $manpage_directory/man8/lmtp.8.gz:f:root:-:644 $manpage_directory/man8/local.8.gz:f:root:-:644 $manpage_directory/man8/master.8.gz:f:root:-:644 $manpage_directory/man8/nqmgr.8.gz:f:root:-:644:o $manpage_directory/man8/oqmgr.8.gz:f:root:-:644: $manpage_directory/man8/pickup.8.gz:f:root:-:644 $manpage_directory/man8/pipe.8.gz:f:root:-:644 $manpage_directory/man8/postlogd.8.gz:f:root:-:644 $manpage_directory/man8/postscreen.8.gz:f:root:-:644 $manpage_directory/man8/proxymap.8.gz:f:root:-:644 $manpage_directory/man8/qmgr.8.gz:f:root:-:644 $manpage_directory/man8/qmqpd.8.gz:f:root:-:644 $manpage_directory/man8/scache.8.gz:f:root:-:644 $manpage_directory/man8/showq.8.gz:f:root:-:644 $manpage_directory/man8/smtp.8.gz:f:root:-:644 $manpage_directory/man8/smtpd.8.gz:f:root:-:644 $manpage_directory/man8/spawn.8.gz:f:root:-:644 $manpage_directory/man8/tlsproxy.8.gz:f:root:-:644 $manpage_directory/man8/tlsmgr.8.gz:f:root:-:644 $manpage_directory/man8/trace.8.gz:f:root:-:644 $manpage_directory/man8/trivial-rewrite.8.gz:f:root:-:644 $manpage_directory/man8/verify.8.gz:f:root:-:644 $manpage_directory/man8/virtual.8.gz:f:root:-:644
curl https://exampleconfig.com/api/v1/config/original/fab278b40bcbbf73b9911338f6c61f14?hint=postfix-files
wget -O postfix-files https://exampleconfig.com/api/v1/config/original/fab278b40bcbbf73b9911338f6c61f14?hint=postfix-files
<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/fab278b40bcbbf73b9911338f6c61f14?hint=postfix-files' /><config><app>Postfix</app><os>Debian 13 (Trixie)</os><location>/etc/postfix/postfix-files</location><lines>206</lines><md5>fab278b40bcbbf73b9911338f6c61f14</md5><sha256>ed55cad00607edf5a5eaf508406b30eb54ec1a27a5afe2aee4297f2c90175a0a</sha256></config></prompt>
粘贴到 Claude、ChatGPT 或任何 AI 助手里。
sudo apk add postfix
sudo apt update && sudo apt install postfix
sudo yum install postfix
sudo apt update && sudo apt install postfix
什么时候该用这个 postfix-files?
用来恢复缺失的默认文件、确认发行版本带了什么,或拿你的 Postfix config 做 diff。
怎么恢复 Postfix 的默认配置?
下载文件,把 /etc/postfix/postfix-files 里的当前配置备份好,替换掉,然后 reload 或 restart Postfix。
postfix-files 适合直接上生产吗?
这是 Debian 13 (Trixie) 的厂商默认配置,只能当基线。上生产前请检查安全和性能设置。
和其他 OS 版本有什么不同?
默认值会随发行版和版本变化,这份对应 Debian 13 (Trixie)。
我可以用它来排查 Postfix 吗?
可以。和你的配置做 diff 找出漂移,然后只恢复需要的段落。