The command line command was mentioned earlier in this thread:
You need to be in the /home/user-data/mail/dkim directory when you run this command.
root@box:/home/user-data/mail/dkim# ls
mail.private mail.txt
root@box:/home/user-data/mail/dkim# sudo opendkim-genkey --bits=1024 -s box -d mailinabox.info
root@box:/home/user-data/mail/dkim# ls
box.private box.txt mail.private mail.txt