Urgent Problem - Emails accepted but not displayed

eoheod

Verified User
Joined
Oct 23, 2005
Messages
8
Have a strange problem. I can send emails from my server just fine, and can send to account ON the server just fine.

The mail logs show that the messages are received and processed without issue, but somehow, they don't seem to be making it into the users mailboxes.

Oddly enough, thinking that I may have forgotten a step, I ran custombuild and did ./build todovecot. After this ran, all of the missing messages showed up.

However, any messages sent after that would not go into the users mailboxes.

Again, running ./build todovecot routed all of the messages into their proper inbox.

I feel like I must be missing something, but I have no idea what.

Any help appreciated!

Thanks!

Here's a log snippet from the accepted messages that somehow are not being sent to the users inbox:

2010-03-16 20:27:01 1Nri2H-0005ZX-7i <= [email protected] H=server.me.com [0.0.0.0] P=esmtps X=TLSv1:AES256-SHA:256 S=2931 [email protected] T="Check 3" from <[email protected]> for [email protected]
2010-03-16 20:27:01 1Nri2H-0005ZX-7i => user <[email protected]> F=<[email protected]> R=virtual_user T=virtual_localdelivery S=3097
2010-03-16 20:27:01 1Nri2H-0005ZX-7i Completed
 
Last edited:
Same problem

I recently converted to Dovecot using the Cutombuild mentioned in http://www.directadmin.com/features.php?id=590

Unfortunatly something has gone wrong somewhere.

Just as described at the begining of this post mail seems to be processed correctly by Exim, but then seems to disapear?
It's not anywhere in the Maildir folder of the user.
When I look into the Exim Maillog it says that delivery was Completed.

I'm a bit stuck here because it seem to work for a number of users, but not for some other users.
I'm not sure where the mail is delivered now?
When I send a mail to the user there are no changes in the following folders:
/home/USERNAME/imap/DOMAIN.NAME/MAILBOXNAME/Maildir/
/var/spool/virtual
/etc/virtual

I've tried to re-create the Dovecot indexes, but that obviously doesn't work because there is no mail in the Maildir folders

I have no idea where the mail currently is?

Anyone?

Alex
 
Try looking for the email in mbox format in the /var/virtual/$domainname/$username if my memory serves me right. Or it is something very similar to that. Just search for the username in the /var directory, and you should find file(s). Of course the most important part is to get exim and dovecot configured to send/receive/read email using the DA Maildir way.
 
Hi!

Thanks for your reply!.

I created a testuser before the conversion.
I've found that testuserfile in /var/spool/virtual/DOMAIN/(test)USER
But it's an empty file.
The other files of the other users of the same domain haven't changed since the conversion. (Two days ago)

This is also my problem. Because it seemed to work at first I cannot go back anymore without data loss.
 
In that case, try posting the virtutal_localdelivery section of your exim.conf file and the mail_location setting of your dovecot.conf file. That should at least show that they are both using the same mechanism.

What should be happening, is that the exim.conf file should be using the /etc/virtual/domainowers file to see which home directory it will use, then it will append imap/$domain/$username/Maildir to that value, and that is the Maildir it should be using.

Dovecot, instead uses the /etc/virtual/$domain/passwd file to find the virtual users $HOME directory, which should also match to what it is above. So, to tie things together, that the user [email protected]:

/etc/virtual/domainowners:
doe.com: jdoe

/etc/virtual/doe.com/passwd
john:$1$xxxxxxx:502:12::/home/jdoe/imap/doe.com/john:/bin/false

Exim will lookup the owner dir of doe.com and see that jdoe is the owner, using unix tools, finds that the $HOME of jdoe is /home/jdoe and does the append thing, and ends up with /home/jdoe/imap/doe.com/john/Maildir and that is where the mail should be delivered.

Dovecot, sees the username logging is is [email protected] and uses the domainname (doe.com) to know which passwd file to use, and figures out that it should be finding the user john in /etc/virtual/doe.com/passwd and the user john has the $HOME directory set to /home/jdoe/imap/doe.com/john and dovecot append Maildir from the mail_location setting.

If any of those things are not set properly, it will appear as though you are not getting email.
 
