- Add TLS configuration to accept self-signed certificates - Disable TLS/STARTTLS for port 25 when SMTP_SECURE=false - Add ignoreTLS option for Exchange servers on port 25 - Update .env.example with Exchange-specific configuration - Create comprehensive EMAIL_CONFIGURATION.md guide - Support both Exchange internal servers and modern SMTP servers This fixes the "self-signed certificate" error when connecting to Microsoft Exchange servers on port 25 without TLS. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
4.4 KiB
Email Configuration Guide for MinIO WebUI
Overview
MinIO WebUI supports email notifications for storage reports. This guide explains how to configure email settings, especially for Microsoft Exchange servers.
Environment Variables
Configure these variables in your .env file:
# SMTP Server Configuration
SMTP_HOST=your-exchange-server.com
SMTP_PORT=25
SMTP_SECURE=false
SMTP_USER=your-username
SMTP_PASS=your-password
# 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)
Most common for internal Exchange servers:
SMTP_PORT=25
SMTP_SECURE=false
Port 587 (STARTTLS)
For servers that support encryption:
SMTP_PORT=587
SMTP_SECURE=false # STARTTLS will upgrade the connection
Port 465 (SSL/TLS)
For servers requiring SSL from the start:
SMTP_PORT=465
SMTP_SECURE=true
Common Issues and Solutions
Self-Signed Certificate Error
Error: self-signed certificate
Solution: The application is configured to accept self-signed certificates. If you still see this error:
- Ensure
SMTP_SECURE=falsefor port 25 - Restart the backend service
- Check that your Exchange server allows SMTP connections on port 25
Connection Refused
Error: connect ECONNREFUSED
Solution:
- Verify the SMTP_HOST is correct
- Check if port 25 is open on the Exchange server
- Ensure no firewall is blocking the connection
Authentication Failed
Error: Invalid login
Solution:
- Verify SMTP_USER and SMTP_PASS are correct
- For Exchange, use either:
- Username only:
username - Domain\Username:
DOMAIN\\username - Email format:
username@domain.com
- Username only:
Exchange Server Specific Settings
For Microsoft Exchange servers, the configuration automatically:
- Accepts self-signed certificates when
SMTP_SECURE=false - Disables TLS for port 25 when
SMTP_SECURE=false - Handles STARTTLS negotiation for port 587
Testing Email Configuration
- Set up your environment variables
- Restart the backend:
docker-compose restart backend - Check the logs:
docker logs minio-webui-backend -f - Look for either:
- ✅
Email transporter ready - ❌
Email transporter verification failed
- ✅
Manual Test
To manually trigger a test email:
- Log into the MinIO WebUI
- Navigate to Reports
- Click "E-Mail senden" (Send Email)
Report Schedule Format
The REPORT_SCHEDULE uses cron format:
┌────────────── second (optional)
│ ┌──────────── minute
│ │ ┌────────── hour
│ │ │ ┌──────── day of month
│ │ │ │ ┌────── month
│ │ │ │ │ ┌──── day of week
│ │ │ │ │ │
* * * * * *
Examples:
0 0 * * 1- Every Monday at midnight0 8 * * *- Every day at 8 AM0 0 1 * *- First day of every month at midnight0 */6 * * *- Every 6 hours
Troubleshooting
Enable Debug Logging
Add to your .env:
LOG_LEVEL=debug
Check Email Service Status
# View recent logs
docker logs minio-webui-backend --tail 50
# Watch logs in real-time
docker logs minio-webui-backend -f
Common Exchange Configurations
Internal Exchange (No Auth):
SMTP_HOST=exchange.internal.company.com
SMTP_PORT=25
SMTP_SECURE=false
SMTP_USER=
SMTP_PASS=
Exchange with Auth:
SMTP_HOST=mail.company.com
SMTP_PORT=25
SMTP_SECURE=false
SMTP_USER=DOMAIN\\username
SMTP_PASS=yourpassword
Office 365:
SMTP_HOST=smtp.office365.com
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USER=user@company.com
SMTP_PASS=yourpassword
Security Considerations
- Store credentials securely in
.envfile - Never commit
.envto version control - Use application-specific passwords when available
- Consider using OAuth2 for modern email services
- Restrict SMTP relay access on Exchange server
Need Help?
If email configuration continues to fail:
- Verify with your IT team that SMTP is enabled on the Exchange server
- Check if any additional authentication (like NTLM) is required
- Test connectivity:
telnet your-exchange-server 25 - Review Exchange server logs for connection attempts