LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   How to configure local smtp server sendmail/postfix to occur error 503 5.5.4 send AUTH command first? (https://www.linuxquestions.org/questions/linux-server-73/how-to-configure-local-smtp-server-sendmail-postfix-to-occur-error-503-5-5-4-send-auth-command-first-4175735910/)

dodoes 04-11-2024 10:34 AM

How to configure local smtp server sendmail/postfix to occur error 503 5.5.4 send AUTH command first?
 
I want to achieve sendmail/postfix configuration as in smtp.yandex.ru to make error "503 5.5.4 send AUTH command first" occur after:
Code:

telnet localhost 25
EHLO test
MAIL FROM: user@hostname                                                               
503 5.5.4 send AUTH command first

OS: debian
I tryed to add in /etc/postfix/main.cf:
Code:

smtpd_sender_restrictions = reject_unauthenticated_sender_login_mismatch
and
Code:

smtpd_sender_restrictions = reject_sender_login_mismatch
"AUTH" command is working by demand. But the problem is "MAIL FROM:" command working without "AUTH" command too.
When I try "MAIL FROM" in telnet smtp.yandex.ru 25 then it's immediately giving error "503 5.5.4 send AUTH command first" and don't let me send message. This is what I want.
Or it is impossible anyway?
Somehow on the internet there is no information about that.

another example is gmail with error "530-5.7.0 Authentication Required" that I want:

Code:

220 smtp.gmail.com ESMTP g21-20020aa78755000000b006ead618c010sm2628214pfo.192 - gsmtp
ehlo test
250-smtp.gmail.com at your service, [202.126.90.176]
250-SIZE 35882577
250-8BITMIME
250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-CHUNKING
250 SMTPUTF8
MAIL FROM:username2@6b98331036c5
530-5.7.0 Authentication Required. For more information, go to
530 5.7.0  https://support.google.com/mail/?p=WantAuthError g21-20020aa78755000000b006ead618c010sm2628214pfo.192 - gsmtp


scasey 04-19-2024 06:29 PM

??
You entered MAIL FROM. The server gave a 503 error. Isn’t that what you want? I’m confused.

dodoes 04-20-2024 11:26 AM

Quote:

Originally Posted by scasey (Post 6497209)
??
You entered MAIL FROM. The server gave a 503 error. Isn’t that what you want? I’m confused.

Its gmail/yandex/other servers gave me what I wanted to achieve in my own server. My goal is to achieve the same settings as they did. It's my tests in other servers. I showed it's as examples of my goal. Sorry my English is bad :D

scasey 04-20-2024 03:00 PM

I understood that the foreign connections were examples of what you want.
I’m saying, don’t you already have that?
Quote:

Code:

telnet localhost 25
EHLO test
MAIL FROM: user@hostname                                                               
503 5.5.4 send AUTH command first


You connected, attempted to send an email, and got a 5xx error. I’m not seeing the problem.

dodoes 05-02-2024 12:55 PM

Quote:

Originally Posted by scasey (Post 6497365)
I understood that the foreign connections were examples of what you want.
I’m saying, don’t you already have that?

You connected, attempted to send an email, and got a 5xx error. I’m not seeing the problem.

Yes when I try same actions in my local own sendmail server I don't get that error, that is the problem. I want to get that error. I want to find what configuration I need to do


All times are GMT -5. The time now is 12:50 PM.