LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Dovecot refuses to authenticate after time-glitch shutdown (https://www.linuxquestions.org/questions/linux-server-73/dovecot-refuses-to-authenticate-after-time-glitch-shutdown-4175412482/)

OsakaWebbie 06-20-2012 09:40 AM

Dovecot refuses to authenticate after time-glitch shutdown
 
I have postfix and dovecot on a CentOS5 VPS. For some unknown reason, in the middle of the night one night the system clock lept forward and then back again, and when it went back, dovecot shut down (TimeMovedBackwards complaint). Okay, fine, so I started it again. But ever since then, I get "Authentication failed" from the server whenever I try to POP my mail. Dovecot seems to be running, but it refuses to let me in.

I set up the server about a year ago and don't remember all the details, but no doubt following some tutorial, I configured it to authenticate against the file /var/spool/vmail/mydomain/passwd. I tried changing that setting to authenticate against the system shadow file (and I reset my system password to make sure it matched what is in Thunderbird), but that didn't help. Does someone have a suggestion as to where to look for problems, or what troubleshooting steps to take? I have Webmin, and can also just check whatever via SSH.

OsakaWebbie 06-26-2012 07:40 AM

Any ideas? Manual mail checking is getting old... :( Also, because of the same lack of authentication I can't send from that account either.

I'm happy to share info from logs, configuration files, etc., if you'll tell me what you need to see.

OsakaWebbie 07-01-2012 03:40 AM

Ah, come on - no one even has a suggestion as to where on my server to look for anomalies? I chose this forum community because it looked like it had a lot of activity, but my first question is either not phrased to attract attention or has stumped everyone...

descendant_command 07-01-2012 04:27 AM

Probably checking /var/log/dovecot.err and dovecot.info (or wherever they are on centOS) may shed some light on the issue.

OsakaWebbie 07-01-2012 09:28 AM

Thanks for responding - it's nice to know there isn't a plot to give me the silent treatment! ;)

I had already looked at the email logs - that was how I figured out that time had done a weird thing and that was the reason dovecot had shut down. As for the two files you mentioned, there are no files named like that anywhere on my server. The only file starting with "dovecot" and sounding like a log of any kind is /home/user/mail/.imap/INBOX/dovecot.index.log. (The "INBOX" in that path is not actually used for any mail, because I don't use IMAP). The timestamp on that file is the night before the incident happened (matching one of the last times I checked mail successfully, although interestingly not the very last time), so that's not relevant.

The maillog entries that are relevant are:
Code:

Jun  6 01:44:21 myVPS postfix/postfix-script: stopping the Postfix mail system
Jun  6 01:44:21 myVPS postfix/master[1607]: terminating on signal 15
Jun  6 01:44:21 myVPS dovecot: Killed with signal 15
Jun  6 14:06:35 myVPS dovecot: Dovecot v1.0.7 starting up
Jun  6 14:07:03 myVPS postfix/postfix-script: starting the Postfix mail system
Jun  6 14:07:06 myVPS postfix/master[722]: daemon started -- version 2.3.3, configuration /etc/postfix
Jun  6 05:07:00 myVPS dovecot: Time just moved backwards by 32417 seconds. This might cause a lot of problems, so I'll just kill myself now. http://wiki.dovecot.org/TimeMovedBackwards

When I discovered it a couple hours later, I restarted dovecot, but after that I was always refused authentication, with a maillog entry like this:
Code:

Jul  1 23:04:14 myVPS dovecot: pop3-login: Disconnected: user=<myuser>, method=PLAIN, rip=::ffff:IP.of.my.ISP, lip=::ffff:IP.of.my.server, TLS
I have no idea why postifx and dovecot shut down at 1:44, or why sometime while they were shut down the system time jumped forward (presumably by the same 9 hours that it then jumped backward right after postfix and dovecot restarted themselves). The server did not reboot.


All times are GMT -5. The time now is 02:55 PM.