View previous topic :: View next topic |
Author |
Message |
TheNewb Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 10 Jun 2005 Posts: 183
|
Posted: Wed Feb 15, 2006 12:20 am Post subject: Power failed - Qmail corrupted. What next? [closed] |
|
|
Well, other knocks at my inexperience with file systems aside, I am trying to get the email services back online.
Running qmail, vpopmail, courrier-imap.
This morning when power failed, after the file system check all email services were rejected. No user accoutns showed in qmail admin, and all attempts to connect are rejected.
All the data in /var/vpopmail/domains/ iseems to be intact, valias still lists proper aliases.
I've done a search on recovering the system, but I can't find any good documents... where do I start? _________________ #define struct union /* A Real space saver! */
Last edited by TheNewb on Sat Mar 11, 2006 11:41 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
TheNewb Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 10 Jun 2005 Posts: 183
|
Posted: Wed Feb 15, 2006 12:48 am Post subject: |
|
|
I re-emerged qmail, vpopmail, courior-imap and that fixed the email accoutns not showing up...
But no one can log in in imap or pop3.. Unknown if outgoing mail is down... Any helps where to go? _________________ #define struct union /* A Real space saver! */ |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Rüpel Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/344149032421f104417121.gif)
Joined: 06 Nov 2002 Posts: 316 Location: Berlin/Germany
|
Posted: Wed Feb 15, 2006 9:26 am Post subject: |
|
|
are the ports open? (netstat -tuanp)
what do the logfiles tell you? _________________ :wq |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
TheNewb Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 10 Jun 2005 Posts: 183
|
Posted: Wed Feb 15, 2006 2:50 pm Post subject: |
|
|
The ports are still open...
/var/log/qmail/qmail-smtpd/current shows that incomming emails are still being processed properly..
I don't know where to find a more detailed log for pop3/imap, /var/log/messages has lines like these:
Code: |
Feb 15 00:14:23 server imapd: LOGIN FAILED, user=postmaster@domain.com, ip=[::ffff:127.0.0.1]
Feb 15 00:14:28 server imapd: LOGOUT, ip=[::ffff:127.0.0.1]
Feb 15 00:14:42 server pop3d: Connection, ip=[::ffff:192.167.1.135]
Feb 15 00:14:46 server pop3d: LOGIN FAILED, user=user@domain.com, ip=[::ffff:192.167.1.135]
|
IMAP clients say invalid user or password, pop3 just says Login Failed..
qmail-admin now correctly shows the users and their space usage.
At least I know SOME of it is working back there.. _________________ #define struct union /* A Real space saver! */ |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
clintar n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 15 Dec 2005 Posts: 30
|
Posted: Sat Feb 18, 2006 3:10 am Post subject: |
|
|
If you are using mysql for keeping the vpopmail login info, which would be the case if you followed the howto, then you should probably try to repair your mysql tables. Not sure where to look to tell which would be corrupted at the moment, but you would run as root
Code: | # mysql -p
mysql> select database vpopmail;
mysql> use vpopmail;
mysql> repair table vlog;
|
That's just an example. There's also the tables dirlog, lastauth, limits, relay, valias, and vpopmail. Might just want to run the repair on all of them. Hope it helps. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
TheNewb Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 10 Jun 2005 Posts: 183
|
Posted: Sun Feb 19, 2006 4:26 pm Post subject: |
|
|
Checking the database was on my list of initial things I did... Although I hadn't thought of rebuilding the tables since the browsing of them worked okay.
Rebuilt all the tables.. also recompiled checkpassword cmd5checkpw queue-fix dot-forward and daemontools, and still don't have any luck... Arrrgh... _________________ #define struct union /* A Real space saver! */ |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
clintar n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 15 Dec 2005 Posts: 30
|
Posted: Mon Feb 20, 2006 4:44 pm Post subject: |
|
|
Make sure to recompile courier-authlib after vpopmail gets updated, FYI. Don't know if that falls in line with what you're seeing, but it's bitten me a few times. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
TheNewb Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 10 Jun 2005 Posts: 183
|
Posted: Mon Feb 20, 2006 5:14 pm Post subject: |
|
|
Tried rebuilding courier-authlib a couple times... tried it again for good measure! (Trying everything I can!)
I tested if outgoing email is functioning, and it isn't. I can send a email to locations ON the server, but a valid recipient from the email server gets the following error:
Code: | Sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1). Please verify that your email address is correct in your Mail Preferences and try again. |
_________________ #define struct union /* A Real space saver! */ |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
TheNewb Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 10 Jun 2005 Posts: 183
|
Posted: Mon Feb 20, 2006 5:28 pm Post subject: |
|
|
Okay, NOW I've found a meaningful error and am not shooting as much in the dark.
I modified /etc/courier/authlib/authdaemonrc and changed debug login to 1 instead of zero,
Tried to collect a message and found this in /var/log/messages:
Code: | Feb 20 10:23:03 richie pop3d: Connection, ip=[::ffff:192.168.1.135]
Feb 20 10:23:09 richie authdaemond: received auth request, service=pop3, authtype=login
Feb 20 10:23:09 richie authdaemond: FAIL, all modules rejected
Feb 20 10:23:09 richie pop3d: LOGIN FAILED, user=user@domain.com, ip=[::ffff:192.168.1.135]
Feb 20 10:23:16 richie pop3d: Disconnected, ip=[::ffff:192.168.1.135] |
_________________ #define struct union /* A Real space saver! */ |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
clintar n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 15 Dec 2005 Posts: 30
|
Posted: Mon Feb 20, 2006 6:09 pm Post subject: |
|
|
I'd do the check in code listing 3.3 and see what that returns. Maybe it's a permissions issue that needs to be fixed as in listing 3.2. I'd at least go over the vpopmail/auth stuff in that howto to make sure things look right.
http://www.gentoo.org/doc/en/qmail-howto.xml |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
TheNewb Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 10 Jun 2005 Posts: 183
|
Posted: Wed Feb 22, 2006 2:21 am Post subject: |
|
|
Gone over everything in the permissions, and it's working as far as the command line goes. The permissions list okay, the text-hit to try and log in logs a successful log in... but it's still not working.
This might be related, but outgoing email no longer functions as well. It's telling clients that the recipient is invalid or something... _________________ #define struct union /* A Real space saver! */ |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
TheNewb Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 10 Jun 2005 Posts: 183
|
Posted: Wed Feb 22, 2006 11:06 pm Post subject: |
|
|
Is there any way I can find out what modules authdeamon is using? that might give me some clue where to look for more info. I'm suspecting a config file is damaged somewhere, as I've recompiled as much as I can think of.. I still can't figure out what I'm missing. _________________ #define struct union /* A Real space saver! */ |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kands Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/Marvel/Marvel_-_Wolverine.gif)
Joined: 01 Apr 2003 Posts: 138 Location: Vancouver Island, Canada
|
Posted: Wed Feb 22, 2006 11:13 pm Post subject: |
|
|
I've had systems go down like yours and it can range from no problem to disasterous depending what is happening on the system when it goes down. Have you done any filesystem integrity checks? You may want to do that before you proceed to ensure that nothing is wrong at a low level. This can often detect corrupt files etc. _________________ http://www.brokenspoke.ca
Have you broken your spoke today? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
clintar n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 15 Dec 2005 Posts: 30
|
Posted: Thu Feb 23, 2006 12:37 am Post subject: |
|
|
That howto goes over the courier-authdaemon config files and what goes in them. Check those. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
TheNewb Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 10 Jun 2005 Posts: 183
|
Posted: Sun Feb 26, 2006 6:34 pm Post subject: |
|
|
I found a problem hidden away in /etc/courier/authlib/authdaemonrc ...
So now all the users are able to log in and collect their old emails that have been building up. But in that same stroke, I think I broke something else. Now ALL incomming emails are bounced saying no such mail box, and no one can send outgoing mail. The outgoing messages give this error (On pop3, Imap gives no error):
Code: | Sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1). Please verify that your email address is correct in your Mail Preferences and try again. |
What did I break? Where do I look to fix it? _________________ #define struct union /* A Real space saver! */ |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
clintar n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 15 Dec 2005 Posts: 30
|
Posted: Tue Feb 28, 2006 9:06 pm Post subject: |
|
|
First thing I'd check is rcpthosts in /var/qmail/control. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
TheNewb Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 10 Jun 2005 Posts: 183
|
Posted: Wed Mar 01, 2006 5:46 pm Post subject: |
|
|
Checking /var/qmail/control for anything goofy in rcpthosts, I noticed some extra .lock files including rcpthosts.lock.
I moved them to a temp-trash folder and it's now accepting email connections and processing emails. But EVERYTHING is being bounced. Like there's no email accoutns at all... qmailadmin shows all accoutns and forwards intact.
The code at 2.5 on http://www.gentoo.org/doc/en/qmail-howto.xml for using qmail-inject does work... but incomming emails all get bounced.
Although it gets even messier if the email is from one user to another user on the same server...
Here's from /var/log/qmail-send/current:
Code: |
@400000004405dc14109ecc84 new msg 7782498
@400000004405dc14109fe9ac info msg 7782498: bytes 599 from <user1@domain.com> qp 16093 uid 201
@400000004405dc1410d90aac starting delivery 1: msg 7782498 to local user2@domain.com
@400000004405dc1410d91664 status: local 1/10 remote 0/20
@400000004405dc1410d91a4c delivery 1: failure: Sorry,_no_mailbox_here_by_that_name._(#5.1.1)/
@400000004405dc1410d91e34 status: local 0/10 remote 0/20
@400000004405dc1410e32884 bounce msg 7782498 qp 16096
@400000004405dc1410e32c6c end msg 7782498
@400000004405dc1410e9eee4 new msg 7782899
@400000004405dc1410e9f2cc info msg 7782899: bytes 1176 from <> qp 16096 uid 206
@400000004405dc14114f82cc starting delivery 2: msg 7782899 to local user1@domain.com
@400000004405dc14114f8e84 status: local 1/10 remote 0/20
@400000004405dc14114f926c delivery 2: failure: Sorry,_no_mailbox_here_by_that_name._(#5.1.1)/
@400000004405dc14114f9654 status: local 0/10 remote 0/20
@400000004405dc141155cc2c bounce msg 7782899 qp 16099
@400000004405dc141155d014 end msg 7782899
|
On a side note... As frustrated as I am over all this.. I just wanted to make sure I said thank you, all of you...
Hopefully, I'm learning a lot! _________________ #define struct union /* A Real space saver! */ |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
clintar n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 15 Dec 2005 Posts: 30
|
Posted: Wed Mar 01, 2006 6:43 pm Post subject: |
|
|
Check in /var/qmail/control/conf-smtpd
for
QMAIL_SMTP_CHECKPASSWORD="/var/vpopmail/bin/vchkpw"
and also check section 2.6 and 2.7 for what goes in those files. One note though, in 2.7, i had to have domain.com instead of mail.domain.com in rcpthosts for it to work for us. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
TheNewb Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 10 Jun 2005 Posts: 183
|
Posted: Sat Mar 11, 2006 7:43 am Post subject: |
|
|
Hmmm...
Since I have a liscense to VMware, I decided to try installing qmail on a guest copy of Gentoo (A whole other set of issues on that, but I found my way through them.), and figure out when it's working with the default configuration, compare config files and see what's broken.
Good plan... but when I finally finished getting qmail installed, the guest-OS is doing the exact same thing... Refusing to deliver mail to valid mail boxes.
It IS delivering mail to users with a valid .maildir in their home directory, but NOT for users who have accoutns in vpopmail/qmailadmin...
Both versions are doing exactly the same thing now so my original issue of the server corruption has I think been solved.
Now I have to figure out why it's not working. Eeeek! Hopefully there's something about this in another post... _________________ #define struct union /* A Real space saver! */ |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
PaveQ Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 11 Feb 2005 Posts: 225 Location: Finland
|
Posted: Sat Mar 11, 2006 9:04 am Post subject: |
|
|
UPS, backup? ![Shocked 8O](images/smiles/icon_eek.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
TheNewb Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 10 Jun 2005 Posts: 183
|
Posted: Sat Mar 11, 2006 4:04 pm Post subject: |
|
|
Wasn't before... there is now you bet ya! _________________ #define struct union /* A Real space saver! */ |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
TheNewb Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 10 Jun 2005 Posts: 183
|
Posted: Sat Mar 11, 2006 11:40 pm Post subject: |
|
|
Since the original post was about solving corruption... and now the problem is a vpop mail failure on a default installation... I'm going to consider this thread closed and start a new one for the new issue... _________________ #define struct union /* A Real space saver! */ |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|