janeczku / calibre-web

:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
GNU General Public License v3.0
12.03k stars 1.28k forks source link

[Bug] SMTP without auth isn't supported #2949

Open jacoknapp opened 6 months ago

jacoknapp commented 6 months ago

Describe the bug/problem When trying to set up an smtp mail server without authentication, calibre-web will error out and still look the SMTP AUTH extension. This shouldn't happen if there isn't credentials set in the SMTP Login and SMTP Password sections

To Reproduce Create local smtp relay, don't enable auth or encryption Set up the SMTP settings inside of the server Save and send test email It will fail

Logfile [2023-12-12 00:29:11,138] ERROR {cps.tasks.mail:199} SMTP AUTH extension not supported by server.

Expected behavior When no data is set for the username and password for the SMTP Server, it shouldn't still be looking for the SMTP AUTH extension. Or have an option to disable looking for the extension

Environment (please complete the following information):

Additional context Add any other context about the problem here. [e.g. access via reverse proxy, database background sync, special database location]

OzzieIsaacs commented 6 months ago

It's correct: SMTP without auth isn't supported

Nick2253 commented 1 month ago

I've run into the same problem. We're using Calibre-web to make a bunch of training material available, and the environment that we're running it in requires that all email go through the edge SMTP relay, which does not have authentication.

Presumably this problem exists in the cps/tasks/mail.py file, but I can't quite figure out what needs to be changed to fix it. Any pointers would be helpful.

Right now, my work-around is to run a separate SMTP relay that accepts authentication, and have that server relay to the edge SMTP relay, but that's a lot of mess for what is hopefully a simple fix.