Yahoo Mail Setup
Configure Mailpilot to work with Yahoo Mail accounts.
Prerequisites
- Yahoo Mail account
- IMAP access (enabled by default)
- App password (required - Yahoo disabled regular password authentication)
Step 1: Generate App Password
You cannot use your regular Yahoo password! Yahoo requires app-specific passwords for IMAP access.
- Sign in to your Yahoo Account Security page
- Click Generate app password or Manage app passwords
- Select Other App from the dropdown
- Enter a custom name:
MailpilotorEmail Automation - Click Generate
- Copy the 16-character password displayed (you won't see it again)
The app password looks like: abcd efgh ijkl mnop (remove spaces when using)
Step 2: Verify IMAP is Enabled
IMAP is usually enabled by default in Yahoo Mail. To verify:
- Sign in to Yahoo Mail
- Click ⚙️ Settings → More Settings
- Go to Mailboxes
- Ensure IMAP access is enabled
Step 3: Configure Mailpilot
Add Yahoo Mail to your config.yaml:
accounts:
- name: yahoo
imap:
host: imap.mail.yahoo.com
port: 993
username: ${YAHOO_USER} # your.email@yahoo.com
password: ${YAHOO_APP_PASSWORD} # 16-character app password
tls: true
folders:
- name: INBOX
llm_provider: openai
prompt: |
Classify this email...Step 4: Set Environment Variables
Set your Yahoo credentials:
export YAHOO_USER="your.email@yahoo.com"
export YAHOO_APP_PASSWORD="abcdefghijklmnop" # No spaces!Or use a .env file:
YAHOO_USER=your.email@yahoo.com
YAHOO_APP_PASSWORD=abcdefghijklmnopRemove spaces from the app password when setting the environment variable.
Step 5: Test Connection
pnpm startCheck the dashboard at http://localhost:8080 for connection status.
IMAP Server Settings
| Setting | Value |
|---|---|
| IMAP Server | imap.mail.yahoo.com |
| Port | 993 |
| Encryption | TLS/SSL |
| Username | Your full Yahoo email address |
| Password | App-specific password (not regular password) |
Yahoo Mail Folder Names
Yahoo uses standard IMAP folder names:
| IMAP Folder Name | Yahoo Mail Folder |
|---|---|
INBOX | Inbox |
Sent | Sent |
Drafts | Draft |
Trash | Trash |
Bulk Mail | Spam |
Archive | Archive |
Multiple Yahoo Accounts
Process multiple Yahoo accounts:
accounts:
- name: personal
imap:
host: imap.mail.yahoo.com
username: ${YAHOO_PERSONAL_USER}
password: ${YAHOO_PERSONAL_APP_PASSWORD}
- name: work
imap:
host: imap.mail.yahoo.com
username: ${YAHOO_WORK_USER}
password: ${YAHOO_WORK_APP_PASSWORD}Set separate environment variables for each account.
Troubleshooting
"Username and password not accepted"
Causes:
- Using regular Yahoo password instead of app password
- App password has spaces in it
- Incorrect username format
Solutions:
- Generate a new app password
- Use the 16-character app password without spaces
- Ensure username is your full email address (e.g.,
you@yahoo.com) - Update
YAHOO_APP_PASSWORDenvironment variable
"IMAP access is disabled"
Cause: IMAP is disabled in Yahoo Mail settings.
Solution:
- Go to Yahoo Mail Settings → Mailboxes
- Enable IMAP access
- Save changes and restart Mailpilot
"Too many login attempts"
Cause: Yahoo has temporarily blocked access due to multiple failed login attempts.
Solution:
- Wait 10-15 minutes before retrying
- Verify your app password is correct
- Check for security alerts in your Yahoo account
- Generate a fresh app password if needed
Connection timeout
Cause: Firewall blocking port 993 or Yahoo server issues.
Solution:
imap:
host: imap.mail.yahoo.com
port: 993
timeout: 60000 # Increase timeout to 60 seconds
keepalive: true"Certificate verify failed"
Cause: SSL/TLS certificate validation issue.
Solution: This is rare with Yahoo. If it occurs:
imap:
host: imap.mail.yahoo.com
port: 993
tls: true
tls_options:
minVersion: 'TLSv1.2'"Please try again later"
Cause: Yahoo is experiencing service issues or rate-limiting.
Solution:
- Check Yahoo Mail Status for outages
- Reduce polling frequency in config
- Wait a few minutes and retry
Yahoo-Specific Considerations
Rate Limits
Yahoo applies rate limits to IMAP connections:
- Connection limit: ~10-15 concurrent connections
- Throttling: Aggressive polling may trigger temporary blocks
To avoid issues:
polling_interval: 120s # Poll every 2 minutes
accounts:
- name: yahoo
imap:
host: imap.mail.yahoo.com
keepalive: true
timeout: 60000App Password Management
- Revoke unused app passwords regularly in Account Security
- Generate separate app passwords for different applications
- Never share app passwords or commit them to version control
Yahoo Mail Plus
If you have Yahoo Mail Plus (paid account):
- IMAP access works the same way
- No additional configuration needed
- Same app password requirements apply
Security Best Practices
- Always use app passwords - never your main Yahoo password
- Enable 2-Step Verification on your Yahoo account
- Monitor sign-in activity in Account Security
- Rotate app passwords periodically (every 3-6 months)
- Revoke unused app passwords when you stop using an application
- Use environment variables for credentials
- Never commit passwords to version control
Advanced Configuration
Custom Folder Processing
Process specific Yahoo folders with different settings:
accounts:
- name: yahoo
imap:
host: imap.mail.yahoo.com
username: ${YAHOO_USER}
password: ${YAHOO_APP_PASSWORD}
folders:
- name: INBOX
llm_provider: openai
model: gpt-4o-mini
prompt: |
Classify inbox emails...
- name: Bulk Mail
llm_provider: ollama # Use local model for spam folder
model: llama3.2
prompt: |
Review spam classifications...Connection Pooling
For high-volume processing:
imap:
host: imap.mail.yahoo.com
port: 993
maxConnections: 5 # Max concurrent connections
keepalive: true # Keep connections alive
timeout: 60000 # 60 second timeoutTesting IMAP Connection Manually
Verify IMAP settings with openssl:
openssl s_client -connect imap.mail.yahoo.com:993 -crlfYou should see:
* OK IMAP4rev1 Server readyTest authentication (replace with your credentials):
a1 LOGIN your.email@yahoo.com your-app-passwordSuccessful login shows:
a1 OK LOGIN completed