Created attachment 889518 [details, diff] Patch against the ebuild to make it work properly when ROOT is set net-mail/courier-imap-5.2.6-r1 fails to find ${D}${ROOT}/usr/lib64/courier-imap when running fperms in postinst, however ${ROOT} is handled by portage and the ebuild in this case doesn't have to treat it specially. I forgot to keep the build.log. If you need it let me know.
Comment on attachment 889518 [details, diff] Patch against the ebuild to make it work properly when ROOT is set fperms always operates on ${D}, so your patch is not valid. The fperms call should be replaced with chmod.
Created attachment 889555 [details] build.log without the patch
(In reply to Mike Gilbert from comment #1) > fperms always operates on ${D}, so your patch is not valid. ${D} isn't the problem. ${ROOT} is. I've attached the build.log so you can see the problem yourself.
Created attachment 889556 [details, diff] Use chmod instead of fperms Now I got it. There were two problems in the ebuild and I fixed the wrong one.