Okay, so today I decided to install qmail + vpopmail + mysql + courier on a RHES 4 machine. Well normally I have used the excellent source rpms from Qmail Toaster, but I was having lots of problems with them today and considering time was tight I would go ahead and use the sources.
Now I have known about Qmail Rocks for a long time now, but never really gotten around to testing the docs agains RHES 4, so today I thought would be my luck day.
Now I had actually setup the server with a partition for vpopmail of about 10GB for the amount of users that will be located on it. It also keeps my filesystem nice and tidy, yet standard enough for any other sysadmin to come along and figure out what is going on.
All went fine throughtout the install. In fact it was the easiest install I have ever done. All I did was copy and paste into my putty session the commands in bolded text. I then opened a browser, pointed it at the server and its vqadmin cgi and added a domain.
All was going well until I opened up the Qmailadmin page. When I typed in my postmaster password for the domain I kept getting an Invalid User error.
Okay so I looked at mysql and she was running sweetly, and the tables had all the correct info in them after vqadmin added the domain. There was nothing helpful in any of the log files, so I resorted to using the vpopmail command line tools to find out the problem.
When I ran vdominfo, I got all the info I expected, however when I ran vuserinfo postmaster@somedomain.com I kept getting the following error.
vmysql: can’t read settings from /home/vpopmail/etc/vpopmail.mysql
Strange I thought, one binary could read the files, the other could not. Anyhow, I googled, a bit but never cam across the right answer, which then began to freak me out. Its not often that I can’t find the answer with google. So I took a break for a wee while.
I cam back a few hours later, lit a smoke and said that this was not going to beat me. So I googled and gooogled and then yahooed and even dare I say it MSN’d it (yes I was going to extra low depths to solve the problem). Now I could have mailed the excellent and relavant maillists, but from the searching the one thing I did cop onto was that problems of this nature were common and so common in fact that anyone with a clue would not ask about them. So me not wanting to look like an idiot decided against that.
Finally I began to get somewhere. I twigged it was a permissions error early on, it was sorta obvious anyhow. But one mail I read (sorry can’t find it now) described a similar problem but with a different binary in the vpopmail toolkit and with a similar partition structure as mine. It was to do with suid permissions on the partition. Lo and behold when I looked at the fstab I had nosuid in the defintion for /home/vpopmail.
I quickly fixked that, and sensing I was close cd’d to the vpopmail bin dir to try my vuserinfo again.
./vuserinfo postmaster@somedomain.com
vmysql: can’t read settings from /home/vpopmail/etc/vpopmail.mysql
Bollix I thought. I lit yet another smoke and cruised over to Inter 7 again. The answer has to be here. Its the home of vpopmail. Surely some n00bie posted with the same error as me, got flamed, but then got a right answer and I can save face by not having to be the n00bie to post to the list……… well after searching though the mail list with the horrible htdig search engine, I was begining to think that I was going to be the n00bie.
The I said I would reread the inter 7 docs again and make sure, what Qmail rocks was trying to do and what inter7 advised you to do was right.
Well straight off, I spotted the error. The Install Doc advises a uid and a gid of 89, F*&@ I said, I remember this….. I had the same problem a year or so ago. The vpopmail and vchkpwd binarys should have the same uid and gid to work correctly. So I removed the users and groups Qmail Rocks had installed (7500 and 7509 for some reason??) and proceeded to do a rebuild. 6 min later I was ready to try again.
BINGO BABY! It worked! Well I thought to myself, sometimes the most experienced people make mistakes. But I suppose the moral of this is, if you learn something once, don’t forget it.
Anyhow, am posting this to show what an idiot I can be at times, you won’t always get the answer from google, you more than likley if you are not lazy have the answer but mostly, so I don’t forget again… Oh yeah and hopefull this will get indexed to hell by the search engines
*Shamed*