docker-mailman
docker-mailman copied to clipboard
Admin / password reset fails
I configured my SMTP settings in mailman web and created the default admin account. When I tried resetting my email, it errors out:
SMTPRecipientsRefused at /accounts/password/reset/
{u'
Any ideas?
It looks like the email address for your admin account is not a valid email, can you check that?
Other than that, I can't see any thing else that would cause this error.
On October 23, 2017 7:28:21 PM EDT, Abhilash Raj [email protected] wrote:
It looks like the email address for your admin account is not a valid email, can you check that?
Other than that, I can't see any thing else that would cause this error.
Definitely valid.
When I defined mailman_admin_email, I didn't use any quotes. Is correct?
I also defined it for the variable under settings.py admin email. Correct thing to do?
--
Thanks,
Fabian S.
OpenPGP: 3C3FA072ACCB7AC5DB0F723455502B0EEB9070FC
A quick google search gave me this:
https://unix.stackexchange.com/a/91753
Can you check if that is indeed the problem?
Just as an FYI, I am just guessing what could be the problem, I never seen it before.
On October 23, 2017 7:41:50 PM EDT, Abhilash Raj [email protected] wrote:
Just as an FYI, I am just guessing what could be the problem, I never seen it before.
My email server is already appropriately set. Still errors out.
Thanks,
Fabian S.
OpenPGP: 3C3FA072ACCB7AC5DB0F723455502B0EEB9070FC
On October 23, 2017 7:41:50 PM EDT, Abhilash Raj [email protected] wrote:
Just as an FYI, I am just guessing what could be the problem, I never seen it before.
So I figured out the hostname business.
Now I'm stuck on this:
SMTPRecipientsRefused at /accounts/password/reset/
{u'
My issue seems to be I'm having trouble deciphering what needs to be configured and what to leave alone. Not sure what I've missed this time.
Thanks,
Fabian S.
OpenPGP: 3C3FA072ACCB7AC5DB0F723455502B0EEB9070FC
Can you tell me what was wrong the first time so that I can help others if they face a similar problem? Thanks!
The default address to send emails from is defined by DEFAULT_FROM_EMAIL
variable in settings_local.py
in the configuration of mailman-web. Alternatively, you can set SERVE_FROM_DOMAIN
environment variable and the sender address will be set to postorius@$(SERVE_FROM_DOMAIN)
address.
https://github.com/maxking/docker-mailman/blob/master/web/mailman-web/settings.py#L221 ^ This is where this setting is defined.
On October 23, 2017 9:18:11 PM EDT, Abhilash Raj [email protected] wrote:
Can you tell me what was wrong the first time so that I can help others if they face a similar problem? Thanks!
The default address to send emails from is defined by
DEFAULT_FROM_EMAIL
variable insettings_local.py
in the configuration of mailman-web. Alternatively, you can setSERVE_FROM_DOMAIN
environment variable and the sender address will be set topostorius@$(SERVE_FROM_DOMAIN)
address.https://github.com/maxking/docker-mailman/blob/master/web/mailman-web/settings.py#L221 ^ This is where this setting is defined.
It was not setting my hostname from mailman-web.
My issue seems to be here somewhere:
Use SERVE_FROM_DOMAIN as the default domain in the email.
hostname = os.environ.get('SERVE_FROM_DOMAIN', 'localhost.local')
DEFAULT_FROM_EMAIL = 'postorius@{}'.format(hostname)
SERVER_EMAIL = 'root@{}'.format(hostname)
Change this when you have a real email backend
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = os.environ.get('SMTP_HOST', '172.19.199.1')
EMAIL_PORT = os.environ.get('SMTP_PORT', 25)
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_USE_TLS = False
Assuming I'm using a custom address and it's the same for both addresses their, can you give me an example?
Thanks,
Fabian S.
OpenPGP: 3C3FA072ACCB7AC5DB0F723455502B0EEB9070FC
EMAIL_BACKEND and related settings don't have anything to do with the sender address, they define how mailman-web connects to your SMTP relay service (Postfix or such).
The emails generated by mailman-web are set to sender address specified by the setting DEFAULT_FROM_EMAIL. By default, if no SERVE_FROM_DOMAIN environment variable is defined, its value is [email protected]
which is causing your error.
You can do two things to fix this:
-
Set SERVE_FROM_DOMAIN environment variable, this will change the sender address to
postorius@SERVE_FROM_DOMAIN
[1] -
Set DEFAULT_FROM_EMAIL setting in settings_local.py and that will override whatever is the default value. [2]
[1]: Add a new entry here.
[2]: settings_local.py
is the external configuration file for mailman-web container, it should be present at /opt/mailman/web/settings_local.py
on your host and the container will pick it up.
October 23, 2017 9:56 PM, "Abhilash Raj" [email protected] wrote:
EMAIL_BACKEND and related settings don't have anything to do with the sender address, they define how mailman-web connects to your SMTP relay service (Postfix or such).
The emails generated by mailman-web are set to sender address specified by the setting DEFAULT_FROM_EMAIL. By default, if no SERVE_FROM_DOMAIN environment variable is defined, its value is [email protected] which is causing your error.
You can do two things to fix this:
Set SERVE_FROM_DOMAIN environment variable, this will change the sender address to postorius@SERVE_FROM_DOMAIN [1]
Set DEFAULT_FROM_EMAIL setting in settings_local.py and that will override whatever is the default value. [2]
[1]: Add a new entry here.
[2]: settings_local.py is the external configuration file for mailman-web container, it should be present at /opt/mailman/web/settings_local.py on your host and the container will pick it up.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
ok,
this is where I'm at now:
SMTPRecipientsRefused at /accounts/password/reset/
{u'
see my config files on pastebin (sanitized of course):
docker-compose.yaml: https://pastebin.com/VbnGrdB4
web/mailman-web/settings.py: https://pastebin.com/kG0f896D
my apache https config: https://pastebin.com/pQdd46h7
thanks. I've been going back and forth trying different combinations, but with no luck. I guess my issue is I don't have a good read on the MM3 configurations and what all needs to be adjusted, left alone, created from scratch, etc...
thanks for any help you can offer.
--
Thanks,
Fabian S.
OpenPGP: 3C3FA072ACCB7AC5DB0F723455502B0EEB9070FC
i got it. i had to properly configure my email server to allow relaying by the postorius user and the docker network. now, in web/../settings.py, what are those email MTA server settings meant for? when do they come into play?
You need to configure emails at two places right now, once for Core and another time for Django(mailman-web).
Django usually sends out account confirmation emails and other error tracebacks if you have it configured that way. Core handles the actual emails in the Mailing list.
but the other day when i started down this road i had MTA settings configured there and it was still sending the confirmation email out as a relay through my smtp port 25. shouldn't it have then used my provided mta values?
This issue has not been updated for more than 1year