From MozillaZine Knowledge Base
Yahoo! provides a free POP and SMTP server if you have a webmail account. This used to require you to have a webmail account in a non-USA yahoo domain (for example de.yahoo.com). A common workaround to get POP support if you lived in the USA was to change "Regional Site and Language" in Yahoo Webmail's account settings to Yahoo Asia, and then enable POP access in the POP & Forwarding section in Webmail options (you would still keep your existing email address and it doesn't change what language you use). However, that restriction has been removed and all of the features that used to be part of Yahoo’s Mail Plus product (disposable email addresses, POP email and mail forwarding) are now free. They have also increased the storage limit to 1TB.
Yahoo also has a free IMAP and SMTP server that officially only supports smartphones and Zimbra email clients. However, the Thunderbird account wizard supports creating a Yahoo IMAP account using the "Yahoo for Mobile" IMAP settings.
Create a new account by pressing the Add Mail Account button in Tools -> Account Settings -> Account Actions. It will default to creating a POP account. If you want an IMAP account select the IMAP radio button. If your ISP provides you a Yahoo account it may use mail servers with a different domain and use the full email address as the username. Otherwise configure it as follows (if you're not relying upon the account wizard to do this for you):
You used to be able to use the mail server for your domain (such as pop.mail.yahoo.de) but that broke. A email address in a different domain will still work using pop.mail.yahoo.com.
Its also possible to use port 587 with secure connection set to none.
If you are using an old version of Thunderbird and want an IMAP account you need to press the Manual Config button while creating the account so that you can select IMAP and change the mail server. In recent versions all you need to do is select the IMAP radio button.
IMAP works differently
IMAP accounts let you access all of the webmail folders. It treats folders on the mail server (remote folders) as if they were local folders, so that you can copy/move messages to/from them.
It has a client-server view of the world rather than a download-centric one. While you can use the folders as if they are local folders it actually only downloads the headers (not the messages) to the mail folder on the hard disk. That means whenever you open a message it fetches it again from the mail server, so its a poor choice if you have a slow Internet connection. Thunderbird 3.0 added support for offline copies of the folders. This is enabled by default in Tools -> Account Settings -> Yahoo -> Synchronization & Storage. They are a useful way to backup the folders or to read messages when working offline but they're ignored when you're working online. There is also a optional IMAP cache but it mainly just caches remote images, not messages.
IMAP accounts support hiding folders you don't want to see by not subscribing them. Thunderbird may automatically subscribe the inbox, sent, and bulk mail folders when it creates the Yahoo IMAP account. It will also automatically subscribe any new folder you create using Thunderbird. You can right click on the account name in the folder pane, select subscribe, and then choose from the list which folders to display. If you don't like the idea of using subscription to manage what folders you see, uncheck Tools -> Account Settings -> Yahoo -> Server Settings -> Advanced -> "Show only subscribed folders".
The POP3 email server (plus.pop.mail.yahoo.com) does not support UIDL or XTND or XLST
The Yahoo POP server seems to have periodic problems where it returns a "The POP3 email server (plus.pop.mail.yahoo.com) does not support UIDL or XTND or XLST, which are required to implement the "Leave on Server," "Maximum Message Size," or "Fetch Headers Only" options. To download your mail, turn off these options in the Server Settings for your mail server in the account settings window." error message. This problem occurs with both plus.pop.mail.yahoo.com and pop.mail.yahoo.com.
When this occurs you can't download new messages. Sometimes this can be worked around by exiting and restarting Thunderbird. Other times you need to wait until Yahoo fixes the problem with the server (usually takes only a day).  
Don't uncheck the "leave messages on server" checkbox as that will download all of the messages on the server (old and new) and delete the messages stored on the mail server. 
Can not subscribe folders
Check if Tools -> Account Settings -> Server Settings -> Advanced -> "IMAP Server directory" is set to [Gmail]. That will prevent Thunderbird from discovering your remote folders, even if "allow server to override these namespaces" is also checked. Delete [Gmail] and press the OK button.
Temporary problems (fixed) with Yahoo mail server: