Send сервер сообщает об ошибке authentication required

Не отправляются письма непонятно почему. Вот выписка из журнала работы программы:

SEND  — Отправка письма для xxxx@mail.ru
SEND  — Сервер сообщает об ошибке: 5.7.1 Authentication required
SEND  — Соединение завершено — отправлено писем: 0
Не удалось отправить некоторые письма — подробности смотрите в Журнале работы.

Вообще никак понять не могу в чем дело. Все перепробовал что знаю. Аутентификация SMTP сделана и POP3 аутентификацию прежде чем SMTP пробовал. Вообще никак. И на ADSL пробовал и на обычном модеме не работает. С других почтовых ящиков в этом же BAT’е все отправляется а вот здесь никак. Сервер на рамблере. Подскажите кто знает, буду очень признателен.

Alright so as the title says, I get this error when trying to send email via PowerShell:

Send-MailMessage : The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required.

I have looked at numerous questions related to the same issue. But I can’t seem to make my script work:

    #Email alerts when a user gets locked out
##############################################################################
$pass = Get-Content .securepass.txt | ConvertTo-SecureString -AsPlainText -Force
$name = "sender@gmail.com"
$cred = New-Object System.Management.Automation.PSCredential($name,$pass)
##############################################################################
$From = "sender@gmail.com"
$To = "recipient@domain.org"
$Subject = "User Locked Out"
$Body = "A user has been locked out of his/her account."
$SMTPServer = "smtp.gmail.com"
$SMTPPort = "587"

Send-MailMessage -From $From -to $To -Subject $Subject `
-Body $Body -SmtpServer $SMTPServer -port $SMTPPort `
-Credential $cred -UseSsl
##############################################################################

I have logged into the Gmail account from the machine that will be running the script. I have also enabled Access for less secure apps from the Google account manager. I do get this to work just fine if I prompt for the credentials using the -Credential (Get-Credential) instead of calling for the $cred variable.

Is there something I am missing?

Thanks,
Dan

asked Jun 11, 2015 at 19:02

Daniel Dodds's user avatar

6

If the file contains the encrypted password it’s better to read it like this (without the parameters -AsPlainText and -Force):

$pass = Get-Content .securepass.txt | ConvertTo-SecureString

Demonstration:

PS C:> $sec = 'foobar' | ConvertTo-SecureString -AsPlainText -Force
PS C:> $sec
System.Security.SecureString
PS C:> $txt = $sec | ConvertFrom-SecureString
PS C:> $txt
01000000d08c9ddf0115d1118c7a00c04fc297eb01000000615ce070639b9647a5e05d42b41d373
0000000000200000000001066000000010000200000001614c19281e7c0b076cceb38e284b0f18b
c0d813ea40ed055dde96fd9ccb6977000000000e8000000002000020000000a10c7019eb224c3c6
387ba03bcd94993a50e0c468248284bbce4d235b11f1b94100000002421a5d7102de13c46ccc1db
c4921287400000000412332ecb500828f4403f3e225089c629369744bad62609b528ed0a7318abf
512c9b6a8884c43b3adc8a13d5d21a9ed27e56702bcc7db094da9d9d4c02dfa74
PS C:> $sec2 = $txt | ConvertTo-SecureString
PS C:> $sec2
System.Security.SecureString
PS C:> $cred = New-Object Management.Automation.PSCredential 'foo', $sec2
PS C:> $cred.GetNetworkCredential().Password
foobar

Beware though that encryption of secure strings is tied to the user and host encrypting them, meaning you can’t decrypt a secure string on another host or as another user.

answered Jun 12, 2015 at 16:10

Ansgar Wiechers's user avatar

Ansgar WiechersAnsgar Wiechers

192k24 gold badges246 silver badges321 bronze badges

I found my answer after looking at my passwords file content, thanks to Angsgar. The securepass.txt had the encrypted contents inside, not plaintext. What I did was replace it with the actual password that will then be encrypted when setting my $pass variable. All is good now!

answered Jun 11, 2015 at 21:35

Daniel Dodds's user avatar

Daniel DoddsDaniel Dodds

511 gold badge1 silver badge3 bronze badges

Ansgar’s answer is a good generic answer, but for Google, they have multiple SMTP servers that you can use. smtp.google.com requires authentication, but not all of them do.

