• The ImunifyAV extension is now deprecated and no longer available for installation.
    Existing ImunifyAV installations will continue operating for three months, and after that will automatically be replaced with the new Imunify extension. We recommend that you manually replace any existing ImunifyAV installations with Imunify at your earliest convenience.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Question Incoming mail is stored in Junk folder

EnriqueR

Regular Pleskian
Server operating system version
Ubuntu 24.04.1 LTS
Plesk version and microupdate number
18.0.66 #2
I have 2 emails on my Plesk server from 2 different domains. When I send a message from [email protected] to [email protected], the message is stored in the Junk folder.

I have tried sending messages from another email account type [email protected] to the same recipient [email protected], and the messages are saved correctly in INBOX. Only messages from [email protected] are automatically saved in the Junk folder.

I have tried disabling DMARC verification by adding the domain domain1.com to the /etc/psa/dmarc.conf file, but it still doesn't work.
I have tried sending the message from Roundcube and from Thunderbird, but they still end up in the Junk folder.

The SpamAssassin service is disabled for this email, it has no filtering rules, and the server not have Plesk Antivirus installed.

The truth is that it is very strange and I am desperate, I don't know what could be happening. Please, if you can help me solve the problem, I would be very grateful.

Header of the message that arrives at the [email protected] email
Return-Path: <[email protected]>
X-Original-To: [email protected]
Delivered-To: [email protected]
Received: from webmail.domain1.com (localhost.localdomain [IPv6:::1])
by servidor.qserviciosinternet.es (Postfix) with ESMTPSA id E7013C5912
for <[email protected]>; Tue, 21 Jan 2025 13:16:25 +0100 (CET)
Authentication-Results: servidor.qserviciosinternet.es;
dmarc=pass (p=QUARANTINE sp=NONE) smtp.from=domain1.com header.from=domain1.com;
spf=pass (sender IP is ::1) smtp.mailfrom=[email protected] smtp.helo=webmail.domain1.com
Received-SPF: pass (servidor.qserviciosinternet.es: connection is authenticated)
MIME-Version: 1.0
Date: Tue, 21 Jan 2025 13:16:25 +0100
From: [email protected]
To: user <[email protected]>
Subject: Asunto
Message-ID: <[email protected]>
X-Sender: [email protected]
Content-Type: text/plain; charset=US-ASCII;
format=flowed
Content-Transfer-Encoding: 7bit
X-PPP-Message-ID:
<173746178611.2139549.12358503014807937545@servidor.qserviciosinternet.es>
X-PPP-Vhost: domain1.com

Message

maillog entry
Jan 21 12:52:40 servidor postfix/smtpd[2130655]: connect from localhost.localdomain[::1]
Jan 21 12:52:40 servidor postfix/smtpd[2130655]: TLS SNI localhost from localhost.localdomain[::1] not matched, using default chain
Jan 21 12:52:41 servidor postfix/smtpd[2130655]: 09C7BC3082: client=localhost.localdomain[::1], sasl_method=PLAIN, sasl_username=[email protected]
Jan 21 12:52:41 servidor psa-pc-remote[299613]: 09C7BC3082: from=<[email protected]> to=<[email protected]>
Jan 21 12:52:41 servidor postfix/cleanup[2126503]: 09C7BC3082: message-id=<[email protected]>
Jan 21 12:52:41 servidor psa-pc-remote[299613]: 09C7BC3082: py-limit-out: stderr: INFO:__main__:Setting 'X-PPP-Vhost' header to 'domain1.com'
Jan 21 12:52:41 servidor psa-pc-remote[299613]: 09C7BC3082: py-limit-out: stderr: PASS
Jan 21 12:52:41 servidor psa-pc-remote[299613]: 09C7BC3082: spf: stderr: PASS
Jan 21 12:52:41 servidor psa-pc-remote[299613]: 09C7BC3082: check-quota: stderr: SKIP
Jan 21 12:52:41 servidor postfix/qmgr[301326]: 09C7BC3082: from=<[email protected]>, size=630, nrcpt=1 (queue active)
Jan 21 12:52:41 servidor postfix/smtpd[2130655]: disconnect from localhost.localdomain[::1] ehlo=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=6
Jan 21 12:52:41 servidor postfix-local[2130688]: 09C7BC3082: from=<[email protected]>, to=<[email protected]>, dirname=/var/qmail/mailnames
Jan 21 12:52:41 servidor dk_check[2130690]: 09C7BC3082: DKIM Feed: No signature
Jan 21 12:52:41 servidor postfix-local[2130688]: 09C7BC3082: dk_check: stderr: PASS
Jan 21 12:52:41 servidor dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=2130692, TLS, session=<K4qlAzYs4rgAAAAAAAAAAAAAAAAAAAAB>
Jan 21 12:52:41 servidor postfix-local[2130688]: 09C7BC3082: dmarc: stderr: PASS
Jan 21 12:52:41 servidor dovecot: service=imap, user=[email protected], ip=[::1]. Disconnected: Logged out rcvd=487, sent=750
Jan 21 12:52:41 servidor dovecot: service=lda, user=[email protected], ip=[]. sieve: msgid=<[email protected]>: stored mail into mailbox 'INBOX'
Jan 21 12:52:41 servidor postfix/pipe[2129944]: 09C7BC3082: to=<[email protected]>, relay=plesk_virtual, delay=0.3, delays=0.25/0/0/0.05, dsn=2.0.0, status=sent (delivered via plesk_virtual service)
Jan 21 12:52:41 servidor postfix/qmgr[301326]: 09C7BC3082: removed
 
The maillog entry below shows that up on receiving the email, the dovecot stores the message in the INBOX folder.
Jan 21 12:52:41 servidor dovecot: service=lda, user=[email protected], ip=[]. sieve: msgid=<[email protected]>: stored mail into mailbox 'INBOX'

Somehow it gets moved to the junk folder afterwards. Maybe there is an mailbox filter rule in webmail which moves the messages? Or maybe there is a mailbox filter in an email client (like Outlook, Thunderbird or on your smartphone) which moves the email message to the junk folder?
 
Webmail does not have any filter applied. Is there any way to know if a client moves the message via IMAP as soon as it arrives to the Junk folder?

I've tried sending a message and instantly checking the /var/qmail/mailnames/domain2.com/user/Maildir/new folder to see if it ever gets stored there, but it doesn't show up, it shows up in the Junk folder.
 
Is there any way to know if a client moves the message via IMAP as soon as it arrives to the Junk folder?

You can configure Dovecot to log all IMAP activity. But this can be a bit tedious te achieve. Some more info on how to achieve this can be found here:

Instead, it might be easier to just change the password of the receiving mailbox. That way any current configured email client won't be able to access the mailbox. If after changing the password the email message is still moved to the junk folder, you can pretty much rule out that this is caused by any email client.
 
Back
Top