severity 878007 wishlist tags 878007 help thanks Running opendkim in a chroot is possible, but it is an advanced setup. One cannot simply create a directory and configure it as ChangeRootDirectory. opendkim expects all kinds of services to be available in there such as syslog socket, random devices, name services, trust anchors, etc. And they need to have the right permissions too.
In your case, it is likely that looking up hostname ‘ip6-localhost’ inside the chroot failed (that’s what I’m seeing on my machine). Once that is out of the way, opendkim can start. So how to set up a chroot for opendkim? I used strace to identify the obstacles. Log messages could be better. Documentation could be better: upstream provides a text file ‘chroot’, which we distribute at /usr/share/doc/opendkim/chroot, unfortunately it is incomplete. I don’t use a chroot myself, but doc contributions by others are certainly welcome.