1 (edited by communque 2024-07-31 20:57:07)

Topic: Emails arrive to inbox and then disappear

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version:  iRedMail-1.7.0
- Deployed with downloadable installer
- Linux/BSD distribution name and version: Ubuntu 24.04 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
====

I'm testng emails auto-generated by I'm testng emails auto-generated by Nodemailer NodeJS module

The server that is sending these emails is controlled by a hosting provider, not controllled by our iRedMail system.  The server receiving the email is controlled by our iRedMail system.

These test emails do arrive and appear briefly in the inbox but then disappear before they can be read.

I'm not seeing them in the Spam folder

Trying to learn what exactly is going on.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Emails arrive to inbox and then disappear

Please check Dovecot log /var/log/dovecot/*.log to figure out what happened to the emails.

3 (edited by communque 2024-08-01 02:26:25)

Re: Emails arrive to inbox and then disappear

ZhangHuangbin wrote:

Please check Dovecot log /var/log/dovecot/*.log to figure out what happened to the emails.

Thanks ZhangHaungbin

Some errors in /var/log/dovecot/imap.log

Jul 31 15:42:47 mail dovecot: imap(myUser@myDomain.com)<3781><****>: Error: last_login_dict: Failed to write value: dict-server returned failure: sql dict: commit failed: ERROR:  duplicate key value violates unique constraint "last_login_pkey"

**UPDATE**[ This error points to database: 'vmail', table: 'last_login'.  There was an existing entry the username/domain pair listed above, suggesting the system was trying to add another of the same name.  I changed the domain to make a nonsense domain (and will delete), but Question: Under what circumstances will the system try to create a new user/domain, duplicating one that's already there?


Jul 31 15:43:06 mail dovecot: imap(myUser@myDomain.com)<3607><***>: delete: box=INBOX, uid=11, msgid=<***>, size=5659, from=email@from.com, subject=***: Arrival, flags=(\Deleted \Recent)

Jul 31 15:43:06 mail dovecot: imap(myUser@myDomain.com)<3607><***>: expunge: box=INBOX, uid=11, msgid=<***>, size=5659, from=email@from.com, subject=***: Arrival, flags=(\Deleted \Recent)

4 (edited by communque 2024-08-01 02:25:54)

Re: Emails arrive to inbox and then disappear

ZhangHuangbin wrote:

Please check Dovecot log /var/log/dovecot/*.log to figure out what happened to the emails.

Repeating error in dovecot.log

Jul 31 15:54:51 mail dovecot: imap: Error: DETAIL:  Key (username, domain)=(myUser@myDomain.com, myDomain.com) already exists. (reply took 0.047 secs (0.000 in dict wait, 0.048 in other ioloops, 0.000 in locks, async-id reply 0.036 secs ago, started on dict-server 0.040 secs ago, took 0.040 secs))

5

Re: Emails arrive to inbox and then disappear

Your Mail Client deletes them

6

Re: Emails arrive to inbox and then disappear

Cthulhu wrote:

Your Mail Client deletes them

Thanks Cthulhu, I'm not seeing evidence to support it (yet -- will keep testing), but I'll take your word for it.

7

Re: Emails arrive to inbox and then disappear

Jul 31 15:43:06 mail dovecot: imap(myUser@myDomain.com)<3607><***>: expunge: box=INBOX, uid=11, msgid=<***>, size=5659, from=email@from.com, subject=***: Arrival, flags=(\Deleted \Recent)

There it CLEARLY states that the expunge command was sent to delete the mail, and that comes from your mail client

8

Re: Emails arrive to inbox and then disappear

Cthulhu wrote:
There it CLEARLY states that the expunge command was sent to delete the mail, and that comes from your mail client

I think I see your reference: "expunge: box=INBOX" etc etc.
That clarification is helpful, thank you!

Also, I was able to find the cause, proving your point:  There a was another test user on a mail client with rules that were deleting the incoming emails

Thanks again.

9

Re: Emails arrive to inbox and then disappear

Cthulhu wrote:
Jul 31 15:43:06 mail dovecot: imap(myUser@myDomain.com)<3607><***>: expunge: box=INBOX, uid=11, msgid=<***>, size=5659, from=email@from.com, subject=***: Arrival, flags=(\Deleted \Recent)

There it CLEARLY states that the expunge command was sent to delete the mail, and that comes from your mail client

I am struggling with a similar problem myself, I think I am lucky that I came across this issue while looking for a solution, your answer helped me.