Postfix:
Postfix

Postfix
smtp_* ()
smtpd_* ()
1000

$ postconf

$ postconf -v

(+)
$ postconf -d

?

/etc/postfix/main.cf /etc/postfix/master.cf 2
main.cf key = value
$

# #% is default setting
#% compatibility_level = 0
compatibility_level = 3.7

compatibility_level Postfix ()
(2023-02-18 3.7 Debian 11 3.5 )
2
0 ()(compatibility_level )

?
#% syslog_facility = mail
#% syslog_name = ${multi_instance_name?{$multi_instance_name}:{postfix}}


Ubuntu, Debian /etc/init.d/postfix
$ service postfix start

systemd
$ systemctl start postfix
postfix.service /etc/systemd ()

/etc/postfix/master.cf ( master.cf )
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (no) (never) (100)
# ==========================================================================
smtp inet n - y - - smtpd
#smtp inet n - y - 1 postscreen
#smtpd pass - - y - - smtpd

IP
SMTPSMTP
IP?
/etc/postfix/main.cf ( main.cf ) inet_interfaces IP
IPv6 IPv4 使 inet_protocols :
all
inet_protocols = all
inet_interfaces = all



SMTP smtp 25
SMTP submission 587
master.cf
SMTP
service
# service type private unpriv chroot wakeup maxproc command + args
# ...
smtp inet n - y - - smtpd

SMTP
SMTP
# service type private unpriv chroot wakeup maxproc command + args
# ...
submission inet n - y - - smtpd
-o syslog_name=postfix/submission
# -o smtpd_tls_security_level=encrypt
# ...

myhostname
FQDN

mydomain
myhostname

mynetworks


smtpd_banner
myhostname 使
myhostname
$ postconf -v | grep myhostname

smtpd_*_restrictions
()
SMTP
RCPT TO, ETRN MTA(?)
RCPT TO, ETRN
NOT, AND, OR ()
Postfix SMTP
Postfix

smtpd_client_restrictions
smtpd_helo_restrictions
HELO
smtpd_sender_restrictions
MAIL FROM
smtpd_recipient_restrictions
RCPT TO
smtpd_data_restrictions
DATA
smtpd_end_of_data_restrictions
DATA ( . )
smtpd_etrn_restrictions
ETRN
smtpd_relay_restrictions

Postfix:
PERMIT
DEFER (4xx)
REJECT (5xx)

使()
defer_code = 450
reject_code = 554

Postfix SMTP http://www.postfix-jp.info/trans-2.2/jhtml/SMTPD_ACCESS_README.html

Postfix 2.10 smtpd_relay_restrictions - Postfix Advent Calendar 2014 https://fumiyas.github.io/2014/12/05/smtpd_relay_restrictions.postfix-advent-calendar.html

Envelope To mydestination ($local_transport )

relay_domains
(Envelope To )


IP
mynetworks
smtpd_relay_restrictions 使




proxy_read_maps
proxymap


sendmail
$ sendmail hisname@example.org
From: yourname@example.com
To: hisname@example.org
Subject: Hello!
Hello!
.

postdrop: warning: unable to look up public/pickup: No such file or directory


Envelope To
transport_maps
relayhost
DNS MX
fallback_relay


Postfix