LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-11-2024, 10:34 AM   #1
dodoes
LQ Newbie
 
Registered: Apr 2024
Posts: 2

Rep: Reputation: 0
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

Last edited by dodoes; 04-12-2024 at 06:04 AM. Reason: added gmail example
 
Old 04-19-2024, 06:29 PM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
??
You entered MAIL FROM. The server gave a 503 error. Isn’t that what you want? I’m confused.
 
Old 04-20-2024, 11:26 AM   #3
dodoes
LQ Newbie
 
Registered: Apr 2024
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by scasey View Post
??
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
 
Old 04-20-2024, 03:00 PM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] SMTP AUTH with sendmail in centos.. 504 5.3.3 AUTH mechanism LOGIN not available satyadev75 Linux - Server 3 01-23-2014 02:30 AM
SMTP Error <<: 503 AUTH command used when not advertised Rafael25 Linux - Software 2 01-28-2013 11:39 PM
Postfix - allow non-auth connections from local network, relay mail via SASL AUTH fantasygoat Linux - Server 1 10-14-2011 04:45 PM
SMTP AUTH, Sendmail client to Postfix server Ricker42 Linux - General 32 12-09-2010 05:42 PM
smtp auth with sendmail through smtp.sbcglobal.yahoo.com woodson2 Fedora 0 10-23-2008 02:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration