Предупреждение `undefined параметр: mua_sender_restrictions` при` postconf -n`

Моя система - centos 7. Я настраиваю почтовый сервер с postfix, dovecot, mariadb на основе этого сообщения .
На моем почтовом сервере возникла проблема: может отправлять почту, но не может получать почту .

Затем я postconf -n , результат, как показано ниже:

[root@server6328 log]# postconf -n
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_sender_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_client_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_helo_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_sender_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_client_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_helo_restrictions
postconf: warning: /etc/postfix/main.cf: undefined parameter: virtual_mailbox_limit_maps
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
disable_vrfy_command = yes
dovecot_destination_recipient_limit = 1
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 30720000
milter_default_action = accept
milter_protocol = 6
mydestination = $myhostname,localhost.$mydomain,localhost,localhost.localdomain
myhostname = mail.mydomain.com
mynetworks = 127.0.0.1
newaliases_path = /usr/bin/newaliases.postfix
non_smtpd_milters = $smtpd_milters
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
show_user_unknown_table_name = no
smtp_tls_security_level = may
smtpd_helo_required = yes
smtpd_helo_restrictions = reject_non_fqdn_helo_hostname,reject_invalid_helo_hostname,reject_unknown_helo_hostname
smtpd_milters = inet:127.0.0.1:8891
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination,check_policy_service unix:private/policy-spf,reject_invalid_hostname,reject_non_fqdn_helo_hostname,reject_non_fqdn_sender,reject_non_fqdn_recipient
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous, noplaintext
smtpd_sasl_tls_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = reject_non_fqdn_sender,reject_unknown_sender_domain,reject_rbl_client zen.spamhaus.org
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/pki/dovecot/certs/fullchain.cer
smtpd_tls_key_file = /etc/pki/dovecot/private/*.mydomain.com.key
smtpd_tls_loglevel = 0
smtpd_tls_security_level = may
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 550
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_gid_maps = static:1000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_limit = 209715200
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_transport = dovecot
virtual_uid_maps = static:1000
postconf: warning: /etc/postfix/main.cf: unused parameter: policy_time_limit=3600s
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_limit_message=Sorry, the maildir has overdrawn diskspace quota
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: policy-spf_time_limit=3600

Я заметил несколько предупреждений :

postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_sender_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_client_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_helo_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_sender_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_client_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_helo_restrictions
postconf: warning: /etc/postfix/main.cf: undefined parameter: virtual_mailbox_limit_maps

postconf: warning: /etc/postfix/main.cf: unused parameter: policy_time_limit=3600s
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_limit_message=Sorry, the maildir has overdrawn diskspace quota
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: policy-spf_time_limit=3600

Действующая часть / etc / postfix / master .cf :

smtp      inet  n       -       n       -       -       smtpd
#smtp      inet  n       -       n       -       1       postscreen
#smtpd     pass  -       -       n       -       -       smtpd
#dnsblog   unix  -       -       n       -       0       dnsblog
#tlsproxy  unix  -       -       n       -       0       tlsproxy
submission inet n       -       n       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_reject_unlisted_recipient=no
  -o smtpd_client_restrictions=$mua_client_restrictions
  -o smtpd_helo_restrictions=$mua_helo_restrictions
  -o smtpd_sender_restrictions=$mua_sender_restrictions
 -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING
smtps     inet  n       -       n       -       -       smtpd
  -o syslog_name=postfix/smtps
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_reject_unlisted_recipient=no
  -o smtpd_client_restrictions=$mua_client_restrictions
  -o smtpd_helo_restrictions=$mua_helo_restrictions
  -o smtpd_sender_restrictions=$mua_sender_restrictions
  -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING
#628       inet  n       -       n       -       -       qmqpd
pickup    unix  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
#qmgr     unix  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr

dovecot   unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/dovecot-lda -f ${sender} -d ${recipient}
policyd-spf  unix  -       n       n       -       0       spawn
  user=nobody argv=/usr/libexec/postfix/policyd-spf

Какова возможная причина этих предупреждений? Как решить эту проблему?

0
задан 7 February 2019 в 14:08
4 ответа

Ваша конфигурация main.cf и master.cf не соответствует. Скорее всего, это вызвано копированием примеров конфигурации, которые должны были соединяться вместе, и отсутствовала одна сторона.

  1. Когда вы меняли параметр policyd-spf в master.cf, вы вызывали свою службу

     policyd-spf unix - nn  - 0 респауна
     

    , но затем в main.cf вы пытаетесь изменить его конфигурацию без буквы d :

     policy-spf_time_limit = 3600
     
  2. Затем вы сделали то же самое с ограничениями smtpd _ * _ . Вы ссылаетесь на настройки mua _ * , но нигде их не определяли.

    Если вы добавили свои списки ограничений в smtpd_restriction_classes , вы можете пропустить $ при использовании их в правой части настроек ограничений, что даст вам более читаемые сообщения об ошибках в случае ошибок в конфигурации:

     smtpd_restriction_classes = mua_sender_restrictions, mua_client_restrictions,
      mua_helo_restrictions, mua_sender_restrictions
    mua_client_restrictions = permission_sasl_authenticated, отклонить
     ...
     

    А затем в master.cf :

     smtps ..
      ..
      -o smtpd_client_restrictions = mua_client_restrictions
     

Я настоятельно рекомендую начать со свежего набора стандартной конфигурации и постепенно добавлять только те изменения, которые вам действительно нужны.

Запуск postconf должен выдать ноль предупреждений. Не запускайте систему, в которой postconf уже сообщает вам, что некоторые части вашей конфигурации не работают. Даже с рядом мер безопасности, включенных в постфикс , легко создать настройку, которой будут злоупотреблять спамеры.

2
ответ дан 4 December 2019 в 13:22

Дайте угадаю, у вас установлена ​​последняя версия Postfix. Да, сопровождающий постфикс Postfix добавил mua_client_restrictions в файл(ы) конфигурации... частично.

«ошибка» была введена в https://github.com/vdukhovni/postfix/commit/99ff75430d5c908879Caffcc1125680ed68019021#dift-6f25157451E1BCB001A0A6951E1BCB001A0A6926795486BR23

Вы можете бросить линию в Victor , Сопровождающий Postfix за частичное знакомство с файлом, поставляемым Postfix по умолчанию. Виктор еще не догнал культуру GitHub, не говоря уже о поддержке багзиллы для Postfix, а вместо этого полагается на другие специфичные для дистрибутива багзиллы.

Или вы можете исправить это самостоятельно с помощью ответа StackExchange.

ОБНОВЛЕНИЕ: Или я могу вырезать и вставить ответ...

Добавьте следующее в ваш файл /etc/postfix/main.cf.

smtpd_restriction_classes = mua_sender_restrictions, mua_client_restrictions, mua_helo_restrictions

mua_client_restrictions = permit_sasl_authenticated, reject

mua_sender_restrictions = permit_sasl_authenticated, reject

mua_helo_restrictions = permit_mynetworks, reject_non_fqdn_hostname, reject_invalid_hostname, permit
11
ответ дан 1 January 2020 в 18:11

Я думаю, что синтаксически вам нужно написать эти строки с префиксом -o:

     -o smtpd_restriction_classes = mua_sender_restrictions, mua_client_restrictions, mua_helo_restrictions
     -o mua_client_restrictions = permit_sasl_authenticated, reject
     -o mua_sender_restrictions = permit_sasl_authenticated, reject
     -o mua_helo_restrictions = permit_mynetworks, reject_non_fqdn_hostname, reject_invalid_hostname, permit

По крайней мере, у меня это работает.

0
ответ дан 12 April 2020 в 16:46

Учитывая, что опции mua_ даже недействительны (см. man 5 postconf), я думаю, вы можете просто удалить эти строки. Это то, что сработало для меня.

0
ответ дан 15 April 2021 в 00:04

Теги

Похожие вопросы