The rc script that comes with courier-imap has the following line in it: umask $IMAP_UMASK and the gentoo-imapd.rc script doesn't. Placing this line into gentoo-imapd.rc would cause the IMAP_UMASK variable in /etc/courier-imap/imapd to be respected. It would have also saved me some confusion when I ran the rc-scripts from a shell with a strange umask that caused courier-imap's dotlocking to fail :-). The scripts I looked at came from courier-imap-4.0.6-r3
looks like no umask is being used now in scripts