How I got it to compile and work with fetchmail

Discussion Forum for YPOPs!/Linux.


How I got it to compile and work with fetchmail

Postby Janax on June 1st, 2004, 1:15 pm

Hello all,

I have been wanting to serve my Yahoo! mail so I could access it from my various machines around home/work, and YahooPops looked like the perfect solution. I had several of the problems mentioned around the web and also saw that some of the questions had been answered in a "find it in the forum" way... hopefully this list of steps will help those trying to get this to work!

First, don't use the precompiled 0.50 binary with static libraries. I and (apparently) many others can't get it to log in properly even using your correct username & password. What you'll see in the log is:
[ Fri May 21 04:08:24 2004 ] Starting POP3 session for "xxx".
[ Fri May 21 04:08:24 2004 ] <xxx> Password received from client.
[ Fri May 21 04:08:24 2004 ] <xxx> Connecting to Yahoo...
[ Fri May 21 04:08:24 2004 ] <xxx> Login failed
[ Fri May 21 04:08:24 2004 ] <xxx> Login to Yahoo Mail failed.
[ Fri May 21 04:14:12 2004 ] Starting POP3 session for "xxx".
[ Fri May 21 04:14:12 2004 ] <xxx> Password received from client.
[ Fri May 21 04:14:12 2004 ] <xxx> Connecting to Yahoo...
[ Fri May 21 04:14:12 2004 ] <xxx> Login failed
[ Fri May 21 04:14:12 2004 ] <xxx> Login to Yahoo Mail failed.


OK - now that you're set on compiling it yourself :D, you'll want to know what steps to take to do that.

1. Download and install the source from here and the mimepp supplement from here.

2. Download and install the required libraries. I use Debian personally, so this is accomplished by:
Code: Select all
# apt-get install openssl libcurl libcurl2-dev libxml libxml2-dev


3. You need to allow the ypcompile script to see the libxml library. This is done by:
Code: Select all
# cd $(dirname `which xml2-config`)
# ln -s xml2-config xml-config


4. Untar the two files from step 1. I used /tmp:
Code: Select all
$ tar xjpvf yahoopops-0.5-linux-src.tar.bz2
$ tar xzpvf mimepp-1.3.3.tar.gz


5. Due to a compile error I was getting, you need to make a couple of changes to the "WebBrowser.cpp" file. There are two ways to do this:

5a - Apply the patchfile below.
5b - Edit it yourself :D. Using your favorite editor, go to lines 1059 and 1060 and replace the lines
Code: Select all
      struct HttpPost *formpost=NULL;
      struct HttpPost *lastptr=NULL;
with:
Code: Select all
      struct curl_httppost *formpost=NULL;
      struct curl_httppost *lastptr=NULL;


6. (OPTIONAL) I didn't want my yahoopopsrc and locale stuff in the '/usr/local/share' directory. I wanted it in '/etc/yahoopops' instead. I also wanted the log file to go to '/var/log' like normal log files do ;). Of course you have to have permissions set up right too. So now with an authorized user (root is good):
Code: Select all
# mkdir /etc/yahoopops
# touch /etc/yahoopops/yahoopops.log
# chmod 664 /etc/yahoopops/yahoopops.log
# chgrp -R users /etc/yahoopops
# mv /etc/yahoopops/yahoopops.log /var/log
# ln -s /var/log/yahoopops.log /etc/yahoopops/yahoopops.log

Whew! Done with that...

7. Now start compiling:
Code: Select all
# cd /tmp/YP5
# ./ypcompile


(for Debian, I answered "y" to the default binary location,
"y" for the default library location,
"n" and "/etc/yahoopops" for the config files,
"/usr" for the root directory of the openssl installation,
"/usr" for the root directory of the curl installation,
and "/tmp/mimepp" for the root directory of the mimepp sources)

8. To test, edit your yahoopopsrc file (/etc/yahoopops/yahoopopsrc) and change the option "LEAVE_MAILS_UNREAD_ON_YAHOO" to "1". This should leave the original copy of the messages on the server until you're satisfied with your results.

9. Run and enjoy!!

10. (OPTIONAL) To get fetchmail to work, I used a ~/.fetchmailrc file like:
# Configuration created Thu May 27 15:10:36 2004 by fetchmailconf
set postmaster "<your linux userid>"
set bouncemail
set no spambounce
set properties ""
poll 127.0.0.1 with proto POP3 port 5058
user '<email_id>@yahoo.com' there with password '<your pw>' is '<your linux userid>' here


P.S. I saw that some people were having problems with upper/lower-case POP commands as shown here, but fetchmail doesn't seem to have this problem so I didn't investigate it further. I would assume that changing something like 'strstr' to 'stristr' would fix it, but that's just a wild guess without even looking at the code.

