@Quqas

А у вас msmtp в Ubuntu server так же криво работает?

кому не лень выполнить
echo -e "Subject:new account\n\nTest Mail" | msmtp -d своё@мыло

и дать скрин пришедшего письма?
623730c930990520614549.jpeg
у меня хоть убейся "Undisclosed recipients:" всегда вместо "меня"

в логе
loaded system configuration file /etc/msmtprc
ignoring user configuration file /root/.msmtprc: No such file or directory
falling back to default account
using account default from /etc/msmtprc
host = smtp-mail.outlook.com
port = 587
source ip = (not set)
proxy host = (not set)
proxy port = 0
socket = (not set)
timeout = off
protocol = smtp
domain = localhost
auth = LOGIN
user = n*n@hotmail.com
password = *
passwordeval = (not set)
ntlmdomain = (not set)
tls = on
tls_starttls = on
tls_trust_file = /etc/ssl/certs/ca-certificates.crt
tls_crl_file = (not set)
tls_fingerprint = (not set)
tls_key_file = (not set)
tls_cert_file = (not set)
tls_certcheck = on
tls_min_dh_prime_bits = (not set)
tls_priorities = (not set)
tls_host_override = (not set)
auto_from = off
maildomain = (not set)
from = n*n@hotmail.com
set_from_header = auto
set_date_header = auto
remove_bcc_headers = on
undisclosed_recipients = off
dsn_notify = (not set)
dsn_return = (not set)
logfile = /var/log/msmtp.log
logfile_time_format = (not set)
syslog = LOG_MAIL
aliases = /etc/aliases.msmtp
reading recipients from the command line
<-- 220 FR2P281CA0023.outlook.office365.com Microsoft ESMTP MAIL Service ready at Sun, 20 Mar 2022 13:31:18 +0000
--> EHLO localhost
<-- 250-FR2P281CA0023.outlook.office365.com Hello [95.161.204.110]
<-- 250-SIZE 157286400
<-- 250-PIPELINING
<-- 250-DSN
<-- 250-ENHANCEDSTATUSCODES
<-- 250-STARTTLS
<-- 250-8BITMIME
<-- 250-BINARYMIME
<-- 250-CHUNKING
<-- 250 SMTPUTF8
--> STARTTLS
<-- 220 2.0.0 SMTP server ready
TLS session parameters:
    (TLS1.2)-(ECDHE-SECP384R1)-(RSA-PSS-RSAE-SHA256)-(AES-256-GCM)
TLS certificate information:
    Subject:
        C=US,ST=Washington,L=Redmond,O=Microsoft Corporation,CN=outlook.com
    Issuer:
        C=US,O=DigiCert Inc,CN=DigiCert Cloud Services CA-1
    Validity:
        Activation time: Sun 24 Oct 2021 12:00:00 AM UTC
        Expiration time: Sun 23 Oct 2022 11:59:59 PM UTC
    Fingerprints:
        SHA256: 44:0D:9A:C4:E9:32:01:AE:37:86:3F:33:1D:E9:63:41:D8:DE:C2:88:13:38:B2:0B:95:8F:69:38:EA:2B:29:5B
        SHA1 (deprecated): E2:95:CC:F7:F1:25:F7:09:07:C2:E7:F9:7E:F0:F5:E7:D5:70:4D:E6
--> EHLO localhost
<-- 250-FR2P281CA0023.outlook.office365.com Hello [95.161.204.110]
<-- 250-SIZE 157286400
<-- 250-PIPELINING
<-- 250-DSN
<-- 250-ENHANCEDSTATUSCODES
<-- 250-AUTH LOGIN XOAUTH2
<-- 250-8BITMIME
<-- 250-BINARYMIME
<-- 250-CHUNKING
<-- 250 SMTPUTF8
--> AUTH LOGIN
<-- 334 VXNlcm5hbWU6
--> bmMuZmxleG8uaW5AaG90bWFpbC5jb20=
<-- 334 UGFzc3dvcmQ6
--> d3h4R25aQmsxQW1zQWVLeg==
<-- 235 2.7.0 Authentication successful
--> MAIL FROM:<n*n@hotmail.com>
--> RCPT TO:<d*v@r*t.ru>
--> DATA
<-- 250 2.1.0 Sender OK
<-- 250 2.1.5 Recipient OK
<-- 354 Start mail input; end with <CRLF>.<CRLF>
--> From: n*n@hotmail.com
--> Date: Sun, 20 Mar 2022 13:31:18 +0000
--> Subject:new account
-->
--> Test Mail
--> .
<-- 250 2.0.0 OK <AM5PR0901MB16035915FCE7D930C791F9BEBD159@AM5PR0901MB1603.eurprd09.prod.outlook.com> [Hostname=AM5PR0901MB1603.eurprd09.prod.outlook.com]
--> QUIT
<-- 221 2.0.0 Service closing transmission channel


RCPT TO: указано правильно

читаю тут https://manpages.ubuntu.com/manpages/jammy/en/man1... (вспотел до последней версии обновлять)
#msmtp --version
msmtp version 1.8.16
Platform: x86_64-pc-linux-gnu

undisclosed_recipients off прописано(хоть врут что и так по дефолту) , а по любасу Undisclosed recipients: через веб если смотреть =также
конфиг

defaults
aliases /etc/aliases.msmtp
logfile /var/log/msmtp.log
syslog LOG_MAIL
undisclosed_recipients off
#add_missing_from_header off
set_from_header auto
remove_bcc_headers on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
from n*n@hotmail.com

account hotmail
host smtp-mail.outlook.com
port 587
auth login
tls on
*****
account hp
***
account default : hotmail

---------------------------

может я чего не догоняю, и это не баг а фича? как надо прописать Кому, чтобы не было Undisclosed recipients: ?
  • Вопрос задан
  • 340 просмотров
Решения вопроса 1
@Quqas Автор вопроса
это печально - отсутствие знатоков. всё самому надо "копать"

дело было в самом "письме"
надо добавлять
\n\
To: test@test.com \n\

тогда только появляется Кому:

странно что само msmtp не добавляет из адреса получателя.

насколько помню у ssmtp такого не было
Ответ написан
Комментировать
Пригласить эксперта
Ответы на вопрос 1
suffix_ixbt
@suffix_ixbt
https://www.babai.ru/
Msmtp transmits mails unaltered to the SMTP server, with the following exceptions:

The Bcc header(s) will be removed. This behavior can be changed with the remove_bcc_headers command and --remove-bcc-headers option.
A From header will be added if the mail does not have one. This can be changed with the set_from_header command and --set-from-header option. The header will use the envelope from address and optionally a full name set with the -F option.
A Date header will be added if the mail does not have one. This can be changed with the set_date_header command and --set-date-header option.
When undisclosed_recipients is set, the original To, Cc, and Bcc headers are removed and replaced with "To: undisclosed-recipients:;".

The email address in the From must match the smtp email address you used in your msmtprc for the email provider. The email address in the To can be anything, but if you don’t have the line in the text file, you will receive the email with Undisclosed recipients:; on the received email.
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

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