-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
503 5.5.1 Error: authentication not enabled when I'm running a local SMTP server. #1657
Comments
Hey @virtadpt. The only thing that comes to mind is #1595. You could try editing lines 7 and 8 of action_mailer.rb to be |
Thanks, let me give that a try... |
No dice. Let me try 'nil'. |
'nil' didn't work, either. Hypothetically speaking, what would happen if |
Per the answer here (https://stackoverflow.com/questions/26093514/rails-actionmailer-send-email-without-authentication) I had to comment out (not set to 'nil' - that continued to throw the same error) the authentication, user_name, and password lines to get outbound SMTP working again. Perhaps it should be possible to set the appropriate lines in huginn/.env to nothing (e.g., "SMTP_AUTHENTICATION=") to disable that particular facet of SMTP transmission... or would ActionMailer not permit that by design? |
Interesting. Does the following work if you set
and
work? If it doesn't, then I think you're correct, and the existence of the key, independent of it's value is what's causing authentication. In that case, we should do: ActionMailer::Base.smtp_settings = {}.tap do |settings|
settings.merge!({
address: ENV['SMTP_SERVER'] || "smtp.gmail.com",
port: ENV['SMTP_PORT'] || 587,
domain: ENV['SMTP_DOMAIN'],
enable_starttls_auto: ENV['SMTP_ENABLE_STARTTLS_AUTO'] == 'true',
openssl_verify_mode: ENV['SMTP_OPENSSL_VERIFY_MODE'].presence,
ca_path: ENV['SMTP_OPENSSL_CA_PATH'].presence,
ca_file: ENV['SMTP_OPENSSL_CA_FILE'].presence
})
if ENV['SMTP_AUTHENTICATION'] != 'none'
settings.merge!({
authentication: ENV['SMTP_AUTHENTICATION'].presence || "plain",
user_name: ENV['SMTP_USER_NAME'].presence,
password: ENV['SMTP_PASSWORD'].presence
})
end
end |
I'm trying it right now. I'l keep an eye on things, and if I keep getting e-mail in the next hour or two, that might be the fix. |
@virtadpt I used your .env settings and compared the old and the new ActionMailer SMTP configuration and think the first change Andrew proposed should have worked:
I think it should work to change
|
EDITED: It took a while, but a couple of e-mails finally made it though. |
That seems to have fixed it. Note that in the .env file SMTP_USERNAME, SMTP_PASSWORD, and SMTP_AUTHENTICATION must have nothing after the equals sign for it to work, putting something like nil or false won't work. It'll be a minor edit to the comments of huginn/.env.example. |
`user_name` and `password` need to be set to nil when no authentication should be performed Fixes huginn#1657
Strangely after moving to docker but keeping all my old configuration in getting this error. Postfix is configured the same and the docker network is bridged properly but no matter how I configure it huginn is making an AUTH request to postfix putting u this same error. any other ideas why this might affect from docker?
|
How did you configure the network bridge? I am surprised that the docker container can reach the docker host by using |
Host mode and -h 127.0.0.1
I needed this as my MySQL runs native on the server . Works fine and when I
exec into the image i can reach postfix just fine
…On Thu, Oct 26, 2017 at 8:56 AM Dominik Sander ***@***.***> wrote:
How did you configure the network bridge? I am surprised that the docker
container can reach the docker host by using 127.0.0.1.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1657 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AASBwQBJOtLRGzfVK24ac6XLXTmBrUPXks5swDtGgaJpZM4JwAFm>
.
|
The docker commands are
I dump all my ENV variables into a Dockerfile and rebuild an image. Easier for me to automate this way vs 20+ env variables in my run command. The container is interfacing fine with postfix but it always seems to send an AUTH request. |
FWIW, I seem to have fixed this by finding that pull from earlier this year to specify SMTP_AUTHENTICATION=none as an env variable. This seems to have been overlooked in docs so I'll note this elsewhere in the wiki. |
Cool I did not know this was possible.
Interesting, you can also use the
Thank you! We are not very good when it comes to documenting stuff 😊 |
I have Postfix installed on my Huginn server, and it is configured to only send outbound mail from applications running on the server (alongside several other pieces of software). After updating last night I started getting failed jobs with the following error message:
503 5.5.1 Error: authentication not enabled
The relevant configuration settings in huginn/.env, which I have not edited (confirmed with the output of AIDE):
Did something change in Huginn that prevents it from using the local SMTP server without authentication?
The text was updated successfully, but these errors were encountered: