\!DOCTYPE html>
This guide covers the most common issues users encounter with Mail-Rulez and their solutions.
Symptoms:
Common Causes & Solutions:
Port Conflict
# Check if port 5001 is in use
netstat -tlnp | grep 5001
# Solution: Change port in docker-compose.yml
ports:
- "5002:5001" # Use different external port
Missing Environment Variables
# Check container logs
docker logs mail-rulez
# Solution: Ensure all required env vars are set
docker run -e FLASK_ENV=production \
-e MASTER_KEY=$(openssl rand -hex 32) \
mail-rulez:latest
Volume Permission Issues
# Fix permissions
docker exec mail-rulez chown -R app:app /app/data
Symptoms:
Solution:
# Test health endpoint manually
docker exec mail-rulez curl -f http://localhost:5001/health
# Adjust health check timing in docker-compose.yml
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5001/health"]
interval: 60s # Increase interval
timeout: 10s # Increase timeout
retries: 5 # More retries
Symptoms:
Common Solutions:
Gmail/Google Workspace
Outlook/Office 365
Generic IMAP Issues
# Verify settings manually
Server: imap.gmail.com
Port: 993
Security: SSL/TLS
Username: full email address
Password: app-specific password
Symptoms:
Solutions:
# For self-signed certificates (testing only)
# Add to account configuration:
"verify_ssl": false
# For corporate certificates
# Mount certificate bundle:
docker run -v /path/to/ca-bundle.crt:/etc/ssl/certs/ca-bundle.crt ...
Symptoms:
Troubleshooting Steps:
Check Service Status
Review Logs
# Check processing logs
docker exec mail-rulez tail -f /app/logs/email_processing.log
# Look for errors
grep ERROR /app/logs/email_processing.log
Verify Rules
Symptoms:
Solution:
# Clear processing cache
docker exec mail-rulez rm -f /app/data/processing_cache.db
# Restart processing service
# Navigate to Services → Email Processor → Restart
Symptoms:
Solutions:
Adjust Batch Size
# In Services configuration
"batch_size": 50 # Reduce from default 100
"processing_interval": 300 # Increase interval (seconds)
Optimize Rules
Resource Limits
# docker-compose.yml
services:
mail-rulez:
deploy:
resources:
limits:
cpus: '2.0'
memory: 2G
Symptoms:
Solution:
# Enable automatic restart
docker update --restart=always mail-rulez
# Monitor memory usage
docker stats mail-rulez
# Set memory limits with swap
--memory=1g --memory-swap=2g
Symptoms:
Common Causes:
Scheduler Not Running
Policy Configuration
# Verify policy settings
- Check retention days > 0
- Ensure folders are correctly specified
- Verify policies are active
IMAP Permissions
Steps to Recover:
Symptoms:
Solutions:
Bridge Network Issues
# Use host networking (development only)
docker run --network=host ...
# Or create custom network
docker network create mail-rulez-net
docker run --network=mail-rulez-net ...
Firewall Rules
# Allow Docker through firewall
sudo ufw allow 5001/tcp
Symptoms:
Solutions:
# Check disk usage
docker system df
# Clean up unused resources
docker system prune -a
# Move Docker root directory
# Edit /etc/docker/daemon.json
{
"data-root": "/new/docker/root"
}
If your issue isn't covered here:
Check Logs
/app/logs/
docker logs mail-rulez
Gather Information
Contact Support