From Google’s doc, if your site is a G Suite site and you will always be sending from a specific IP address, you can specify the address in G Suite configuration and then use the G Suite SMTP relay at smtp-relay.gmail.com. This is only available to G Suite users, and requires either authentication or a static IP. At our site, we have an internal SMTP server that we use for these sorts of emails which relays to Google’s G Suite SMTP relay server.

If you are sending email only to Google or G Suite addresses, you can specify aspmx.l.google.com as your SMTP address. This is known as the restricted Gmail SMTP server.

answered Sep 26, 2018 at 13:16

Bacon Bits's user avatar

Bacon BitsBacon Bits

30.5k5 gold badges58 silver badges65 bronze badges

Mail clients like Outlook, Thunderbird, etc, make communication easier.

At times, these email clients throw up errors like “550 5.7.1: authentication required” resulting in email failure.

Email users will be confused when they can’t figure out the exact reason for the auth failure.

That’s why we get frequent requests from customers to solve mail errors as part of our Server Management Services.

Today we’ll see the error in detail and discuss how our Support Engineers fix this error.

What is Error: “550 5.7.1 authentication required”?

Firstly, let’s have a deep look at the exact error.

This mail authentication error has three parts:

  • 550 5.7.1 authentication required” indicates reply code, status code and reply text respectively.
  • Error 550 is an email error code that indicates the user’s improper authentication to the server. Email errors that start with ‘5’ require an action instead of a retry.
  • 5.7.1 indicates a message refused error. Again, “authentication required” is the human-readable form of the resulted error.

In short, the error “550 5.7.1 authentication required” is a permanent failure that occurs due to incorrect credentials provided by the user.

Why does it happen?

We now know the details of the error. It’s time now to check on why it happens.

Email security is of much importance while sending any sensitive information. The absence of account validation could lead to attacks from spammers who use the server to send unnecessary emails. Spamming from the server will end up in email server blacklisting too.
Therefore, server administrators always allow emails only from authenticated senders. And, when authentication fails, server reports error.

There are two possibilities for this auth failure error.

1. Incorrect login details

Some users give incorrect user name and password while configuring an Email client. This can be typing errors like extra space, typo errors in entering user details, etc.

When the server identifies the connection from a non-existing user, it automatically denies the mail sending with an error.

2. Configuration details of Email client

Usually, incorrect mail client configuration can also result in Email errors. The configuration details vary for different Email clients. For mails to work, the user should enable the option for authentication in every email client.

Therefore, we always ask customers to check the configuration details in email clients.

How we fix error “550 5.7.1″?

Curious to know the fix?

When this error happens, our Support Engineers begin the investigation by checking the mail server logs. For example, in a cPanel Exim server, we check the logs at /var/log/exim_mainlog.

This gives us a clue on exactly what has gone wrong with the email client configuration. Generally, the incorrect credentials, typo errors, extra spacing, etc. will be readily viewable from logs.
If we find mistakes, we suggest the users double-check the given credentials like email username and password in the mail client.

Similarly, not enabling the SMTP authentication in email clients could also cause the same error.

For users configuring Outlook, we suggest the following steps to enable the SMTP authentication. Move to Account Settings>>More settings>> Outgoing server
There is an option to enable “My outgoing server (SMTP) requires authentication”. Enable it and results would appear as:

[No luck in solving email errors? Seek expert help here.]

Conclusion

In short, error “550 5.7.1 authentication required” occurs as a result of providing incorrect credentials or due to not enabling SMTP authentication in the mail client.
Today we discussed the various causes of the error and how our Support Engineers fix it.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

Аватара пользователя

Про

Он живет тут
Сообщения: 7977
Зарегистрирован: 15 июн 2007, 17:04
Откуда: Хочу быть модератором!
Благодарил (а): 100 раз
Поблагодарили: 150 раз
Контактная информация:

Проблема с почтовым клиентом «The Bat». Подскажите!

В общем поставил я сейчас себе данную программу, в качестве эксперимента «Portable The Bat Professional Edition 4.0.38 Rus». Забил настройки ящика, принял почту, посмотрел, все удалил лишнее, в общем, все хорошо! Попробовал отправить письмо — трабл, пишет ошибку «!25.11.2008, 15:34:47: SEND — Сервер сообщает об ошибке: 5.7.1 Authentication required» Подскажите, что это может быть, и как это исправить! А то клиент то хороший, а вот какой то гемор возник!:(
Спасиб)

Google опять чудит: на этот раз решил доставить радость владельцам почтовых аккаунтов Gmail, которые используют для получения почты программы вроде The Bat, и отключил возможность добавлять так называемые «ненадежные» программы в свой список исключений. То есть раньше достаточно было просто указать, что я разрешаю всяким сторонним программам работать с почтой Gmail, то теперь нужно всё сделать по-другому.

google и the bat не принимает почту

Всё началось вчера, когда на домашнем компьютере вдруг перестала приниматься почта Google через The Bat. Я попробовал разные способы, что-то гуглил, но в итоге так ничего и не заработало. Решил забить до поры до времени.

И точно: сегодня отрубилась уже рабочая почта на том же самом The Bat только Portable версии :cry:

Ошибки были разные:

Сервер сообщает об ошибке: -ERR [AUTH] Application-specific password required.

Сервер сообщает об ошибке: -ERR [AUTH] Username and password not accepted.

Сервер сообщает об ошибке: «ВНИМАНИЕ: не удалось обнаружить на сервере подходящих алгоритмов аутентификации» и т.п.

Содержание

  • Как решить проблему?
    • Включаем аутентификацию
    • Обновляем The Bat
    • Меняем настройки The Bat
    • Принимаем почту
  • Еще проблема
  • Выводы и итоги

Как решить проблему?

С 30 мая 2022 года Google принял решение вообще не работать с так называемыми «небезопасными приложениями» и перейти на новый алгоритм аутентификации.

И начиная с этого времени The Bat перестал нормально принимать (и/тили отправлять) почту на Gmail.

Что нужно сделать:

Включаем аутентификацию

Для начала обязательно проверяем — включена ли двухфакторная аутентификация в аккаунте Google.

Если нет — то включаем: «Управление аккаунтом» — «Безопасность»

the bat не работает с google почтой

the bat не работает с gmail

Обновляем The Bat

На старых версиях новая аутентификация работать не будет.

Поэтому обновляем The Bat, я обновил до Portable 9.5.1 — это последняя версия на момент написания статьи.

Меняем настройки The Bat

Теперь нужно поменять настройки почтового ящика Gmail в самой программе.

А именно во вкладке «Транспорт» есть кнопка Авторизация, а в ней надо поменять тип с обычной на OAUTH (через веб-браузер).

настраиваем the bat для получения почты с гугл

Принимаем почту

Теперь надо получить почту.
При этом вылезет окошко, мол, давайте введите код авторизации.

А чтобы его получить — надо кликнуть на кнопку «Открыть в системном браузере».

почта google не принимает письма

Откроется обычный браузер, в котором надо заверить Google, что приложение The Bat очень надежно, вы ему всё разрешаете, подтвердить всё кодом из СМС-ки.

почта гмейл не принимает письма в the bat

Затем скопировать длинный кодпочта гмейл перестала работать с батом

Ну и вставить его в The Bat.

Поздравляю, теперь можно качать почту из Google как раньше :whew:

Еще проблема

С конца сентября 2022 у меня вдруг перестала отправляться почта на 9 версии The Bat.

То есть с гугла всё принималось, а туда не отправлялось. Выдавалась ошибка 5.7.0.

И дело оказалось именно в версии программы.

Не нужно заморачиваться с настройками, читать мануалы, ползать по форумам — если у вас такая же проблема, не тратьте время.

После обновления на The Bat 10 — почта стала отправляться при тех же настройках.

Выводы и итоги

Google начинает напрягать.

Сначала выдурил мозги с SSL, затем стал напрягать с Webp, потом перестал индексировать сайты, сейчас вот очередные телодвижения нужны теперь и в почте.

Основной вывод, который я сделал: при возможности нужно линять с гугла, так что больше там новых ящиков стараюсь не заводить, делаю выбор в пользу яндекса, и другим советую, он меньше мозги дурит, а техподдержка и документация толковее в разы.

Понравилась статья? Поделить с друзьями:
  • Self signed certificate in certificate chain ошибка
  • Selenium ошибка cannot find chrome binary
  • Selection does not contain a main type eclipse ошибка
  • Selected boot image did not authenticate ошибка
  • Select и group by ошибки