YoSucker M Curtis Napier This guide explains how to install and configure YoSucker, a Mail User Agent, designed to access your Yahoo Mail account through the http interface and download mails to your local machine. 1.0 2005-06-03 YoSucker
Introduction

This guide explains how to install and configure YoSucker, a Mail User Agent, designed to access your Yahoo Mail account through the http interface and download mails to your local machine in various formats.

How YoSucker works

YoSucker is a PERL script that accesses the http://mail.yahoo.com website and then performs the user actions of clicking buttons and filling in the User/Pass. This bypasses any file format changes that Yahoo may do. Other Yahoo mail apps access the Yahoo Mail Inbox directly, this method can and has been blocked by Yahoo in the past. YoSucker can retrieve mail to your local inbox in a variety of formats that will be covered below. YoSucker supports multiple accounts, procmail, localised Yahoo Mail sites, proxy connections and more.

Install

YoSucker depends on the following packages:

  • dev-lang/perl
  • dev-perl/TermReadKey
  • perl-core/Digest-MD5
  • dev-perl/IO-Socket-SSL
  • perl-core/MIME-Base64

YoSucker is ~masked. Look in the file /etc/make.conf if the variable ACCEPT_KEYWORDS contains ~ then please skip to the next section. If it does not then we need to add it to your package.keywords. Open the file /etc/portage/package.keywords and add the following line:

net-mail/yosucker ~x86
(change ~x86 to reflect your architecture)

All needed packages will be merged as a dependency automatically. Install YoSucker with the following command:

emerge yosucker
Configuration

YoSucker does not automatically create a default config file in your ~/ directory. Let's start by creating this file now. From a command line, logged in as the relevant user execute the following commands:

mkdir ~/.yosucker
touch ~/.yosucker/myyahoonick@yahoo.conf
(substitute the actual yahoo nick for myyahoonick)

nano -w ~/.yosucker/myemail\@myisp.conf
(Use whatever editor you prefer)
Please remember to strip the (comment) tags from your .conf file.

Copy and paste the following code AS IS into your .conf file. Do not change this line. Even if you access Yahoo Mail through a mail.yahoo.it or other language URL.

<Connect Info>
HOST=mail.yahoo.com
</Connect>

YoSucker encrypts your Yahoo password for storage. Use the included utility, EncPasswd to generate your encrypted password. Write it down for use in the following section.

EncPasswd

Copy and paste the following code into your .conf file. Read the (comments) and make any required changes.

<Login Details>
USERNAME=your_yahoo_id

PASSWD=01010101010101010101010101010101
(Insert the output from the EncPasswd utility)

SSL=1
(secure connection to login? 1 = Yes: 0 = No)

FORCE4=0
(Some accounts, rocketmail.com for example, have a 4 step login process
instead of the default 3 step process. Change to FORCE4=1 if YoSucker fails the 
login procedure)

RESPAWN=0
(Restore previous session. 1 = Yes; 0 = new login)
</Login>

<Fetch Mail>
BOX=Inbox,Sent,Draft
(comma seperated list of folders to fetch mail from. can include:
Inbox, Sent, Trash, Draft, Bulk or any of your YM folders)


DIGEST=Bulk
(Any folder listed under DIGEST will have only it's header info 
downloaded. Use a comma sperated list)

PIPE=0
(0 = write to a file like /var/mail/USER; 1 = PIPE output to an 
external program like procmail)

OUTFILE=/var/mail/your_linux_user_name
(change to "procmail" for procmail support and PIPE=1 above)

OUTFILE=cat > ~/.Maildir/new/`date +%s`.$$.yahoo
(For a maildir formatted file use this OUTPUT=)

UNCHANGED=0
(restore read/unread status? 0 = No; 1 = After fetching; 2 = Immediate.
 Immediate will slow down fetching)

LEAVE=1
(Leave mail on server? 0 = No; 1 = Yes. No will move all fetched mail 
to the Trash)

TRASH=0
(Empty Trash on Exit? 1 = Yes; 0 = No)

BULK=0
(Empty Bulk Folder on Exit? 1 = Yes; 0 = No)

QUOTA=80
(Warn me when my mailbox space reaches this percent full)

LIMIT=25
(How many mails to fetch, 0 for ALL)

SNEAKYSLEEP=1
(Yahoo will disable your account if you click to many links in a row in
 rapid succession. This option is how many seconds to wait betwen each click)


NOFROM=0
Remove the "From " beginning of message delimiter. Needed for some 
mail processing apps
</Fetch>

YoSucker encrypts your Proxy password for storage. Use the included utility, EncProxyPasswd to generate your encrypted password. Write it down for use in the following section.

EncProxyPasswd

Continure to cut and paste the followoing code into your .conf file and follow the (comments) to change the settings. If you do not use a Proxy you may leave the Proxy settings out of your template. the Other section is also optional. The default DEBUG level is normal and is the recommended setting. Change to 2 if experience problems to try and isolate the problem.

<Proxy Settings>
(Uncomment the following Proxy lines if you use a proxy. Otherwise 
leave the #)

# PROXY=proxy.domain.com
# PROXY_PORT=8080
# PROXY_USER=your_proxy_username

# PROXY_PASS=XXXXXXXXX
(Use the included EncProxyPasswd utility to encrpyt the password)


</Proxy>

<Other>

DEBUG=1
(quiet = 0, normal = 1, verbose = 2)
# Choose an action (i.e. a command to execute when new mail arrives
# ON_NEWMAIL="command attributes"
(External command to execute when new mail arrives. i.e. 
/usr/bin/mpg123 ~/sounds/newmail.wav

</Other>

Header Translation

Just as YoSucker does not create a default .conf for you it also does not copy header-translation to your ~/.yosucker directory that is necessary for YoSucker to work. Finding a permanent fix for this issue is beyond the scope of this Guide. To get around this bug simply copy this file to your ~./.yosucker directory like this:

cp /usr/share/doc/yosucker-71/conf/header-translation ~/.yosucker/
Multiple accounts

To configure YoSucker to fetch multiple Yahoo Mail accounts simply make a copy of the .conf file you just created and put it in your ~/.yosucker/ directory. Each user can have their own ~/.yosucker/ .conf files and can run YoSucker from the command line at any time.

You may create a cron job to run YoSucker as a specific user at designated times or simply run YoSucker from the command line.

If you get the error: Another YoSucker is already running but an instance is not listed when you run the command:

ps -A

Delete the .yosucker-lock file from your ~/ or ~./yosucker directory.