IMAP login problem only for new email accounts

ZMan

Member
May 23, 2003
18
0
151
I have a server which has been in operation for a couple of years. I am noticing with email accounts added since upgrading from 10.x to 11.10.0-R16448 this past week that these new email accounts are all receiving login failures on IMAP only. These login failures apply only to any email accounts which were created, not the main user account. POP3 login works fine for these same email accounts. Email accounts existing from before the upgrade still work fine through IMAP.

This server has not been upgraded to maildir / Courier and thus uses the old IMAP server. With the large number of mail accounts on this server I'd prefer to not have to just endure the upgrade to maildir just yet.

I have reviewed permissions on accounts that work versus the new accounts that don't and can't see any problems. Unfortunately nothing useful is logged to /var/log/maillog I have also tried /scripts/upcp but no newer version is available.

Has anyone else encountered this and found a way to fix it? If not a solution is there a way for me to get better insight into what imapd is doing (more verbose logging?). Something subtle has got to be different.

All new accounts are in /etc/userdomains /etc/trueuserdomains and /var/cpanel/users/* I just can't imagine where else it is looking for something that is causing these new email accounts to fail.

The imapd running on the server is:
-rwxr-xr-x 1 root root 1263505 Aug 19 14:32 /usr/local/cpanel/3rdparty/bin/imapd

Thanks!
 

ZMan

Member
May 23, 2003
18
0
151
I may have stumbled onto something. I was doing a 'strings' search of imapd to see what file paths it might be using to find things and noticed it looks in /etc/vmail for information. Well since upgrading, no entries have been added to /etc/vmail when a new account is created.

Are the entries in /etc/vmail no longer used in the newest Courier/maildir configuration and thus no longer updated? Or is something truly broken?
 

ZMan

Member
May 23, 2003
18
0
151
Posting what I am finding just in case it is helpful to anyone else:

Seems /scripts/resetimappasswds should do the trick but it doesn't for 2 reasons:

1. Its rm -f /etc/vmail/* can't handle the number of entries in the directory. Shouldn't be a show stopper though/

2. It calls /scripts/updateuserdomains However that code specifically doesn't do /etc/vmail updates unless you are running maildir? Looks like a bug to me:

Code:
    my $buildvmail = 0;
    if ( $cpconf->{'maildir'} ne '1' ) {
        print "Warning: deprecated mbox still in use. Please switch to maildir soon.\n";
    } else {
        if ( !-e '/etc/vmail/' ) {
            mkdir( '/etc/vmail/', 0755 );
            chown 0, 0, '/etc/vmail';
            $buildvmail = 1;
        }
        if ( ( stat('/etc/passwd') )[9] > ( stat('/etc/vmail') )[9] ) {
            $buildvmail = 1;
        }
       ... vmail rebuild here
    }
 

ZMan

Member
May 23, 2003
18
0
151
Replacing the missing /etc/vmail entries has fixed the problem.

The solution was to run a modified version of /scripts/updateuserdomains which was corrected to run the /etc/vmail updates regardless of whether maildir is or is not active.

Time to report this to cPanel :)