S
S
Senior-sommelier2021-04-09 15:10:54
Mail server
Senior-sommelier, 2021-04-09 15:10:54

How to send mail via external SMTP from local ClearOS server mailboxes?

I tried to set up work via external smtp according to this article:

https://serveradmin.ru/otpravka-pochtyi-cherez-kon...

When sending a test message, I get the following logs:

Apr  9 11:49:28 gateway postfix/pickup[2986]: 7683820809: uid=0 from=<root>
Apr  9 11:49:28 gateway postfix/cleanup[23752]: 7683820809: message-id=<[email protected]>
Apr  9 11:49:28 gateway postfix/qmgr[2987]: 7683820809: from=<[email protected]>, size=654, nrcpt=1 (queue active)
Apr  9 11:49:28 gateway postfix/smtpd[23756]: connect from localhost[127.0.0.1]
Apr  9 11:49:28 gateway postfix/smtpd[23756]: D5431207FB: client=localhost[127.0.0.1]
Apr  9 11:49:28 gateway postfix/cleanup[23752]: D5431207FB: message-id=<[email protected]>
Apr  9 11:49:28 gateway postfix/qmgr[2987]: D5431207FB: from=<[email protected]>, size=826, nrcpt=1 (queue active)
Apr  9 11:49:28 gateway postfix/smtpd[23756]: disconnect from localhost[127.0.0.1]
Apr  9 11:49:28 gateway postfix/pipe[23754]: 7683820809: to=<[email protected]>, relay=mailprefilter, delay=0.55, delays=0.17/0.03/0/0.35, dsn=2.0.0, status=sent (delivered via mailprefilter service)
Apr  9 11:49:28 gateway postfix/qmgr[2987]: 7683820809: removed


Test message to [email protected] does not arrive.

What could be the problem: Is the internal server filter on ClearOS silencing outgoing messages?

The most interesting thing is that I set up the collection of mail (pop3) from an external mail.ru account via mail retrieval without any problems at all.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Senior-sommelier, 2021-04-12
@Senior-sommelier

And so, based on the following:

The Postfix SMTP client does not support the obsolete «wrappermode» protocol, which uses TCP port 465 on the SMTP server!

it is necessary to open a tunnel using stunnel and send letters to mail.ru through this tunnel
cat /etc/stunnel/mailru-smtp.conf
[smtp-tls-wrapper]
accept = 127.0.0.1:10465
client = yes
connect = smtp.mail.ru:465

# stunnel /etc/stunnel/mailru-smtp.conf
# telnet 127.0.0.1 10465

# postmap /etc/postfix/sasl_passwd
# service postfix restart

And everything works. EH! Happy cosmonautics day

A
Alexander Chernykh, 2021-04-09
@sashkets

Well, what about the configs?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question