Назад | Перейти на главную страницу

CentOS 7 - Postfix не запускается

На данный момент не запускается postfix. Вот ошибка, которую я получаю:

warning: unreasonable macro call nesting: "mydomain"
warning: unreasonable macro call nesting: ", localhost."
warning: unreasonable macro call nesting: "mydomain"
warning: unreasonable macro call nesting: ", localhost, "
warning: unreasonable macro call nesting: "mydomain"
fatal: dictionary mail_dict: macro processing error
postfix.service: control process exited, code=exited status=1
Failed to start Postfix Mail Transport Agent.
Unit postfix.service entered failed state.
postfix.service failed.

Вот мой main.cf (включен только бит, который раскомментирован и добавлен в файл):

myhostname = mail.domain.net
mydomain = domain.net
myorigin = $mydomain
home_mailbox = mail/
mynetworks = 127.0.0.0/8
inet_interfaces = all
inet_protocols = all
inet_interfaces = localhost
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtp_tls_note_starttls_offer = yes
smtpd_tls_loglevel = 1
smtpd_tls_key_file = /etc/postfix/ssl/server.key
smtpd_tls_cert_file = /etc/postfix/ssl/server.crt
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

В приведенном выше коде я отредактировал mail.domain.net и domain.net в своем локальном фрагменте кода.

Postconf -n полностью:

postconf: warning: unreasonable macro call nesting: "mail.domain.net    mydomain = domain.net    myorigin = "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: "    home_mailbox = mail/    mynetworks = 127.0.0.0/8    relay_domains =     inet_interfaces = all    inet_protocols = all    mydestination = "
postconf: warning: unreasonable macro call nesting: "myhostname"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost."
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: warning: unreasonable macro call nesting: ", localhost, "
postconf: warning: unreasonable macro call nesting: "mydomain"
postconf: fatal: dictionary mail_dict: macro processing error

Я вижу одну ошибку в вашем main.cf: должна быть только одна строка для inet_interfaces и localhost не является допустимым значением для «net_interfaces»

Из http://www.postfix.org/postconf.5.html#inet_interfaces

inet_interfaces (по умолчанию: все)

Адреса сетевого интерфейса, на которые эта почтовая система получает почту. Укажите «все», чтобы получать почту на всех сетевых интерфейсах (по умолчанию), и «только с обратной связью», чтобы получать почту только на сетевые интерфейсы с обратной связью (Postfix версии 2.2 и новее). Параметр также управляет доставкой почты пользователю @ [ip.address].

Примечание 1: вам нужно остановить и запустить Postfix при изменении этого параметра.

Примечание 2: адресная информация может быть заключена в [], но эта форма здесь не требуется.

Когда inet_interfaces указывает только один адрес IPv4 и / или IPv6, который не является адресом обратной связи, SMTP-клиент Postfix будет использовать этот адрес в качестве исходного IP-адреса для исходящей почты. Поддержка IPv6 доступна в Postfix версии 2.2 и новее.

В многосетевом брандмауэре с отдельными экземплярами Postfix, прослушивающими «внутренний» и «внешний» интерфейсы, это может помешать каждому экземпляру достичь удаленных SMTP-серверов на «другой стороне» брандмауэра. Установка smtp_bind_address на 0.0.0.0 позволяет избежать потенциальной проблемы для IPv4, а установка smtp_bind_address6 на :: решает проблему для IPv6.

Лучшее решение для многосетевых межсетевых экранов - оставить inet_interfaces по умолчанию и вместо этого используйте явные IP-адреса в определениях SMTP-сервера master.cf. Это сохраняет обнаружение петель SMTP-клиента Postfix, гарантируя, что каждая сторона брандмауэра знает, что другой IP-адрес все еще тот же хост. Настройка $inet_interfaces к одному адресу IPv4 и / или IPV6 в первую очередь полезно при виртуальном хостинге доменов на вторичных IP-адресах, когда каждый IP-адрес обслуживает другой домен (и имеет другую настройку $ myhostname).

См. Также параметр proxy_interfaces для сетевых адресов, которые пересылаются в Postfix через прокси или транслятор адресов. Примеры:

inet_interfaces = all (DEFAULT)
inet_interfaces = loopback-only (Postfix version 2.2 and later)
inet_interfaces = 127.0.0.1
inet_interfaces = 127.0.0.1, [::1] (Postfix version 2.2 and later)
inet_interfaces = 192.168.1.2, 127.0.0.1

Я думаю тебе нужно relayhost = your_mta.