# Sendmail mixing up virtual mailboxes



## fugee279 (Jan 22, 2015)

Sendmail is mixing up my virtual mailboxes, mail addressed to one virtual account gets delivered to all virtual accounts inboxes


----------



## usdmatt (Jan 22, 2015)

It would be useful to have a bit more information on exactly what's happening, and your current Sendmail configuration. One vague sentence doesn't really help us help you. Probably half the reason why no one has replied yet.

Having email delivered to multiple users is a strange one. With default Sendmail, I can only see that happening with aliases. First of all the following would be useful:


Have you done anything exotic to support the virtual users (such as install additional software), or are you just using /etc/mail/virtusertable
What does the configuration for your virtual users look like.
What gets output if you run the following for the problematic address[es]:


```
sendmail -bv address@domain.com
```


----------



## fugee279 (Jan 23, 2015)

cs@somehost.com... deliverable: mailer local, user fugee


----------



## usdmatt (Jan 23, 2015)

According to that output, email to cs@somehost.com is delivered to the local user fugee. Can you actually confirm that the email is definitely appearing in more than one mailbox on the server. I.e, if you're using the default mbox mailboxes, does a test email actually get appended to /var/mail/username for more than one user?

This is what you'd usually expect to see when Sendmail is going to deliver an email to multiple accounts:

```
# sendmail -bv reports@domain.com
usera ... deliverable: mailer local, user usera
usera ... deliverable: mailer local, user userb
userc@another.server ... deliverable: mailer esmtp, host [mail.another.server], user userc@another.server
```

Have you done anything else to the email configuration apart from enable Sendmail and add your relevant domains & email addresses to /etc/mail/local-host-names & /etc/mail/virtusertable?


----------



## fugee279 (Jan 24, 2015)

Hi, thanks for replying. Actually I learned a little bit which changes the description the problem. I looked in /var/mail and saw my usernames there and was surprised first to see that they weren't directories but rather files, and surprised to see a bunch of emails inside each of the files. So now I'm much clearer on what's going on. Each message contains a 
	
	



```
<for:email@ddr.ess>
```
 tag. It's the job of my remote mail client to sort those messages out and correlate email addresses in the user file on the server with its own email "accounts". So sendmail's not mixing anything up. The messages aren't being duplicated at all. It's just that the Windows email clients aren't sorting/allocating them into the right email accounts.


----------

