fix: Support Exchange servers without authentication

- Make email authentication optional in transporter config
- Only add auth object if both username and password are provided
- Update initialization to only require SMTP_HOST
- Add logging to show whether auth is enabled
- Update documentation with no-auth configuration examples
- Fix "Unrecognized authentication type" error for open relays

Exchange servers configured as internal relays often don't
require authentication. This fix allows using them by leaving
SMTP_USER and SMTP_PASS empty in the .env file.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-07-24 08:58:45 +02:00
parent f0f0f98208
commit b4fc144cd3
2 changed files with 41 additions and 11 deletions
+24 -3
View File
@@ -8,6 +8,7 @@ MinIO WebUI supports email notifications for storage reports. This guide explain
Configure these variables in your `.env` file:
### With Authentication (Most servers)
```bash
# SMTP Server Configuration
SMTP_HOST=your-exchange-server.com
@@ -24,6 +25,24 @@ REPORT_RECIPIENT=admin@yourdomain.com
REPORT_SCHEDULE=0 0 * * 1 # Every Monday at midnight
```
### Without Authentication (Open Relay/Internal Exchange)
```bash
# SMTP Server Configuration
SMTP_HOST=exchange.internal.company.com
SMTP_PORT=25
SMTP_SECURE=false
# Leave SMTP_USER and SMTP_PASS empty or don't include them
SMTP_USER=
SMTP_PASS=
# Email Settings
REPORT_SENDER=minio-reports@yourdomain.com
REPORT_RECIPIENT=admin@yourdomain.com
# Report Schedule (cron format)
REPORT_SCHEDULE=0 0 * * 1 # Every Monday at midnight
```
## Port and Security Settings
### Port 25 (No TLS/SSL)
@@ -70,11 +89,13 @@ SMTP_SECURE=true
### Authentication Failed
**Error**: `Invalid login`
**Error**: `Invalid login` or `Unrecognized authentication type`
**Solution**:
1. Verify SMTP_USER and SMTP_PASS are correct
2. For Exchange, use either:
1. If your Exchange server doesn't require authentication (internal relay):
- Leave `SMTP_USER` and `SMTP_PASS` empty in your .env file
- Or remove these variables entirely
2. If authentication is required, verify credentials:
- Username only: `username`
- Domain\Username: `DOMAIN\\username`
- Email format: `username@domain.com`