I hope this helps some of you!

Attachments
WebBrowser.cpp.patch.txt
Patchfile for WebBrowser.cpp file as mentioned in step 5a.
(456 Bytes) Downloaded 53 times
Janax
YPOPs! Newbie
YPOPs! Newbie
 
Posts: 7
Joined: June 1st, 2004, 11:22 am

Postby shane on June 1st, 2004, 6:54 pm

Thanks for your tips. However, you may like to do a diff between the .5 and .6 sources, as there are a lot of bug fixes. You may not be able to implement everything (some win specific code in there) but you might like to have a go at putting in some of the more important stuff until an official .6 release is out.

Theres a few memory leaks, problems with double spaced lines, e-mails being sent to wrong addresses to name just a few of the bugs.
shane
Developer
Developer
 
Posts: 5
Joined: October 29th, 2003, 4:03 am

Postby Janax on June 11th, 2004, 7:04 am

Per your advice shane, I'm taking a small stab at the code. Nothing too bad so far, but I was wondering why the 0.6 release isn't immediately releasable on Linux. There seem to be a lot of "#ifdef WIN32" statements spread around, and I've only found a couple of places where those seem to be missing.

Granted I haven't done any C programming for about ~5 years and the stuff I've been doing lately has all been in Perl. Also I haven't tried to compile anything yet as I'm about 80% through my first pass (don't have much spare time). Are the core developers using CVS at all? Guess I could go browse the actual sf.net site, but I was just checking around here first...
Janax
YPOPs! Newbie
YPOPs! Newbie
 
Posts: 7
Joined: June 1st, 2004, 11:22 am

Postby db3 on August 10th, 2004, 9:52 pm

hi,

i'm having the same exact problem with the binary on debian sid and thought i'd give this a shot.

i can't seem to find mimepp package at the link you specified. i searched the web and found one in a freebsd ftp server. that didn't work so i got the latest evaluation version from hunnysoft (http://www.hunnysoft.com/mimepp/index.html). unfortunately, that didn't work with the ypcompile script as well....

any help would be great.

thx!
db3
YPOPs! Newbie
YPOPs! Newbie
 
Posts: 3
Joined: July 13th, 2003, 12:25 pm
Location: nyc

Postby lostnihlist on September 3rd, 2004, 10:40 am

i'm trying to compile the 0.6 version, but am getting the following errors, not too sure how to fix this:

Code: Select all
/usr/lib/libcurl.a(content_encoding.o)(.text+0x5d): In function `exit_zlib':
: undefined reference to `inflateEnd'
/usr/lib/libcurl.a(content_encoding.o)(.text+0xd7): In function `Curl_unencode_deflate_write':
: undefined reference to `inflate'
/usr/lib/libcurl.a(content_encoding.o)(.text+0x146): In function `Curl_unencode_deflate_write':
: undefined reference to `inflateEnd'
/usr/lib/libcurl.a(content_encoding.o)(.text+0x1cc): In function `Curl_unencode_deflate_write':
: undefined reference to `inflateInit_'
/usr/lib/libcurl.a(content_encoding.o)(.text+0x397): In function `Curl_unencode_gzip_write':
: undefined reference to `inflate'
/usr/lib/libcurl.a(content_encoding.o)(.text+0x404): In function `Curl_unencode_gzip_write':
: undefined reference to `inflateEnd'
/usr/lib/libcurl.a(content_encoding.o)(.text+0x60e): In function `Curl_unencode_gzip_write':
: undefined reference to `inflateInit2_'
collect2: ld returned 1 exit status
make[1]: *** [ypops] Error 1
make[1]: Leaving directory `/usr/src/yahoopops/src'
make: *** [all] Error 2
Yahoopops has not yet been built.Please build it


it gets through quite a bit of the compiling first though. Debian Sid, kernel 2.6.6-2-k7. Anyone know what the deal is?
lostnihlist
YPOPs! Newbie
YPOPs! Newbie
 
Posts: 2
Joined: May 9th, 2004, 10:43 am

YahooPops .6 win SuSE 9.1

Postby gabrieljolo on September 3rd, 2004, 9:13 pm

I'm with the same problem

When I compile openssl (/usr/local/ssl), zlib (/usr/local) and curl (/usr/local), I got the following errors:

/usr/local/lib/libcurl.a(url.o)(.text+0x49c): In function `fix_hostname':
/home/gabriel/curl-7.12.1/lib/url.c:2043: undefined reference to `stringprep_check_version'
/usr/local/lib/libcurl.a(url.o)(.text+0x4bc):/home/gabriel/curl-7.12.1/lib/url.c:2067: undefined reference to `idna_to_ascii_lz'
/usr/local/lib/libcurl.a(url.o)(.text+0x4c3):/home/gabriel/curl-7.12.1/lib/url.c:2068: undefined reference to `stringprep_locale_charset'
/usr/local/lib/libcurl.a(content_encoding.o)(.text+0x10e): In function `exit_zlib':
/home/gabriel/curl-7.12.1/lib/content_encoding.c:68: undefined reference to `inflateEnd'
/usr/local/lib/libcurl.a(content_encoding.o)(.text+0x1d0): In function `Curl_unencode_gzip_write':
/home/gabriel/curl-7.12.1/lib/content_encoding.c:335: undefined reference to `inflate'
/usr/local/lib/libcurl.a(content_encoding.o)(.text+0x266):/home/gabriel/curl-7.12.1/lib/content_encoding.c:234: undefined reference to `inflateInit2_'
/usr/local/lib/libcurl.a(content_encoding.o)(.text+0x2e4):/home/gabriel/curl-7.12.1/lib/content_encoding.c:348: undefined reference to `inflateEnd'
/usr/local/lib/libcurl.a(content_encoding.o)(.text+0x480): In function `Curl_unencode_deflate_write':
/home/gabriel/curl-7.12.1/lib/content_encoding.c:106: undefined reference to `inflate'
/usr/local/lib/libcurl.a(content_encoding.o)(.text+0x50e):/home/gabriel/curl-7.12.1/lib/content_encoding.c:90: undefined reference to `inflateInit_'
/usr/local/lib/libcurl.a(content_encoding.o)(.text+0x53c):/home/gabriel/curl-7.12.1/lib/content_encoding.c:118: undefined reference to `inflateEnd'
collect2: ld returned 1 exit status
make[1]: ** [ypops] Erro 1
make[1]: Leaving directory `/home/gabriel/yahoopops/src'
make: ** [all] Erro 2
Yahoopops has not yet been built.Please build it

When I use the SuSE 9.1 package, I got the following errors:

/usr/lib/libcurl.a(content_encoding.o)(.text+0x124): In function `exit_zlib':
: undefined reference to `inflateEnd'
/usr/lib/libcurl.a(content_encoding.o)(.text+0x207): In function `Curl_unencode_gzip_write':
: undefined reference to `inflate'
/usr/lib/libcurl.a(content_encoding.o)(.text+0x2be): In function `Curl_unencode_gzip_write':
: undefined reference to `inflateInit2_'
/usr/lib/libcurl.a(content_encoding.o)(.text+0x343): In function `Curl_unencode_gzip_write':
: undefined reference to `inflateEnd'
/usr/lib/libcurl.a(content_encoding.o)(.text+0x4cd): In function `Curl_unencode_deflate_write':
: undefined reference to `inflate'
/usr/lib/libcurl.a(content_encoding.o)(.text+0x572): In function `Curl_unencode_deflate_write':
: undefined reference to `inflateInit_'
/usr/lib/libcurl.a(content_encoding.o)(.text+0x59f): In function `Curl_unencode_deflate_write':
: undefined reference to `inflateEnd'
collect2: ld returned 1 exit status
make[1]: ** [ypops] Erro 1
make[1]: Leaving directory `/home/gabriel/yahoopops/src'
make: ** [all] Erro 2
Yahoopops has not yet been built.Please build it

What I have to do to install it?

Gabriel
gabrieljolo
YPOPs! Newbie
YPOPs! Newbie
 
Posts: 3
Joined: September 3rd, 2004, 9:08 pm

Postby jabetcha on September 4th, 2004, 6:10 am

I got .6 to compile on FC2, but I needed to add 2 libraries to the LIBS (line 11) of the makefile

edit yahoopops/src/Makefile

add "-lz -lkrb5" to the end of the line 11

You may not need the -lkrb5, but that was needed for FC2 cause it was built into openssl

That should resolve the unresolved symbols.
jabetcha
YPOPs! Newbie
YPOPs! Newbie
 
Posts: 6
Joined: May 20th, 2004, 7:20 am
Location: Florida

Postby lostnihlist on September 4th, 2004, 7:58 am

for debian sid at least, only the -lz is required.
lostnihlist
YPOPs! Newbie
YPOPs! Newbie
 
Posts: 2
Joined: May 9th, 2004, 10:43 am

Postby markpmc on September 5th, 2004, 9:48 am

add "-lz -lkrb5" to the end of the line 11


Suse 9.1 only required the "-lz" on line 11.

markpmc
markpmc
YPOPs! Newbie
YPOPs! Newbie
 
Posts: 2
Joined: March 8th, 2004, 5:31 pm

Postby mikeathome on September 22nd, 2004, 9:52 pm

THANKS!!!!!!!!!! see: HowTo Not #2
mikeathome
YPOPs! Newbie
YPOPs! Newbie
 
Posts: 4
Joined: September 22nd, 2004, 5:27 pm

Mandrake10

Postby sArTiX on September 24th, 2004, 7:00 pm

I think I have gone over the forums making the fixes and getting everything, but I haven't found the error that I have. I already got all the packages needed, also I add the '-lz' at the end of line 11 in Makefile but I get the following compilation error:

../lib/re_lib/libre_lib.a /home/Programas/mimepp/rel/libmimepp_core.a /home/Programas/mimepp/rel/libmimepp_util.a /home/Programas/mimepp/rel/libmimepp_net.a /usr/lib/libcurl.a -lstdc++ -lpthread -lnsl /usr/lib/libssl.so /usr/lib/libcrypto.so -ldl -lz
/usr/lib/libcurl.a(url.o)(.text+0x4cc): In function `Curl_disconnect':
: undefined reference to `idn_free'
/usr/lib/libcurl.a(url.o)(.text+0x4d9): In function `Curl_disconnect':
: undefined reference to `idn_free'
/usr/lib/libcurl.a(url.o)(.text+0x1968): In function `fix_hostname':
: undefined reference to `stringprep_check_version'
/usr/lib/libcurl.a(url.o)(.text+0x198d): In function `fix_hostname':
: undefined reference to `idna_to_ascii_lz'
/usr/lib/libcurl.a(url.o)(.text+0x1994): In function `fix_hostname':
: undefined reference to `stringprep_locale_charset'
collect2: ld returned 1 exit status
make[1]: *** [ypops] Error 1
make[1]: Leaving directory `/home/Instaladores/yahoopops/src'

I chek for the version of curl and it is the exact number requiered so I don't have a clue what can be happening if anyone has done this on mdk10 I would appreciate your help.

Thanks
sArTiX
YPOPs! Newbie
YPOPs! Newbie
 
Posts: 3
Joined: September 24th, 2004, 6:54 pm

Postby mikeathome on September 24th, 2004, 10:23 pm

do you have libidn installed
mikeathome
YPOPs! Newbie
YPOPs! Newbie
 
Posts: 4
Joined: September 22nd, 2004, 5:27 pm

Postby Janax on October 1st, 2004, 9:03 am

Wow - it's been a while! I had received the 0.6 version from some hard work put in by shan, as described here, a bit "early". After looking in to see what was new, I saw that my topic here had some new activity.

The problem with the mimepp sources I originally linked to is apparently licensing related (see the thread Hate to be dense... but where is mimepp?). Someone in that same thread posted a (still) valid link which I am shamelessly pasting: mimepp-1.3.3.tar.gz.

Also, for grins, I got the latest official YP6 source and tried to compile it. I can confirm that step 5 is no longer necessary. I did have to add the "-lz" switch at the end of line 11 in the "src/Makefile", and after that everything seemed to work just great.

Addendum: Apparently the filename in "Step 8" above has changed to "ypopsrc" instead of "yahoopopsrc". Definitely easier to type!

You may also disregard the "p.s." in the original message from Jun 1 - this shouldn't be an issue with the new version!
Janax
YPOPs! Newbie
YPOPs! Newbie
 
Posts: 7
Joined: June 1st, 2004, 11:22 am

Postby sArTiX on October 2nd, 2004, 4:36 pm

mikeathome wrote:do you have libidn installed


yea libidn 11.0.5.4
I download the new mime app but it still shows the same error I posted before I'm working on mdk10
sArTiX
YPOPs! Newbie
YPOPs! Newbie
 
Posts: 3
Joined: September 24th, 2004, 6:54 pm

Postby Janax on October 4th, 2004, 8:27 am

sArTiX wrote:
mikeathome wrote:do you have libidn installed


yea libidn 11.0.5.4
I download the new mime app but it still shows the same error I posted before I'm working on mdk10


I'm not really a Mandrake/RedHat/rpm-based distro user, but do you also have the "-dev" package installed? If rpm-distros use those, then that will contain the files needed to compile against the actual "libidn" package.

Just guessing...
Janax
YPOPs! Newbie
YPOPs! Newbie
 
Posts: 7
Joined: June 1st, 2004, 11:22 am

Next

Return to YPOPs!/Linux

Who is online

Users browsing this forum: No registered users and 0 guests

paw prints
cron
SourceForge