Here is my virtual_localdelivery section:

virtual_localdelivery:
driver = appendfile
create_directory
delivery_date_add
directory_mode = 770
envelope_to_add
directory = /home/${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}}/imap/${domain}/${local_part}/Maildir
maildir_format
group = mail
mode = 660
return_path_add
user = "${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}}"
quota = ${if exists{/etc/virtual/${domain}/quota}{${lookup{$local_part}lsearch*{/etc/virtual/${domain}/quota}{$value}{0}}}{0}}​


And the mail_location setting is: mail_location = maildir:~/Maildir

Ive looked into the passwd file of a working and non working user. Both point to the same (correct) location: john:$1$xxxxxxx:502:12::/home/jdoe/imap/doe.com/john:/bin/false

So how do my configs look?
 
That is what I would expect. They all look fine, for the non working one, is the domainowners set properly?

You may want to use the -v or -d flags for exim temporarily to increase your logging, so you can trace what it is doing.
 
You are absolutely correct (I was just looking at the domainowners file)!!
I kept overlooking it.

But there is a user who has several accounts. (alex1, Alex2)
He seem to have moved a domain or something I dont know'?
But his other account was domain owner of this particular domain..

So It seems that it's working now!! (Thanks a million already!)

But now for the big question.
Is the old mail somewhere?
And if it's somewhere, how can I re-queue-send-deliver them?
 
That I can't tell you, it might have attempted to deliver it to the incorrect domain, but if the directory structure wasn't in place, it might have just failed. Of course I would have expected a failure message somewhere.
 
Thanks Toml this far.
you're a live saver :)

Maybe anyone else any idea how/where to find the lost mail?

I never got any non deliverable or something.
So it seems that it's stil somewhere on the system?
When I search for the message ID I unfortunate don't find anything
 
Hi Jef

Which logfile in particular are you refering to?

When I look at the Exim log I see the same kind of completed messages as 'eoheod' who started this thread:


2010-03-16 20:27:01 1Nri2H-0005ZX-7i <= [email protected] H=server.me.com [0.0.0.0] P=esmtps X=TLSv1:AES256-SHA:256 S=2931 [email protected] T="Check 3" from <[email protected]> for [email protected]
2010-03-16 20:27:01 1Nri2H-0005ZX-7i => user <[email protected]> F=<[email protected]> R=virtual_user T=virtual_localdelivery S=3097
2010-03-16 20:27:01 1Nri2H-0005ZX-7i Completed
 
Figured it out!

It seemed that during the running of the initial conversion script it created these users under the incorrect domainowner user.
All the mail was present there!

I moved it to the correct user and now everything is okidoki!

Thnks for your help
 
I'm glad you got it sorted out. Do you think there's a bug somewhere which needs to be addressed? Or that the client did something s/he should have been prevented from doing?

For the record, the proper log file to search would be /var/log/exim/mainlog but of course it wouldn't show anything wrong under these circumstances.

And for what it's worth, easy to realize the problem now, but when noticing the incorrect user reference (post #10 above) the answer should have been obvious to me and possibly to others, since the mail gets delivered based on user information at the time of delivery.

Jeff
 
This was an old account. I think I once tried to move a domain from one account of this user to another. This didn't work as expected or I did something wrong I dont remember (Most probably the last option)

I guess I moved the domain manually and haven't changed all the necessary settings and files. In this case the domainowner file (among others).

I don't think it's a bug. I was probably the bug back then.
 
Just for the record, I had similar problems with two email accounts - suddenly no more emails arrived into the mailbox (webmail and pop3) while, according to the logs they were being delivered by Exim. The solution here was to reset / change the users' password, after which emails were delivered in the mailbox again (but the non-delivered emails were not found, since the email ID-conversion from Exim e.g. "1TqLs4-0005ky-UJ" to dovecot was not logged).

We use Dovecot and it has always worked for this user (and all others). So it is very odd why in December (like with aoverveld) this problem appeared... The setting, as described by toml about (domainowners / /domains/X/passwd) were correct. Perhaps this was corrected automatically by the password reset but I see no reason why two users out of many would have this changed).
 
Back
Top