Ubuntu 20.04 서버에서 "postconf default_process_limit" 명령을 실행할 때 "postconf: 경고: /etc/postfix/main.cf: 정의되지 않은 매개변수: 메일"

Ubuntu 20.04 서버에서 "postconf default_process_limit" 명령을 실행할 때 "postconf: 경고: /etc/postfix/main.cf: 정의되지 않은 매개변수: 메일"

Ubuntu 20.04 LEMP 서버를 실행하고 있습니다. 이메일 및 웹 서버입니다. 수정하는 데 도움이 필요하다는 postconf 메시지에 수수께끼 같은 경고가 표시됩니다.

명령을 실행할 때

postconf default_process_limit

경고 메시지를 반환합니다.

postconf: warning: /etc/postfix/main.cf: undefined parameter: mail

아래는 내 /etc/postfix/main.cf파일입니다.

# See /usr/share/postfix/main.cf.dist for a commented, more complete version

# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

#smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_banner = $myhostname ESMTP
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2

# TLS parameters
# Don't use self-signed certificates
#smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
#smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
#smtpd_tls_security_level=may

### Linuxbabe
# Enable TLS Encryption when Postfix receives incoming emails
smtpd_tls_cert_file=/etc/letsencrypt/live/mail.facl.xyz/fullchain.pem
smtpd_tls_key_file=/etc/letsencrypt/live/mail.facl.xyz/privkey.pem
smtpd_tls_security_level=may
smtpd_tls_loglevel = 1
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache

### Linuxbabe
#Enable TLS Encryption when Postfix sends outgoing emails
smtp_tls_security_level = may # Original by Linuxbabe. Use this if emails break.
#smtp_tls_security_level = encrypt
smtp_tls_loglevel = 1
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

### Linuxbabe
#Enforce TLSv1.3 or TLSv1.2
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
smtpd_tls_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
smtp_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
smtp_tls_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1

# Default 3 = uncommented
#smtp_tls_CApath=/etc/ssl/certs
#smtp_tls_security_level=may
#smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# The below line prevents you from being an open relay, which means that your mail server wont forward email on behalf of anyone towards any destination, like open relays do.
# This line tells Postfix to forward email only from clients in trusted networks, from clients that have authenticated with SASL, or to domains that are configured as authorized relay destinations.
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = mail.example.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, localhost.$mydomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
message_size_limit = 104857600

#### Linuxbabe
# Tell Postfix to deliver incoming emails to local message store via the Dovecot LMTP server.
mailbox_transport = lmtp:unix:private/dovecot-lmtp
# Disable SMTPUTF8 in Postfix, because Dovecot-LMTP doesn't support this email extension
smtputf8_enable = no

### Linuxbabe Chapter 3
virtual_mailbox_domains = proxy:mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf
virtual_mailbox_maps =
   proxy:mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf,
   proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf
virtual_alias_maps =
   proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf,
   proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf,
   proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf

### Linuxbabe chapter 3
virtual_transport = lmtp:unix:private/dovecot-lmtp

### Linuxbabe Chapter 3
# The first line defines the base location of mail files. The remaining 3 lines
# define which user ID and group ID Postfix will use when delivering incoming
# emails to the mailbox. We use the user ID 2000 and group ID 2000.
virtual_mailbox_base = /var/vmail
virtual_minimum_uid = 2000
virtual_uid_maps = static:2000
virtual_gid_maps = static:2000

### Linuxbabe Chapter 3 Ending
# By default, any local user can use the sendmail binary to submit outgoing emails.
# Now that your mail server is using virtual mailboxes, you might want to restrict
# access to the sendmail binary to trusted local users only, so a malicious user
# can’t use it to send a large volume of emails to damage your mail server’s reputation
authorized_submit_users = root,www-data,ubuntu,netdata

# deliver emails to local message store via the dovecot LMTP server (roundcube tutorial, sieve section, linuxbabe)
mailbox_transport = lmtp:unix:private/dovecot-lmtp
# disables SMTPUTF8 in Postfix, because Dovecot-LMTP doesn’t support this email extension (roundcube tutorial, seive section, linuxbabe)
smtputf8_enable = no

### Linuxbabe, rouncube tutorial, sieve section
# Help remove sensitive info (such as roundcube version number) from email headers
# This line is overridden by smtp_header_checks line at bottom of page
#smtp_header_checks = regexp:/etc/postfix/smtp_header_checks

### LINUXBABE CHAPTER 4
# The first line specifies the Postfix policy agent timeout setting. The following lines will impose a restriction on incoming emails by rejecting unauthorized email and checking SPF record.
policyd-spf_time_limit = 3600
smtpd_recipient_restrictions =
   permit_mynetworks,
   permit_sasl_authenticated,
   reject_unauth_destination,
   check_policy_service unix:private/policyd-spf,
### LinuxBabe Chapter "7 Effective Tips for Blocking Email Spam with Postfix SMTP Server"
   # Make Postfix use the Postgrey policy server.
   check_policy_service inet:127.0.0.1:10023,
   # Tip #6, Whitelisting
   check_client_access hash:/etc/postfix/rbl_override,
### LinuxBabe Chapter ""7 Effective Tips for Blocking Email Spam with Postfix SMTP Server"
   # Tip #6: Using Public Realtime Blacklists
   reject_rhsbl_helo dbl.spamhaus.org,
   reject_rhsbl_reverse_client dbl.spamhaus.org,
   reject_rhsbl_sender dbl.spamhaus.org,
   # The single line below is for public whitelisting, with dnswl whitelisting by ip address
   permit_dnswl_client list.dnswl.org=127.0.[0..255].[1..3],
   # The single line below is for whitelisting, however, if using spamhaus.org for blacklisting, then you don't need this on a whitelist as it is impossible for an IP address to be listed in Spamhaus whitelist and blacklist at the same time.
   #permit_dnswl_client swl.spamhaus.org,
   reject_rbl_client zen.spamhaus.org

