This article is about the messages that have vanished, and it tells you where they go.

Question: You found that some of your messages had disappeared when you logged into an email. What became of them?

Answer: When an email goes missing, it’s usually because a user is using a mail client to access it, and the mail client downloads and deletes or deletes the email from the server. You’ll have to restore your account to get your email back.

As an alternative: While you must restore the mail files to retrieve your email, you can add extra logging in case this happens again.

To begin, we’ll use grep to find the date range and domain in question. Look for pop and keep track of how many you have. Substitute the three-letter abbreviation for the month and your days. This corresponds to July 25th to July 29th in this situation.

grep -cP 'Jul 2[5-9].+pop.+test.tld'

If no results are returned, it was probably done over an IMAP link. Dovecot does not record this information by default and needs additional configurations. You can change the Dovecot configuration and add the following for additional IMAP logging to allow more verbose logging in case this happens again.

To add logging to the Dovecot set up, create a main. local file so that your changes are preserved after new configuration builds and you can still make changes via WHM.

To begin, go to the folder containing the dovecot template:

cd /var/cpanel/templates/dovecot2.3

After that, transfer main. default to main. local.

cp main.default main.local

After the last “mail plugins=” entry, locate the section “protocol IMAP” and add the following paragraph.

mail_plugins = $mail_plugins mail_log notify

Just before the “protocol imap” segment ends, add the following.

plugin {
# Events TWEET available to log: append copy delete expunge flag_change mailbox_delete mailbox_rename undelete
mail_log_events = append copy delete expunge flag_change mailbox_delete mailbox_rename undelete
# Available fields: uid, box, msgid, from, subject, size, vsize, flags
# size and vsize are available only for expunge and copy events.
mail_log_fields = uid box msgid size subject flags
}

Rebuild the dovecot.conf

/scripts/builddovecotconf

Start the dovecot again

/scripts/restartsrv_dovecot

If you need to make any further changes to the logging, please refer to the dovecot logging documentation.

Dovecot Logging

We hope you have a better understanding of Email Messages Missing now. Please contact our Host.co.in Team for constructive assistance 24 hours a day, 7 days a week if you happen to have issues with the protocol mentioned above.

Read Also : How to Create an Email Account in Plesk