Prevent duplicates messages for POP3 users post migration

=If your POP3 users don't delete emails after download, when you switch to Zimbra they will download all emails again, including already downloaded ones and they'll end up with a lot of duplicates.

POP3 servers usually assign a unique number (UIDL) to each incoming mail message. POP3 clients store the UIDL for each message they download and compare the list of UIDL they already have to the list provided by the POP3 server. This way the POP3 client can avoid downloading the same messages over and over again. It just downloads the messages with a new UIDL.

Unfortunately, when you import messages into Zimbra using zmmailbox the UIDL of messages is not preserved. As a result, the client sees the messages stored in their Zimbra account as new ones, even if they are marked as already "Read" and even if the client has already stored them locally.

A partial solution to this problem is to run this short script, which will hide all messages older than the current date to POP3 users:

su - zimbra
zmprov -l gaa | while read ACCOUNT
do
  zmprov ma ${ACCOUNT} zimbraPrefPop3DownloadSince $(date "+%Y%m%d%H%M%S"Z)
done

This is just a quick hack and not the proper way to solve the root of the problem. YMMV.

Jump to: navigation, search