Missing messages at target after IMAPSYNC

Hello,
I am trying to manually transfer all messages from NS7 to new NS8 Server using imapsync app in NS8.
After the first and following runs of the imapsync task there are messages missing at the target server. I searched some of those missing messages, one was a duplicate but others were ordinary, at NS7 side readable messages.

Has anyone experienced this?
Is there any idea how to copy the missing messages?
I tried to do php imap to find the folders where the messages count does not match but using imap_search does not give helping results (does not find tens of messages at target when the count only differs by one)

Regards
Uwe

NethServer Version: 8 with latest update (still community version)
Module: imapsync 1.1.0
Base: Rocky

Hello.
Just some ideas:

  • Sync configured as only inbox or all folders?
  • Anything relevant in the imapsync log after execution?
1 Like

Hello,
thanks for your reply
my logfile shows for example folder:

Host1: folder [HINZ intern/EDV] has 273 messages in total (mentioned by SELECT)
Host2: folder [HINZ intern/EDV] has 257 messages in total (mentioned by SELECT)
Host2: folder [HINZ intern/EDV] permanentflags:
Host1: folder [HINZ intern/EDV] considering 273 messages
Host2: folder [HINZ intern/EDV] considering 257 messages
Host1: HINZ intern/EDV/11 size 3050 ignored (no wanted headers so we ignore this message. To solve this: use --addheader)
Host1: HINZ intern/EDV/12 size 890 ignored (no wanted headers so we ignore this message. To solve this: use --addheader)
//16 lines of "message ignored" all together
Host1: folder [HINZ intern/EDV] selected 273 messages, duplicates 0
Host2: folder [HINZ intern/EDV] selected 257 messages, duplicates 0

These numbers are the real numbers, the email-client shows.
What does “no wanted headers” mean? How to solve this?
Uwe

Imapsync identifies messages primarily by the Message-Id and Received headers to detect duplicates and avoid copying the same message multiple times. Although the identification method can be changed.

Some messages, especially those in special folders like Sent or Drafts, often lack these headers.

When these headers are missing, imapsync cannot uniquely identify the message and therefore ignores it to avoid potential duplication or errors.

It suggests to use --addheader option, which tells imapsync to add some of the missing headers to be able to uniquely identify and compare a message.

I don’t know all the parameters imapsync is configured to use on ns8.

You can create a custom script including the option, but I don’t have the exact command and step by step process to accomplish it.

2 Likes

so I tried to run imapsync manually using the command I found in the logfile,
removed --exclude parameter because of errors and added --addheader
and added a missing space
Now it copied the missing messages
Think, I will do this manually for all accounts

runagent -m imapsync1
podman exec -ti imapsync sh
/usr/bin/imapsync --pidfile /etc/imapsync/myname_00001.pid --nolog --noauthmd5 --noreleasecheck --allowsizemismatch --skipsize --nofoldersizes
 --delete2    --fastio1 --fastio2 --buffersize 8192000 --addheader --host1 myhost.mydomain.de --user1 myname --passfile1 /etc/imapsync/myname_00001.
pwd --port1 143 --tls1  --host2 10.5.4.1 --user2 myname*vmail --port2 143 --tls2 --passfile2 /etc/imapsync/vmail.pwd

Uwe

2 Likes

Edited the imapsync script, this will probably not survive an update but it helps for now

runagent -m imapsync1
podman exec -ti imapsync sh
vi   /usr/local/bin/syncctl
// in the action = start part inserted "--addheader"
--fastio1 --fastio2 --buffersize 8192000 --addheader\ 

Uwe