Estou apenas tentando executar o GNU Mailman3 com Postfix+Nginx+Postgres. Este é o mais recente GNU/Linux Debian estável, então acabei de apt-get
instalar mailman3-full
e fiz algumas alterações padrão nos arquivos de configuração. A parte do Nginx é boa, o SSL funciona bem, posso acessar o Postorius e o Hyperkitty do meu navegador da web. Mas ao tentar fazer login como administrador, estou recebendo o seguinte erro:
ERROR 2022-02-25 21:39:55,302 118475 django.request Internal Server Error: /accounts/login/
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 71, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/django/utils/decorators.py", line 45, in _wrapper
return bound_method(*args, **kwargs)
File "/usr/lib/python3/dist-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper
return view(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/allauth/account/views.py", line 146, in dispatch
return super(LoginView, self).dispatch(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/allauth/account/views.py", line 74, in dispatch
response = super(RedirectAuthenticatedUserMixin, self).dispatch(
File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 97, in dispatch
return handler(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/allauth/account/views.py", line 102, in post
response = self.form_valid(form)
File "/usr/lib/python3/dist-packages/allauth/account/views.py", line 159, in form_valid
return form.login(self.request, redirect_url=success_url)
File "/usr/lib/python3/dist-packages/allauth/account/forms.py", line 195, in login
ret = perform_login(
File "/usr/lib/python3/dist-packages/allauth/account/utils.py", line 175, in perform_login
send_email_confirmation(request, user, signup=signup, email=email)
File "/usr/lib/python3/dist-packages/allauth/account/utils.py", line 346, in send_email_confirmation
email_address.send_confirmation(request, signup=signup)
File "/usr/lib/python3/dist-packages/allauth/account/models.py", line 62, in send_confirmation
confirmation.send(request, signup=signup)
File "/usr/lib/python3/dist-packages/allauth/account/models.py", line 169, in send
get_adapter(request).send_confirmation_mail(request, self, signup)
File "/usr/lib/python3/dist-packages/allauth/account/adapter.py", line 464, in send_confirmation_mail
self.send_mail(email_template, emailconfirmation.email_address.email, ctx)
File "/usr/lib/python3/dist-packages/allauth/account/adapter.py", line 136, in send_mail
msg.send()
File "/usr/lib/python3/dist-packages/django/core/mail/message.py", line 306, in send
return self.get_connection(fail_silently).send_messages([self])
File "/usr/lib/python3/dist-packages/django/core/mail/backends/smtp.py", line 110, in send_messages
sent = self._send(message)
File "/usr/lib/python3/dist-packages/django/core/mail/backends/smtp.py", line 126, in _send
self.connection.sendmail(from_email, recipients, message.as_bytes(linesep='\r\n'))
File "/usr/lib/python3.9/smtplib.py", line 885, in sendmail
raise SMTPRecipientsRefused(senderrs)
smtplib.SMTPRecipientsRefused: {'root@localhost': (550, b'5.1.1 <root@localhost>: Recipient address rejected: User unknown in local recipient table')}
[pid: 118475|app: 0|req: 35/35] 2001:xxxx:xxxx:xxxx:xxxx:xxxx () {62 vars in 1133 bytes} [Fri Feb 25 21:39:55 2022] POST /accounts/login/ => generated 1156 bytes in 173 msecs (HTTP/1.1 500) 5 headers in 182 bytes (1 switches on core 1)
E no arquivo de log do Postfix:
Feb 25 21:39:55 vps-xxx postfix/smtpd[122820]: connect from localhost[::1]
Feb 25 21:39:55 vps-xxx postfix/smtpd[122820]: NOQUEUE: reject: RCPT from localhost[::1]: 550 5.1.1 <root@localhost>: Recipient address rejected: User unknown in local recipient table; from=<root@MYDOMAIN> to=<root@localhost> proto=ESMTP helo=<vps-xxx>
Feb 25 21:39:55 vps-xxx postfix/smtpd[122820]: disconnect from localhost[::1] ehlo=1 mail=1 rcpt=0/1 rset=1 quit=1 commands=4/5
Eu pensei: talvez minha tabela de destinatários local esteja de alguma forma quebrada? Mas eu posso enviar e-mail usando mail
:
$ mail -r 'root@localhost' -s 'just a test' 'root@localhost'
e funciona muito bem:
Feb 25 21:44:12 vps-xxx postfix/pickup[124104]: 9ABB540516: uid=1000 from=<root@localhost>
Feb 25 21:44:12 vps-xxx postfix/cleanup[124763]: 9ABB540516: message-id=<20220225214412.9ABB540516@MYDOMAIN>
Feb 25 21:44:12 vps-xxx opendkim[14611]: 9ABB540516: no signing table match for 'root@localhost'
Feb 25 21:44:12 vps-xxx opendkim[14611]: 9ABB540516: no signature data
Feb 25 21:44:12 vps-xxx postfix/qmgr[118558]: 9ABB540516: from=<root@localhost>, size=412, nrcpt=1 (queue active)
Feb 25 21:44:12 vps-xxx postfix/local[124765]: 9ABB540516: to=<root@localhost>, relay=local, delay=0.04, delays=0.03/0.01/0/0, dsn=2.0.0, status=sent (delivered to maildir)
Feb 25 21:44:12 vps-xxx postfix/qmgr[118558]: 9ABB540516: removed
Eu posso ver isso no root
Maildir de fato.
Alguma ideia?
Se bem me lembro, root@localhost
é o endereço de e-mail que atribuí ao admin
usuário do Postorius durante o dpkg-reconfigure
. Eu nunca usei o GNU Mailman3 antes, mas acho que esse e-mail deve ser uma notificação de login ou algo assim (você também pode adivinhar pelo send_email_confirmation
nome da função). Se eu digitar a senha errada, está tudo bem (apenas recebo um belo erro na interface do usuário da web), então isso só acontece se a senha estiver correta.
Obrigado!