LINUX.ORG.RU
ФорумAdmin

Не могу настроить правильно почтовые уведомления

 ,


0

1

Привет всем! Недавно поставит Proxmox, всё настроил, работает норм, мне нравится.

У меня на нём почтовый сервер Carbonio. У пользователей почта нормально ходит, принимается, отправляется. Настроил бэкапы по расписанию, они делаются, уведомление письмом приходит, но на почте mail.ru они пустые. Копия письма приходит на почту в этот самый Carbonio и там вот что написано

This is a MIME-encapsulated message. –659CF140C5E.1726208944/Proxmox01.localdomain Content-Description: Notification Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit This is the mail system at host Proxmox01.localdomain. I’m sorry to have to inform you that your message could not be delivered to one or more recipients. It’s attached below. For further assistance, please send mail to postmaster. If you do so, please include this problem report. You can delete your own text from the attached returned message. The mail system kolizey.tech@mail.ru: host mxs.mail.ru[217.69.139.150] said: 550 non-local sender verification failed (in reply to end of DATA command) –659CF140C5E.1726208944/Proxmox01.localdomain Content-Description: Delivery report Content-Type: message/delivery-status Reporting-MTA: dns; Proxmox01.localdomain X-Postfix-Queue-ID: 659CF140C5E X-Postfix-Sender: rfc822; root@Proxmox01.localdomain Arrival-Date: Tue, 10 Sep 2024 13:50:20 +0300 (MSK) Final-Recipient: rfc822; kolizey.tech@mail.ru Original-Recipient: rfc822;kolizey.tech@mail.ru Action: failed Status: 5.0.0 Remote-MTA: dns; mxs.mail.ru Diagnostic-Code: smtp; 550 non-local sender verification failed –659CF140C5E.1726208944/Proxmox01.localdomain Content-Description: Undelivered Message Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit Return-Path: root@Proxmox01.localdomain Received: by Proxmox01.localdomain (Postfix, from userid 0) id 659CF140C5E; Tue, 10 Sep 2024 13:50:20 +0300 (MSK) Content-Type: multipart/alternative; boundary=«—-_=_NextPart_001_1725965420» MIME-Version: 1.0 Subject: Test notification From: Proxmox VE root@Proxmox01.localdomain To: teh@kolizei.org,kolizey.tech@mail.ru Date: Tue, 10 Sep 2024 13:50:20 +0300 Auto-Submitted: auto-generated; Message-Id: 20240910105020.659CF140C5E@Proxmox01.localdomain This is a multi-part message in MIME format. ——_=NextPart_001_1725965420 Content-Type: text/p lain; charset=«UTF-8» Content-Transfer-Encoding: 8bit This is a test of the notification target ‘mail-to-root’. ——=NextPart_001_1725965420 Content-Type: text/html; charset=«UTF-8» Content-Transfer-Encoding: 8bit This is a test of the notification target ‘mail-to-root’. ——=_NextPart_001_1725965420– –659CF140C5E.1726208944/Proxmox01.localdomain–

В логах тоже самое вот что

Sep 13 09:28:59 Proxmox01 postfix/local[1128578]: 64DE9140C8A: to=root@Proxmox01.localdomain, relay=local, delay=1.5, delays=0/0/0/1.5, dsn=2.0.0, status=sent (delivered to command: /usr/bin/proxmox-mail-forward)
Sep 13 09:28:59 Proxmox01 postfix/qmgr[1128536]: 64DE9140C8A: removed
Sep 13 09:28:59 Proxmox01 proxmox-mail-fo[1128592]: Proxmox01 proxmox-mail-forward[1128592]: skipping disabled matcher ‘default-matcher’
Sep 13 09:29:00 Proxmox01 proxmox-mail-fo[1128592]: Proxmox01 proxmox-mail-forward[1128592]: notified via target test
Sep 13 09:29:00 Proxmox01 postfix/local[1128578]: 6F3F8140C2D: to=root@Proxmox01.localdomain, relay=local, delay=2.3, delays=0/1.4/0/0.84, dsn=2.0.0, status=sent (delivered to command: /usr/bin/proxmox-mail-forward)
Sep 13 09:29:00 Proxmox01 postfix/qmgr[1128536]: 6F3F8140C2D: removed
Sep 13 09:29:00 Proxmox01 proxmox-mail-fo[1128585]: Proxmox01 proxmox-mail-forward[1128585]: notified via target test
Sep 13 09:29:00 Proxmox01 postfix/local[1128570]: 6D6F1140C7E: to=root@Proxmox01.localdomain, relay=local, delay=2.4, delays=0/1.1/0/1.3, dsn=2.0.0, status=sent (delivered to command: /usr/bin/proxmox-mail-forward)
Sep 13 09:29:00 Proxmox01 postfix/qmgr[1128536]: 6D6F1140C7E: removed
Sep 13 09:29:04 Proxmox01 postfix/smtp[1128540]: 659CF140C5E: to=teh@kolizei.org, relay=mail.kolizei.org[192.168.1.78]:25, delay=243524, delays=243518/0.02/6.2/0.05, dsn=4.1.8, status=deferred (host mail.kolizei.org[192.168.1.78] said: 450 4.1.8 root@Proxmox01.localdomain: Sender address rejected: Domain not found (in reply to RCPT TO command))
Sep 13 09:29:04 Proxmox01 postfix/cleanup[1128566]: 45E2B140B91: message-id=20240913062904.45E2B140B91@Proxmox01.localdomain
Sep 13 09:29:04 Proxmox01 postfix/bounce[1128568]: 659CF140C5E: sender non-delivery notification: 45E2B140B91
Sep 13 09:29:04 Proxmox01 postfix/qmgr[1128536]: 45E2B140B91: from=<>, size=2998, nrcpt=1 (queue active)
Sep 13 09:29:04 Proxmox01 proxmox-mail-fo[1128626]: Proxmox01 proxmox-mail-forward[1128626]: skipping disabled matcher ‘default-matcher’
Sep 13 09:29:05 Proxmox01 proxmox-mail-fo[1128626]: Proxmox01 proxmox-mail-forward[1128626]: notified via target test
Sep 13 09:29:05 Proxmox01 postfix/local[1128578]: 45E2B140B91: to=root@Proxmox01.localdomain, relay=local, delay=1.2, delays=0/0/0/1.2, dsn=2.0.0, status=sent (delivered to command: /usr/bin/proxmox-mail-forward)
Sep 13 09:29:05 Proxmox01 postfix/qmgr[1128536]: 45E2B140B91: removed
Sep 13 09:29:08 Proxmox01 pvedaemon[785149]: root@pam successful auth for user ‘root@pam’

Вот мой конфиг постфикса, пишу только то, что не закомменчено

smtp_sasl_auth_enable = yes
smtp_tls_ciphers = high
smtp_tls_protocols = !SSLv2, !SSLv3
smtp_generic_maps = hash:/etc/postfix/generic
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_use_tls = no
inet_protocols = ipv4
message.setFrom = («kolizey.tech@mail.ru»);

В Центре обработки данных Proxmox есть уведомления по умолчанию- они не работают
Я сделал новый пресет уведомлений и он работает
В общем не понятно…

Cорри что под кат не убрал, он видимо сломался, никак не делается..

Всё что мог прочитал, но что-то не могу понять почему так(( Объясните кто знает как починить.



Последнее исправление: Marat777 (всего исправлений: 1)

Ответ на: комментарий от anc

Домен mail.ru и mail.kolizei.org в ДНС есть и все необходимые записи тоже..

я релей выключил, но он, видимо, шлёт через него
Может это из-за того, что тут используется релей сервер mail.ru?

Пинги с серевера проходят нормально

marat@mail:~$ ping mail.kolizei.org
PING mail.kolizei.org (192.168.1.78) 56(84) bytes of data.
64 bytes from mail.kolizei.org (192.168.1.78): icmp_seq=1 ttl=64 time=0.021 ms
64 bytes from mail.kolizei.org (192.168.1.78): icmp_seq=2 ttl=64 time=0.035 ms
64 bytes from mail.kolizei.org (192.168.1.78): icmp_seq=3 ttl=64 time=0.028 ms
64 bytes from mail.kolizei.org (192.168.1.78): icmp_seq=4 ttl=64 time=0.027 ms
^C
— mail.kolizei.org ping statistics —
4 packets transmitted, 4 received, 0% packet loss, time 3055ms rtt min/avg/max/mdev = 0.021/0.027/0.035/0.005 ms
marat@mail:~$ ping mail.ru
PING mail.ru (94.100.180.201) 56(84) bytes of data.
64 bytes from mail.ru (94.100.180.201): icmp_seq=1 ttl=55 time=65.4 ms
64 bytes from mail.ru (94.100.180.201): icmp_seq=2 ttl=55 time=66.6 ms
^C
— mail.ru ping statistics —
2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 65.430/66.034/66.638/0.604 ms

Marat777
() автор топика
Ответ на: комментарий от anc

Мда, я понял, это нет хоста отправителя
я в настройках поставил вот так

message.setFrom = («kolizey.tech@mail.ru»);

не помогло
наяндексил что можно создать белый список доменов
добавил в конфиг поствикса вот это

smtp_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access.pcre

создал соответствующий файл с записью

root@Proxmox01.localdomain OK;

после любых изменений делаю
postfix reload
Тестовое письмо приходит, запускаю бекап и письмо не приходит , а в логах вот что говорит, собственно тоже самое, как можно еще заставить сервер не проверять домент отправителя…
почему он вообще сам себя проверят?)

Sep 13 17:24:16 Proxmox01 pvedaemon[1288506]: INFO: Backup job finished successfully
Sep 13 17:24:16 Proxmox01 postfix/pickup[1288120]: 8E2A1140F77: uid=0 from=
Sep 13 17:24:16 Proxmox01 postfix/cleanup[1289146]: 8E2A1140F77: message-id=20240913142416.8E2A1140F77@Proxmox01.localdomain
Sep 13 17:24:16 Proxmox01 pvedaemon[1238817]: root@pam end task UPID:Proxmox01:0013A93A:01B6924F:66E44A85:vzdump:100:root@pam: OK
Sep 13 17:24:16 Proxmox01 postfix/qmgr[1288119]: 8E2A1140F77: from=root@Proxmox01.localdomain, size=13158, nrcpt=1 (queue active)
Sep 13 17:24:16 Proxmox01 postfix/smtp[1289148]: 8E2A1140F77: to=teh@kolizei.org, relay=mail.kolizei.org[192.168.1.78]:25, delay=0.13, delays=0.01/0.01/0.01/0.11, dsn=4.1.8, status=deferred (host mail.kolizei.org[192.168.1.78] said: 450 4.1.8 root@Proxmox01.localdomain: Sender address rejected: Domain not found (in reply to RCPT TO command))

Marat777
() автор топика
Ответ на: комментарий от Marat777

smtp_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access.pcre
создал соответствующий файл с записью
root@Proxmox01.localdomain OK;

Я незнаю postfix поэтому может я и не прав, но вроде ман говорит
Execute the command "postmap /etc/postfix/access" after editing the file.

anc ★★★★★
()