I had a tricky problem with email not being delivered to local users (forwarding was OK) after moving my sites from a server running Ubuntu 10.04 to one running Ubuntu 12.04. It looks like a Virtualmin problem so I thought I would report it here. (Virtualmin 4.04.gpl GPL)
Checking the mail log I found multiple warnings like this: mail postfix/smtpd: warning: connect to Milter service local:/var/spool/postfix/var/run/opendkim/opendkim.sock: No such file or directory
I tried disabling DKIM in Virtualmin/Email Messages/Domainkeys Identified Mail but that did NOT solve the problem - this also seems to be a bug but I didn't investigate further.
I commented out the four "milter" lines from /etc/postfix/main.cf and the problem went away, but DKIM wasn't working of course.
I also found from some googling around that milter_protocol should be set to 6 (not 2) in this version but that didn't make any apparent difference.
I checked that the DKIM service was running (it's opendkim in this version of Ubuntu) and the opendkim.sock file does actually exist with the right permissions and postfix is a member of the opendkim group.
After a bit more googling I discovered that postfix smtpd is chrooted by default, and disabling that fixed the problem. So I tried re-enabling the chroot and changing the socket path to local:/var/run/opendkim/opendkim.sock. That seems to work.
So to summarise, I think the settings that Virtualmin adds to /etc/postfix/master.cf should be
milter_default_action = accept milter_protocol = 6 smtpd_milters = local:/var/run/opendkim/opendkim.sock non_smtpd_milters = local:/var/run/opendkim/opendkim.sock
and these settings should be removed when DKIM is disabled.
Hope this helps.