procmail delivers to wrong account when similar accounts exist

I've just experienced a 'lost email' issue that I've tracked down to a problem in procmail configuration working with PostFix.

The system has my primary account 'tj' that I use to do all admin. I don't use it for email and it isn't related to any VirtualMin domain.

VirtualMin manages several domains. For one domain I just created a sub-domain. In that sub-domain I created a new sub-domain mail/FTP user (for email only) with the mail username 'tj' - so the full email address is tj@subdomain.domain.tld.

Before using it I wanted to test it so sent an email from an external mail service. The email didn't arrive in the Maildir for the user.

After inspecting /var/log/mail.log and checking that the initial greylist (postgrey) delay eventually allowed reception the last log entry of note indicated delivery to procmail.

In a log entry a few lines before that was what I originally thought was an unrelated entry reported: procmail couldn't write to procmail.log in the system account I mentioned earlier:

12:56:33 pella procmail[18129]: Error while writing to "/home/tj/logs/procmail.log"
12:56:33 pella postfix/local[17976]: C2F691813B: to=, orig_to=, relay=local, delay=0.82, delays=0.77/0/0/0.05, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -t -a $EXTENSION)
12:56:33 pella postfix/qmgr[7798]: C2F691813B: removed

On a hunch I created the directory /home/tj/logs/ and sent another test email. This time the procmail.log was created and contained:

From test@gmail.com Tue Apr 21 13:00:55 2009
Subject: Testing incoming email
Folder: /home/tj/Maildir/new/1240315255.18299_0.pella 2363

The Procmail system configuration is the default, so the only thing I can think is that somehow VirtualMin has configured Postfix to use the wrong Linux system account.

I've not been able to find the precise cause of the issue so far.

A big clue may be that I found this in /etc/passwd:

tj@sub.domain.tld:x:1033:1028:TJ:/home/domain.tld/domains/sub.domain.tld/homes/tj:/dev/null
tj-sub.domain.tld:x:1033:1028:TJ:/home/domain.tld/domains/sub.domain.tld/homes/tj:/dev/null

Status: 
Closed (fixed)