Mails reappear after deletion in inbox

NethServer Version: 8
Module: mail

Hi everybody,
next issue I am facing is if I delete a mail in the inbox. It appear back after a minute.
Even if I delete the mail directly within the storage location of /home/mail2 on the server, same behavior.

Do you have any idea why this is happening?

Many thanks
Benjamin

I had a similar problem with Android smartphones connected via Gmail ActiveSync.

I would delete emails from my smartphone, but after a few minutes they would reappear.

In addition, my smartphone would constantly refresh my emails.

Finally, out of desperation, I installed Thunderbird with IMAP/SMTP and everything was resolved.

For calendars and contacts, I switched to DVX5, downloaded from F-Droid, if you don’t want to pay on Google Play.

HI @saitobenkei,
thanks for your hint.
I have this as well on iOS as on thunderbird on my pc.
Even if I delete the mail on the server itself it comes back. Sounds to me like a server issue.

Also have lots of messages in the log named.
imap-postlogin: Error: <5>impersonated login MASTER_USER=vmail USER=benjamin AUTH_USER=vmail IP=10.5.4.2 LOCAL_IP=10.5.4.2
any idea?

Hi Linux4All,

do you have Imapsync running?

Even if I delete the mail on the server itself it comes back. Sounds to me like a server issue.

To temporarily increase Dovecot’s verbosity, run a command like this [1]

runagent -m mail1 podman exec --env=DOVECOT_DEBUG=1 dovecot reload-config

imap-postlogin: Error: <5>impersonated login MASTER_USER=vmail USER=benjamin AUTH_USER=vmail IP=10.5.4.2 LOCAL_IP=10.5.4.2

Good that you checked the logs.

In this context, Error just indicates that the message was written to stderr, not that an actual failure occurred. It’s informational.

The impersonated login MASTER_USER=vmail entry typically appears when a service logs in on behalf of a user using a master user. This is common with webmail/groupware components such as WebTop. The IP 10.5.4.2 also suggests an internal/VPN connection.

If you have WebTop installed, this message is expected and harmless.


  1. https://github.com/NethServer/ns8-mail/tree/main/dovecot#logs ↩︎

Hi @davidep yes I have imapsync running on a 1-minute schedule.

Thanks for sharing this:
The impersonated login MASTER_USER=vmail entry typically appears when a service logs in on behalf of a user using a master user. This is common with webmail/groupware components such as WebTop. The IP 10.5.4.2 also suggests an internal/VPN connection.

Got your point. I have only roundcubemail installed. Not sure if that will cause such information as well. If if is only for information why it is not using stdout?

10.5.4.2 → is the default VPN, nothing I have set-up.

VPN

Endpunkt idefix.linux.local:55820

IP-Adresse 10.5.4.2

an Port binden 55820

Debugmode is active

I have currently detected, it is only happening on mails from google.
All other are working well. Probably an issue with the imapsync instead?

yeah, they are still in the inbox at gmail, even if sync cycle was done.

Issue with imapsync:
2026-02-18T22:10:14+01:00 [2:imapsync2:imapsync] task benjamin_xlrf0h: imapsync error: 111
2026-02-18T22:10:14+01:00 [2:imapsync2:imapsync] task benjamin_xlrf0h: tx=1, msg=Exiting with return value 111 (EXIT_WITH_ERRORS) 1/50 nb_errors/max_errors PID 1950815

@davidep is there also a command for debugging with imapsync?

Did remove the label “Alle Nachrichten” within Gmail for Imapsync.
Now working :slight_smile:

1 Like