Source: https://cli.nylas.com/guides/list-yahoo-emails

# List Yahoo Mail from Terminal (No App Passwords)

Yahoo still serves around 225 million monthly active users in 2026, plus tens of millions more on AT&T, Verizon, SBCGlobal, and BellSouth addresses that route through Yahoo's backend. This guide shows how to list, search, and read those mailboxes from the terminal using a single OAuth2 flow rather than app-specific passwords and manual IMAP configuration.

Written by [Pouya Sanooei](https://cli.nylas.com/authors/pouya-sanooei) Software Engineer

Reviewed by [Caleb Geene](https://cli.nylas.com/authors/caleb-geene)

Updated May 2, 2026

## Yahoo Mail in 2026: 225 million users, tighter security

According to Statista's 2024 email client market share report, Yahoo Mail still serves 225 million monthly active users — making it the third-largest consumer email provider behind Gmail and Outlook. That's a lot of inboxes that scripts, cron jobs, and AI agents need to reach.

Yet accessing those inboxes programmatically got harder after the [2013-2014 breaches that ultimately exposed all 3 billion Yahoo accounts](https://www.sec.gov/news/press-release/2018-71). Yahoo responded by disabling plain IMAP passwords entirely in 2020, requiring app-specific passwords generated through [Yahoo's account security page](https://login.yahoo.com/account/security). There is no official CLI or REST API for consumer Yahoo Mail accounts, and tools like `fetchmail` or `mutt` still depend on that app-password workflow.

## 1. Install the Nylas CLI

```bash
brew install nylas/nylas-cli/nylas
```

See the [getting started guide](https://cli.nylas.com/guides/getting-started) for alternative install methods (Go, shell script, PowerShell).

## 2. Connect your Yahoo Mail account

Head to [dashboard-v3.nylas.com](https://dashboard-v3.nylas.com/), create an application, and connect your Yahoo Mail account. Then grab your API key:

```bash
nylas auth config
# Paste your API key when prompted

# Verify the connection
nylas auth whoami
# => Authenticated as you@yahoo.com (Yahoo)
```

## 3. List your emails

Once authenticated, listing works the same regardless of provider:

```bash
nylas email list
nylas email list --limit 10
nylas email list --unread
```

## 4. Search and filter

Yahoo's web search is decent, but it can't be scripted. From the terminal:

```bash
# Search by keyword
nylas email search "receipt" --limit 5

# Search by sender — useful for Yahoo notification noise
nylas email search "from:notifications@yahoo.com"

# Date range
nylas email search "after:2026-01-01 before:2026-02-01"
```

## 5. Read a specific email

```bash
nylas email read msg_abc123
nylas email read msg_abc123 --mime
```

## 6. JSON output for scripting

Pipe `--json` output into `jq` for scripting or AI agent consumption:

```bash
# Count unread Yahoo emails
nylas email list --unread --json | jq length

# Extract subjects and senders
nylas email list --limit 5 --json \
  | jq -r '.[] | "\(.from[0].email): \(.subject)"'
```

## 7. Work with Yahoo Mail folders

Yahoo Mail uses "Bulk Mail" where Gmail says "Spam" and Outlook says "Junk Email." If you're writing scripts that work across providers, this naming difference matters:

```bash
# Yahoo's spam folder is called "Bulk Mail"
nylas email list --folder "Bulk Mail" --limit 5

# List all folders to see Yahoo's naming conventions
nylas email folders list

# Other Yahoo default folders
nylas email list --folder "Draft"
nylas email list --folder "Sent"
```

Custom folders created in Yahoo's web UI appear here too. The CLI normalizes folder IDs across providers, so scripts that reference folder IDs (not display names) work without provider-specific branches.

## 8. Yahoo security timeline and what it means for CLI access

Yahoo's security posture changed dramatically after two breaches. In 2013, attackers compromised all 3 billion Yahoo accounts — the largest data breach in history at the time. A separate 2014 breach exposed another 500 million accounts. According to Yahoo's 2017 SEC filing, the company wasn't fully aware of the 2013 breach scope until Verizon's acquisition due diligence in 2016.

The fallout reshaped how Yahoo handles third-party access:

| Year | Change | Impact on CLI/scripting |
| --- | --- | --- |
| 2016 | Mandatory 2FA rollout for high-risk accounts | Plain IMAP login blocked for 2FA users |
| 2020 | Yahoo disabled plain IMAP passwords entirely | All IMAP users must generate app-specific passwords |
| 2023 | App password UI buried under Account Security > Other ways to sign in | Harder to find, more users locked out |

The CLI authenticates against Yahoo's OAuth2 endpoint, the same path Yahoo's own mobile app uses, so the "app password" surface goes away. No `imap.mail.yahoo.com:993` configuration and no "suspicious login" blocks fired by the IMAP-with-app-password path. [Yahoo's account-security help center](https://help.yahoo.com/kb/SLN35531.html) documents the OAuth2-only stance for third-party clients.

## 9. Yahoo Mail variants and carrier accounts

Yahoo powers email for several ISP and carrier brands. AT&T migrated its email infrastructure to Yahoo in 2017, so `@att.net`, `@sbcglobal.net`, and `@bellsouth.net` addresses all route through Yahoo's backend. The same applies to legacy Verizon accounts. The CLI handles all of them:

- **Yahoo Mail** — `@yahoo.com`, `@ymail.com`, `@rocketmail.com`
- **AT&T Yahoo Mail** — `@att.net`, `@sbcglobal.net`, `@bellsouth.net`, `@pacbell.net`
- **Verizon Yahoo Mail** — legacy `@verizon.net` accounts migrated to Yahoo
- **Yahoo Small Business** — custom domain email hosted on Yahoo

All of these authenticate through the same OAuth2 flow. No special configuration needed.

**Important exception:** Yahoo Japan (`@ymail.ne.jp`, `@yahoo.co.jp`) is a separate company with a separate auth system. It is not supported through the same OAuth flow and requires a different grant configuration.

## Next steps

- [Send Yahoo Mail from the CLI](https://cli.nylas.com/guides/send-yahoo-email-cli) — send, schedule, and attach files from your Yahoo account
- [Manage Yahoo calendar from the CLI](https://cli.nylas.com/guides/manage-yahoo-calendar-cli) — create events and check availability
- [Send email from the terminal](https://cli.nylas.com/guides/send-email-from-terminal)
- [List Gmail emails](https://cli.nylas.com/guides/list-gmail-emails) — same workflow for Google
- [List Outlook emails](https://cli.nylas.com/guides/list-outlook-emails) — same workflow for Microsoft 365
- [List iCloud Mail emails](https://cli.nylas.com/guides/list-icloud-emails) — same workflow for Apple
- [List IMAP emails](https://cli.nylas.com/guides/list-imap-emails) — works with Fastmail, Zoho, and more
- [List Exchange emails](https://cli.nylas.com/guides/list-exchange-emails) — same workflow for Exchange
- [Give AI agents email access via MCP](https://cli.nylas.com/guides/ai-agent-email-mcp)
- [Full command reference](https://cli.nylas.com/docs/commands)
