
$Id: FAQ.Yahoo.txt,v 1.20 2024/09/04 09:42:35 gilles Exp gilles $

This document is also available online at
https://imapsync.lamiral.info/FAQ.d/
https://imapsync.lamiral.info/FAQ.d/FAQ.Yahoo.txt


=======================================================================
                     Imapsync tips for Yahoo.
=======================================================================

Questions answered in this FAQ are:

Q. Synchronizing from Yahoo to XXX

Q. Synchronizing from XXX to Yahoo

Q. Why use Yahoo?

Q. The imapsync run now always fails with the errors like:
   "could not append ... NO. [SERVERBUG] APPEND Server error - Please try again later"

Q. Yahoo via imap.mail.yahoo.com can contain no more that 10_000 
   messages per folder. How can I deal with that restriction?

Q. Yahoo via export.imap.mail.yahoo.com can contain no more that 100_000 
   messages per folder. How can I deal with that restriction?


Now the questions again with their answers.

=======================================================================
Q. Synchronizing from Yahoo to XXX

A. Use --host1 imap.mail.yahoo.com 

Example:

  ./imapsync \
    --host1 imap.mail.yahoo.com \
    --user1 Billy@yahoo.com \
    --password1 billysecreta \
    --host2 XXX \
    --user2 Billy@other.com \
    --password2 billysecretb


You also need to go to Yahoo, security and enable 
"Allow less secure apps to login", 
otherwise the login will not work. 

To enable less secure apps to login:
  * Login to the Yahoo mail account,
  * click on the account name or the avatar and select "Account Info",
  * click on "Account security",
  * turn off "Two steps verification"
  * turn on "Allow apps that use less secure authentication".

Thanks to Eugen Mayer for this last point.

Another solution:

  * Login to the Yahoo mail account,
  * click on the account name or the avatar and select "Account Info",
  * click on "Account security",
  * Turn on "Two-step verification"
  * Click on "Manage app passwords" and 
    generate a specific password for imapsync, 
	choose "Other app" at the bottom and type imapsync
    since it is not in the predefined apps.
  * Use this password with imapsync.

=======================================================================
Q. Synchronizing from XXX to Yahoo

A. Example:

On Linux:
  ./imapsync \
    --host1 XXX \
    --user1 Billy@other.com \
    --password1 billysecreta \
    --host2 imap.mail.yahoo.com \
    --user2 Billy@yahoo.com \
    --password2 billysecretb \
    --regexmess 's{(?<![\n])\z}{\r\n}gxms'

On Windows:
  imapsync.exe \
    --host1 XXX \
    --user1 Billy@other.com \
    --password1 billysecreta \
    --host2 imap.mail.yahoo.com \
    --user2 Billy@yahoo.com \
    --password2 billysecretb \
    --regexmess "s{(?<![\n])\z}{\r\n}gxms"


You wonder why there is this ugly regex, what it does and where does it 
come from?

It's there to get rid of the errors 
"BAD [CLIENTBUG] Additional arguments found after last expected argument"
when copying some messages to Yahoo.
It adds a final \r\n on a message if a final \r\n is missing.
See https://github.com/imapsync/imapsync/issues/209

https://imapsync.lamiral.info/README
...
 --regexmess    reg  : Apply the whole regex to each message before transfer.
                       Example: 's/\000/ /g' # to replace null by space.
 --regexmess    reg  : and this one, etc.

=======================================================================
Q. Why use Yahoo?

A. Yahoo is a good candidate to archive emails.
   Yahoo free storage limits are:
   * 1 Tera bytes.
   * 100_000 messages per folder.
   * 25 Mega bytes maximum for a single message.

=======================================================================
Q. The imapsync run now always fails with the errors like:
   "could not append ... NO. [SERVERBUG] APPEND Server error - Please try again later"

A. The Yahoo imap server replies: 
   "NO. [SERVERBUG] APPEND Server error - Please try again later"
   because, likely, the folder has now reached 10k emails.
   See the Q/A below to fix it.

=======================================================================
Q. Yahoo via imap.mail.yahoo.com can contain no more that 10_000 
   messages per folder. How can I deal with that restriction?

A. Use the imap server export.imap.mail.yahoo.com and the limit
   becomes 100_000 messages per folder. See below for the 
   100_000 limit.

Thanks to Joelle Stickney for this input.

=======================================================================
Q. Yahoo via export.imap.mail.yahoo.com can contain no more that 100_000 
   messages per folder. How can I deal with that restriction?

A1. Go with the script
    https://imapsync.lamiral.info/examples/archive_per_year.sh
    It will archive your mailbox per year, hoping there will be
    less than 100_000 messages in each folder.
    If not, go with
    https://imapsync.lamiral.info/examples/archive_per_month.sh

=======================================================================
=======================================================================
