Skip to content

Error sending mail with Authelia - RSET command fails #217

@ilmc888

Description

@ilmc888

I'm using the msmtp and msmtp-mta packages (Debian) to have a smtp relay for various services (forwarding to gmail).

This works well for various services, but with Authelia it fails with some errors (although the mail still comes through sometimes). I have found a relevant issue on the Authelia github that mentions the same SMTP RESET (RSET) command. According to the devs it is a problem with the mail agent, although it is part of the smtp specs.

At first glance, It seems to be exactly what I'm having: authelia/authelia#8457

Log msmtp daemon (msmtpd):

msmtpd[2270772]: connection from 192.168.1.5, active sessions 1 (max 16), auth_delay=no
msmtpd[2270772]: starting SMTP session
msmtpd[2270772]: pipe command is /usr/bin/msmtp -f abc@gmail.com --def@proton.me
msmtpd[2270772]: mail was piped successfully
msmtpd[2270772]: client did not send MAIL FROM or QUIT, session aborted

Log Authelia (container using podman):

authelia[3287524]: time="2026-02-03T22:44:50+01:00" level=error msg="Error occurred creating user session elevation One-Time Code challenge for user 'foo': error occurred sending the user the notification" error="notifier: smtp: failed to send message: sending SMTP RESET command: failed to send RSET to SMTP client: 500 Expected MAIL FROM:<addr> or QUIT, affected message ID: <4257.145514564256.DcGuaCsdvgsdfg@gmail.com>" method=POST path=/api/user/session/elevation remote_ip=192.168.1.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions