Answer the question
In order to leave comments, you need to log in
Does your msmtp in Ubuntu server also work crookedly?
who is not too lazy to perform
echo -e "Subject:new account\n\nTest Mail" | msmtp -d своё@мыло
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*[email protected]
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*[email protected]
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*[email protected]>
--> RCPT TO:<d*[email protected]*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*[email protected]
--> Date: Sun, 20 Mar 2022 13:31:18 +0000
--> Subject:new account
-->
--> Test Mail
--> .
<-- 250 2.0.0 OK <[email protected]9.prod.outlook.com> [Hostname=AM5PR0901MB1603.eurprd09.prod.outlook.com]
--> QUIT
<-- 221 2.0.0 Service closing transmission channel
#msmtp --version
msmtp version 1.8.16
Platform: x86_64-pc-linux-gnu
Answer the question
In order to leave comments, you need to log in
it's sad - the lack of connoisseurs. you have to "dig" everything yourself,
it was in the "letter" itself,
you need to add
\n\
To: [email protected] \n\
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.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question