1 (edited by rajahutan 2017-04-26 19:14:15)

Topic: 1 user email always goes to junk folder

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.86
- Linux/BSD distribution name and version: UBUNTU 12.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No (free version)
- Related log if you're reporting an issue:
====
Hi All ,
from this Monday one of our user not receive many email, after check at roundcube webmail, 90% email goes to junk folder
this email it's not SPAM, even we try to send email test with plain text from internal domain,email arrived and still drop to junk folder.

-- note : email goes to inbox first, five /ten minutes later email suddenly move to junk folder
and all this email is came from our self domain

dovecot log from problem user:

Apr 26 18:03:30 auth: Debug: ldap(user@domain.co.id,127.0.0.1): bind search: base=o=domains,dc=eratex,dc=co,dc=id filter=(&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=imapsecured)(|(mail=user@domain.co.id)(&(enabledService=shadowaddress)(shadowAddress=user@domain.co.id))))
Apr 26 18:03:30 auth: Debug: ldap(user@domain.co.id,127.0.0.1): result: mail(user)=user@domain.co.id
Apr 26 18:03:30 auth: Debug: client out: OK     1       user=user@domain.co.id
Apr 26 18:03:30 auth: Debug: ldap(user@domain.co.id,127.0.0.1): user search: base=o=domains,dc=eratex,dc=co,dc=id scope=subtree filter=(&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=imapsecured)(|(mail=user@domain.co.id)(&(enabledService=shadowaddress)(shadowAddress=user@domain.co.id)))) fields=mail,homeDirectory,mailQuota
Apr 26 18:03:30 auth: Debug: ldap(user@domain.co.id,127.0.0.1): result: mail(user)=user@domain.co.id mailQuota(quota_rule=*:bytes=%$)=5242880000 homeDirectory(home)=/var/vmail/vmail1/eratex.co.id/m/ma/man/mandeep-2011.09.12.09.01.30/
Apr 26 18:03:30 auth: Debug: master out: USER   72220673        user@domain.co.id    quota_rule=*:bytes=5242880000   home=/var/vmail/vmail1/eratex.co.id/m/ma/man/mandeep-2011.09.12.09.01.30/   mail=maildir:~/Maildir/
Apr 26 18:03:30 imap-login: Info: Login: user=<user@domain.co.id>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=21303, secured
Apr 26 18:03:30 imap(user@domain.co.id): Debug: Effective uid=2000, gid=2000, home=/var/vmail/vmail1/eratex.co.id/m/ma/man/mandeep-2011.09.12.09.01.30/

dovecot log from normal user :

Apr 26 17:48:44 auth: Debug: ldap(user-2@domain.co.id,202.146.xxx.xx): result: mail(user)=user-2@domain.co.id homeDirectory(home)=/var/vmail/vmail1/eratex.co.id/c/h/r/christine.wijaya-2014.04.14.14.31.52/ mailQuota(quota_rule=*:bytes=%$)=1073741824
Apr 26 17:48:44 auth: Debug: master out: USER   785776641       user-2@domain.co.id   home=/var/vmail/vmail1/eratex.co.id/c/h/r/christine.wijaya-2014.04.14.14.31.52/     quota_rule=*:bytes=1073741824   mail=maildir:~/Maildir/
Apr 26 17:48:44 pop3-login: Info: Login: user=<user-2@domain.co.id>, method=PLAIN, rip=202.146.xxx.xx, lip=202.154.57.222, mpid=11489
Apr 26 17:48:44 pop3(user-2@domain.co.id): Debug: Effective uid=2000, gid=2000, home=/var/vmail/vmail1/eratex.co.id/c/h/r/christine.wijaya-2014.04.14.14.31.52/

there is a different at debug:ldap
problem user log : debug:ldap with localhost (127.0.0.1) meanwhile normal user using Public IP : auth: Debug: ldap(user-2@domain.co.id,202.146.xxx.xx)

is there anything else we need to check ? we don't make any change
have you got any idea ?

we already check at roundcube / setting/ filter, there is no filter/rule here.
and also check at LDAP user properties

. Thank you .

----

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

2 (edited by rajahutan 2017-04-27 11:47:02)

Re: 1 user email always goes to junk folder

anyone please help..
- create filtering move all message to inbox at roundcube not helping,
- try disable /var/vmail/sieve/dovecot.sieve  not helping,
- user also don't have personal sieve
- email header show spam score 0.xx - 1.7 so it's safe
- ...

3

Re: 1 user email always goes to junk folder

rajahutan wrote:

-- note : email goes to inbox first, five /ten minutes later email suddenly move to junk folder

This doesn't make any sense.

iRedMail-0.9.6 has global sieve rule enabled by default, it will move detected spam to Junk folder. BUT, no way the mail which is already delivered in INBOX will be moved to Junk by sieve rule. It sounds like this user has some other IMAP client accessing same mailbox. Please check with your user.

4 (edited by rajahutan 2017-05-02 12:35:26)

Re: 1 user email always goes to junk folder

ZhangHuangbin wrote:
rajahutan wrote:

-- note : email goes to inbox first, five /ten minutes later email suddenly move to junk folder

This doesn't make any sense.

iRedMail-0.9.6 has global sieve rule enabled by default, it will move detected spam to Junk folder. BUT, no way the mail which is already delivered in INBOX will be moved to Junk by sieve rule. It sounds like this user has some other IMAP client accessing same mailbox. Please check with your user.

Hai Zang
thank you ..

Yess it's happened
first disable all rule / sieve in to roundcube
- then create move all message to mailbox also not working
- create some rule from roundcube also not working

I'm trying live monitoring from user webmail (roundcube), send an email test, email go to inbox,  then when refreshing email already move to junk folder, checking complete header spam score only 0, xx so its safe.
check everything log and everything normal.

it seems something error with sieve.

5

Re: 1 user email always goes to junk folder

Sieve rules are applied WHILE delivering new message, it doesn't apply to messages which are already in mailbox. So it doesn't make much sense to me.

Do you have multiple IMAP client (e.g. Outlook, macOS Mail.app) open? i know macOS Mail.app has its own filters, if you do have Mail.app, please try to disable the filters temporarily for testing.

6

Re: 1 user email always goes to junk folder

ZhangHuangbin wrote:

Sieve rules are applied WHILE delivering new message, it doesn't apply to messages which are already in mailbox. So it doesn't make much sense to me.

Do you have multiple IMAP client (e.g. Outlook, macOS Mail.app) open? i know macOS Mail.app has its own filters, if you do have Mail.app, please try to disable the filters temporarily for testing.

Thanks Zhang
Yess, it also doesn't  make sense to me, but unfortunately this happened (only in 1 user)
( very strange,  mail in the inbox suddenly move to junk folder after 5-10 minutes)

Already checked on user and using pop3, both on mobile and laptop with leave message option.

finally,
copy all Maildir, then delete user account and then create again and rebuild email structure (openldap) then copied old maildir to new maildir

7

Re: 1 user email always goes to junk folder

Maybe you can enable Dovecot plugin "mail_log" to monitor whether it's moved by an IMAP client:
https://wiki2.dovecot.org/Plugins/MailLog

Also check the IP address.