Nevada to OpenSolaris Sun Ray on SPARC (part 4 – imapd)
Had another go at building UOW imapd. This time I’m going to try with the studio12 compiler after a brief exchange with George Shepherd who has managed to get this to build.
$ pfexec pkg install developer/sunstudio12u1 DOWNLOAD PKGS FILES XFER (MB) Completed 33/33 11633/11633 548.7/548.7 PHASE ACTIONS Install Phase 18370/18370 PHASE ITEMS Reading Existing Index 8/8 Indexing Packages 33/33 Indexing Packages 33/33 Optimizing Index... PHASE ITEMS Indexing Packages 750/750
Changed src/osdep/unix/Makefile so that
CC=/usr/bin/cc SSLCERTS=/etc/openssl/certs SSLKEYS=$(SSLCERTS) SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib
It looks like you need to install this by hand. Note that I’m only installing imapd. I am really not interested in pop.
$ pfexec cp imapd/imapd /usr/sbin
Then if we are going to use SSL then we need a certificate. For my purposes I create a self signed one that will last 10 years. I’m going to have to do this again when I rename the machine.
# cd /etc/openssl/certs # openssl req -new -x509 -nodes -out imapd.pem -keyout imapd.pem -days 3650 Generating a 1024 bit RSA private key .....................................++++++ ................................................++++++ writing new private key to 'imapd.pem' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) :AU State or Province Name (full name) :NSW Locality Name (eg, city) :Gordon Organization Name (eg, company) :Oracle Organizational Unit Name (eg, section) :TSC Common Name (eg, YOUR name) :sb2000-b.aus.sun.com Email Address :
It appears to be crucial to get the fully qualified hostname as the common name.
Now we can add the imap services to /etc/inetd.conf
imap stream tcp nowait root /usr/sbin/imapd imapd imaps stream tcp nowait root /usr/sbin/imapd imapd
and then add it into SMF
$ pfexec inetconv imap -> /lib/svc/manifest/network/imap-tcp.xml Importing imap-tcp.xml ...Done imaps -> /lib/svc/manifest/network/imaps-tcp.xml Importing imaps-tcp.xml ...Done
Configure it up into thunderbird and wonder of wonders, it looks like it works.
I forgot to mention the make command that I used to build it was:
$ make soc
Next trick will be Sun Ray Server.