POP3/IMAP shows empty Folders

Hello,

looks like at least in case of NS is acting as primary DC a mailclient connected by POP3 or IMAP shows empty folders only. At the same time SOGo, Roundcube or active sync will show up data in your mailbox correct.

Looks like a bug for me, can anybody confirm pls!

Hi @asl,

This leads to a client problem!

what mailclient (TB/Outlook/Android…)?

Any clues of what happens in /var/log/imap and /var/log/maillog?

Hi davidep,

I tested with 2 different clients:

  1. Thunderbird 45.7.0 on Ubuntu 14.04 LTS
  2. cross check on Server2012R2 with Outlook 2016

Both logfiles do not report any errors.

What I can see in /var/log/imap:

Jan 31 10:12:40 dc2 dovecot: imap-login: Login: user=schloegl@intern.org, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=31681, secured, session=</i15VWBHUgB/AAAB>
Jan 31 10:12:40 dc2 dovecot: imap-login: Login: user=schloegl@intern.org, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=31684, secured, session=<KWl5VWBHVgB/AAAB>
Jan 31 10:12:40 dc2 dovecot: imap(schloegl@intern.org): Disconnected: Logged out in=589 out=4280
Jan 31 10:12:40 dc2 dovecot: imap-login: Login: user=office@schloegl-software.at, method=PLAIN, rip=10.140.1.2, lip=10.140.1.6, mpid=31691, TLS, session=
Jan 31 10:12:50 dc2 dovecot: imap(schloegl@intern.org): Disconnected: Logged out in=589 out=4280
Jan 31 10:12:50 dc2 dovecot: imap-login: Login: user=schloegl@intern.org, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=31699, secured, session=<GP0fVmBHYAB/AAAB>
Jan 31 10:12:51 dc2 dovecot: imap-login: Login: user=schloegl@intern.org, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=31702, secured, session=<ulogVmBHZAB/AAAB>
Jan 31 10:12:51 dc2 dovecot: imap(schloegl@intern.org): Disconnected: Logged out in=589 out=4280
Jan 31 10:13:01 dc2 dovecot: imap(schloegl@intern.org): Disconnected: Logged out in=589 out=4280
Jan 31 10:13:01 dc2 dovecot: imap-login: Login: user=schloegl@intern.org, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=31721, secured, session=<ZbHGVmBHbAB/AAAB>
Jan 31 10:13:01 dc2 dovecot: imap-login: Login: user=schloegl@intern.org, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=31724, secured, session=<EAjHVmBHcAB/AAAB>
Jan 31 10:13:02 dc2 dovecot: imap(schloegl@intern.org): Disconnected: Logged out in=589 out=4280

and (during a client triggered download) /var/log/maillog:
Jan 31 10:23:21 dc2 dovecot: pop3-login: Login: user=, method=PLAIN, rip=10.140.1.2, lip=10.140.1.6, mpid=620, TLS, session=
Jan 31 10:23:21 dc2 dovecot: pop3(schloegl): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
Jan 31 10:23:21 dc2 dovecot: pop3-login: Login: user=, method=PLAIN, rip=10.140.1.2, lip=10.140.1.6, mpid=628, TLS, session=
Jan 31 10:23:22 dc2 dovecot: pop3(schloegl): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0

1 Like

Could you find more lines with “user=office@schloegl-software.at”?

It seems that “office” connects from another host. Does it see empty folders? I think the login is wrong: it should be “office@intern.org”. Authentication must fail though… :thinking:

I’d expect “schloegl” can see the folders instead.

IMAP:
You are right! ‘schloegl’ can log in and see what’s inside. ‘office@schloegl-software.at’ could not, because this is an alias email address for user schloegl only. This is what Oulook does, if you set up an email accout (user=email) and further more if you check the settings it will not report an error.
Anyway IMAP works! Thanks a lot :relaxed: but


POP3:
Same as before and I do log in with correct user ‘schloegl’ there. Would like to add, that same clients were working with NS 6.8 final.
here the logfile created by using Thunderbird:
Jan 31 14:03:34 dc2 dovecot: pop3-login: Login: user=<schloegl>, method=PLAIN, rip=10.140.1.84, lip=10.140.1.6, mpid=14875, TLS, session=
Jan 31 14:03:34 dc2 dovecot: pop3(schloegl): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0

here the logfile created by using Outlook2016:
Jan 31 14:07:15 dc2 dovecot: pop3-login: Login: user=<schloegl>, method=PLAIN, rip=10.140.1.2, lip=10.140.1.6, mpid=15095, TLS, session=
Jan 31 14:07:15 dc2 dovecot: pop3(schloegl): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0

The correct user name can be obtained with the following command

echo schloegl@$(hostname -d)

In ns7 the user name has always a “@domain” suffix. Some services support the short form, without “@domain”.

See also

http://docs.nethserver.org/en/v7rc/accounts.html#credentials-for-services

I solved the problem now:
User login needs to be 'user@domain’
Login with user ‘schloegl’ worked in imap but not in POP3
Login with schloegl@intern.org works for both IMAP and POP3.

Problem solved, sorry for waisting your time and also would like to add that you all did a great job on Nethserver!

I’m testing here a scenario with a NS set up as PDC for Windows (2012R2 as member server) and tested a lot regarding AD and policies using windows tools. Couldn’t find any problem beside my own mistakes :smirk:

2 Likes

Thank you very much @asl! Your feedback is much appreciated!

I’ve just filed a new bug. In the meantime, the workaround is using the long user name format.

/edit: the RPM is now available from nethserver-testing repository. To check it out:

yum --enablerepo=nethserver-testing update nethserver-mail-server

@asl can you help us to verify the fix proposed? Just try to update your machine with the command above :point_up: and check out the correct behavior
There is a prize :beer:

Hello @alefattorini I have tested this patch in my setup in these variations:

  1. login into POP3 account using user from Oultook 2016
  2. login into POP3 account using user@domain from Oultook 2016
  3. login into IMAP account using user from Oultook 2016
  4. login into IMAP account using user@domain from Oultook 2016
  5. login into POP3 account using user from Thunderbird 45.7.0
  6. login into POP3 account using user@domain from Thunderbird 45.7.0

all tests ‘passed’, couldn’t see anything unusual. Well done! Thanks!

4 Likes

Thanks man we really appreciate your contribution!

Released in nethserver-updates:
nethserver-mail-server-1.10.8-1.ns7.noarch.rpm