### LINUXBABE CHAPTER 4
# Milter configuration for Postfix to be able to call OpenDKIM via the milter protocol.
#milter_default_action = accept
#milter_protocol = 6
#smtpd_milters = local:opendkim/opendkim.sock
#non_smtpd_milters = $smtpd_milters

### Linuxbabe Chapter "7 Effective Tips for Blocking Email Spam with Postfix SMTP Server"
## Tip #1
smtpd_sender_restrictions =
   permit_mynetworks
   permit_sasl_authenticated
## Tip #4
   # Add the following line to reject email if the domain name of the address supplied with the MAIL FROM command has neither MX record nor A record.
   reject_unknown_sender_domain
   # This directive rejects an email if the client IP address has no PTR Record.
   reject_unknown_reverse_client_hostname
## Tip #3
   # A legitimate email server should have an IP address returned from an A record, that matches the IP address of the email server.
   # To filter out emails from hosts that don't have a valid A record (IP doesnt match that of the server) add the following two lines below.
   #reject_unknown_reverse_client_hostname # Duplicate from above.
   reject_unknown_client_hostname
   # ^^^ NOTE: reject_unknown_client_hostname does not require HELO from SMTP client. It will fetch the hostname from PTR record, then check the A record.

## Tip #2
# Add the following line to require the client to provide a HELO/EHLO hostname.
smtpd_helo_required = yes
# Add the following 3 lines to enable smtpd_helo_restrictions
smtpd_helo_restrictions =
   permit_mynetworks
   permit_sasl_authenticated
   # Ocasionally, a legitimate mail server doesn't have a valid A record for the HELO/EHLO hostname. You need to whitelist them with the line below ("check_helo_access" directive).
   # Don't forget to add whitelisted domains the the helo_access whitelist file, located at /etc/postfix/helo_access
   check_helo_access hash:/etc/postfix/helo_access
   # Use the following line to reject clients who provide malformed HELO/EHLO hostname.
   reject_invalid_helo_hostname
   # Use the following line to reject non-fully qualified HELO/EHLO hostname.
   reject_non_fqdn_helo_hostname
   # Use the following line to reject emails when the HELO/EHLO hostname has neither DNS A records nor MX Records.
   reject_unknown_helo_hostname

### Linuxbabe, Chapter "Block Email Spam with Postfix and SpamAssassin Content Filter"
# Use header checks with PCRE
header_checks = pcre:/etc/postfix/header_checks
body_checks = pcre:/etc/postfix/body_checks

# Milter configuration (Note: Order of these matters. Don't change the order.)
# https://www.linuxbabe.com/mail-server/block-email-spam-check-header-body-with-postfix-spamassassin
milter_default_action = accept
milter_protocol = 6
smtpd_milters = local:opendkim/opendkim.sock,local:opendmarc/opendmarc.sock,local:spamass/spamass.sock
# If you haven't configured openDmarc you should remove local:opendmarc/opendmarc.sock from smtpd_milters in /etc/postfix/main.cf
#smtpd_milters = local:opendkim/opendkim.sock,local:spamass/spamass.sock
non_smtpd_milters = $smtpd_milters

### LInuxbabe "Spamassassin and Sieve Chapter"
# You can use smtp_header_checks to delete email headers that could show sensitive information.
# smtp_header_checks are only applied when Postfix is acting as an SMTP client, so it won’t affect incoming emails.
# You might not want the recipient to know that you are using SpamAssassin on your mail server.
# So add the following line, which tells Postfix to delete the X-Spam-Status and X-Spam-Checker-Version header
# from the email message when sending emails
smtp_header_checks = pcre:/etc/postfix/smtp_header_checks

### Linuxbabe "Postfix-amavis" chapter
# This tells Postfix to turn on content filtering by sending every incoming email message to Amavis, which listens on 127.0.0.1:10024.
content_filter = smtp-amavis:[127.0.0.1]:10024
# This will delay Postfix connection to content filter until the entire email message has been received, which can prevent content filters from wasting time and resources for slow SMTP clients.
smtpd_proxy_options = speed_adjust

# This setting was added by admin to fix "SPF: HELO does not publish an SPF Record" on mail-tester.com
smtp_helo_name = $mail.example.com

이 경고는 무엇을 의미하며 어떻게 해결할 수 있나요? 내 postfix 파일 어딘가에 오류가 있습니까? 정확히 무엇을 찾아야 합니까?

어떤 도움을 주셔서 감사합니다!

답변1

당신의 마지막 줄은

smtp_helo_name = $mail.example.com

하지만 정의된 변수가 없습니다 $mail. 변수가 아닌 메일 호스트의 실제 DNS 이름을 사용하세요.

답변2

/etc/postfix/main.cf파일 의 마지막 줄은 이었지만 smtp_helo_name = $mail.example.com$mail 변수가 정의되지 않았습니다. 내 메일 호스트가 실제로 호출되기 때문에 내 메일 호스트의 실제 DNS 이름 앞을 mail.example.com제거해야 했습니다 . $그 후 내 줄은 다음과 같이 변경되었습니다.

smtp_helo_name = $mail.example.com

이에:

smtp_helo_name = mail.example.com

그런 다음 원래 게시물의 경고가 더 이상 나타나지 않았습니다.

관련 정보