PINE 4.56 IPv6 patch (Unix-like systems only) ============================================ Rafael Martinez Torres (rafael.martinez@novagnet.com) nGn (www.novagnet.com) as a partner of Euro6IX ( www.euro6ix.org) ( WARNING: Beta ) Sucessfull tested on : - i386-suse80-linux: - i386-freebsd5.1 - i386-sun-solaris58 Problems compiling - mips-sgi-irix65 08-08-2003 ------------------------------------------------------- 0.- Changes: 1.- Detected bugs: 2.- TODO 3.- Abstract: 4.- Requirements: 5.- Installing: 6.- Using PINE APENDIX I. ( Installing prerequisites ) -------------------------------------------------------- 0.- Changes: ============ 08-08-2003: ------------ + SA_LEN(sa), a macro returning length for an structure pointed by (struct sockaddr_storage *). Key for portability on UNIX. + freeaddrinfo must be invoked when res has been dinamically allocated. 04-08-2003: ------------ Replacing the deprecated IPv6 API getipnodeby(), by getaddrinfo(), getnameinfo(). This implies : + a more portable and cleaner way. "offset_v6" hack is no longer used. + os_xxx.c remains as original on pine4.56. + Hence , getipnodebyname.c is no longer provided if not present. + inet_pton() and inet_ntop() have been replaced by calls to getaddrinfo() and getnameinfo() with proper flags. 18-07-2003: ------------ * Minor changes: order "getipnodebyname" is call with variant families: AF_INET, AF_INET6 , instead of AF_INET6,AF_INET 16-07-2003: ------------ pine4.56/imap/Makefile pine4.56/imap/src/c-client/mail.c pine4.56/imap/src/osdep/unix/Makefile pine4.56/imap/src/osdep/unix/getipnodebyname.c pine4.56/imap/src/osdep/unix/os_lnx.c pine4.56/imap/src/osdep/unix/os_slx.c pine4.56/imap/src/osdep/unix/tcp_unix.c *A very simple emulation for (getipnodebyname()...) routines have been added for Linux platforms. *For non-Linux platforms, only the PINE-control for IPv6 is added. It's up to the system whether the libc/kernel support its or not. 1.- Detected bugs: ================== DNS resolution: If your pine does not seem to solve DNS IPv6 names, this is not a bug, please refer to APPENDIX !! 2.- TODO: ============ - Send patches to official PINE distributor site, ( University of W. ) and mail lists. - Porting/testing these changes to other platforms (solris,irix, bsd ...) * - Porting non-Unix systems (os2,win32,mac ...) 3.- Abstract ============= - Pine is a MUA (Mail User Agent) designed to run originally in UNIX terminal without X servers. Because of that, its main quality is fastness and low resources-consuming on the system. You can read the mail locally, i.e , once you have previously download the mail with a POP3 client, (or if you work station and the SMTP server are the same), or remotely, that is , by using the IMAP protocol. In both cases, you are provided with a powerfull environment to process the mail messages, threading, filtering, attaching, Adress Book .... This patch enables the underlying TCP layer to run on IPv6/v4 protocol,depending on your target address. Obviously, if you don't have IPv6 connectivity you will be able only to run against IPv4 IMAP servers. 4.- Requirements: ================= o IPv6 runnning UNIX-platform (*)(**) o Corporate or GNU C compiler ( cc, gcc) (*) Sucessfull - i386-suse80-linux: - i386-freebsd5.1 - i386-sun-solaris58 and against IMAP IPv6 Agents - i386-redhat7.1-linux running imap-2001 (**) Faulty compiling - mips-sgi-irix65 ( Mismatch types: Diagnostic: The API getaddrinfo, getnameinfo is not well implemented.Maybe thereis a patch fixing this. ) 5.- Installing: ( Refer to Apendix. in order to install the Requirements). ========================================================================== 1.- Unroll the tar-ball file pine.tar.gz, version 4.56 (www.washington.edu) bash-2.04$tar xzvf pine.tar.gz 2.- Apply the released patch. bash-2.04$ patch -p0 < pine-4.56-v6-20030718.diff Note that corporate patch ( SUN, SGI) may fail. Try GNU patch instead.. 3.- Proceed to build the patch. bash-2.04$ cd pine-4.56 bash-2.04$ ./build EXTRACFLAGS=-DIPv6 slx SSLTYPE=none ( See info on doc/pine-ports to enter your platform: lnx = Linux using crypt from C library slx = Linux using -lcrypt rlh = RedHat 7.2 lsu = SuSE sg6 = SGI IRIX >=6.5 gs5 = Solaris >= 2.5 using gcc bsf = FreeBsd I choosed no SSLTYPE version ) 4.- Make available your new version of pine. bash-2.04$ ln -s /path/to/pine-4.56/bin/pine $HOME/bin 5.- Adjust your environment in order to make reachable the MRTG commands' set: bash-2.04$ export PATH=$HOME/bin:$PATH 6.- Using PINE: =============== This section is not intended to explain all the features of PINE. Please, refer to correspondent PINE guide if you want a detailed help. Just to remark: this patch has only sense if you read your mail by using directly IMAP, and not other POP3 programs to download mail locally (fetchmail). Otherwise IPv6 network routines will not operate: At Setup,Config, change the value for inbox-path = INBOX inbox-path = {lisa.consulintel.euro6ix.org/user=rrmt}INBOX inbox-path = {[10.0.0.2]/user=rrmt}INBOX inbox-path = {[2001:801:44::11]/user=rrmt}INBOX Changing the correspoding IPv6 server name and user. Warning : When specifying IPv6 dotted addresses, use [] mandatory. Otherwise, you'll be prompt "Bad format litteral" It should go also for other fields like nntp-server, smtp-sever ... (No test done on IPv6 NNTP,SMTP servers) APENDIX I. ( Installing prerequisites ) ======================================== A) Enabling your host (client or server) for both IPv6 and IPv4 resolution (DNS6) This may change depending on you distribution. At i386-suse80-linux, just edit the file: /etc/nsswitch.conf and replace all occurences of "dns" by "dns6" B) Enabling a IMAP IPv6 server. ( On a i386-redhat-7.3 ) You need the following files o imap-2001a-10.i386.rpm 1. Install the rpm package. bash-2.04$ su # rpm -i /path/to/imap-2001a-10.i386.rpm # rpm -q -l imap 2. Enable it at the xinet.conf # vi /etc/xinet.d/imap Just edit the line: disable=no 3. You will need to restart the xinetd daemon. #/etc/init.d/xinetd --restart C) IPv6 connectivity through IPv4 tunneling . (To do )