Welcome, Guest
Please Login or Register.
Lost Password?
postfix - dovecot problems (1 viewing)
Post Reply

TOPIC: postfix - dovecot problems

#3377
richardhuber (User)
Posts: 42
graphgraph
postfix - dovecot problems 2006/12/11 08:36  
hi there , i have a little problem with my email ..

first of all , some numbers ..

os : ubuntu 606
virtualmin 3.30

after a few problems with php4 and mysql ( need to reinstall both manually ) i get a new problem .

dovecot wont start with the message .... error in dovecot.conf line 648 unknown userdb

so i googled a bit around and found a solution .
old entry : userdb = passwd / passdb = passwd
i changed it to :
userdb passwd{ }
passdb passwd { }
now, dovecot starts normally , also i can use squirrelmail, to send and recive mails ( auth = plain , else dovecot wont start )
but, if i try to recive my mails by outlook or thunderbird , i get a message, that there is a timeout or a networkproblem ....

maybe someone has an idea, where to serch the misstake ...


greethings from switzerland :)

  The administrator has disabled public write access.
#3380
Tomtreas (User)
Posts: 16
graphgraph
Re: postfix - dovecot problems 2006/12/11 23:07  
I had similar trouble with Ubuntu 6.06 as well and Dovecot. Seem that the first time you click SAVE on the general configuration in Webmin for Dovecot it write those entries to the file and then it won't start. I too tried several things and then finally my resolution was somewhat different.

I went in search of a newer Dovecot playing on a hunch that this latest Webmin module might include things for a newer version. Sure enough. Ubuntu latest version of Dovecot supplied in the Ubuntu repositories is v1.0 beta3. The latest verion released of Dovecot is v1.0 RC15. I obtained the 3 .deb packages assocated with Dovecot and used dpkg -i to install them. That complained a little bit and then I did apt-get update and apt-get -force-yes upgrade. The finished the configurations on Dovecot.

Now, I can click save, those items go in the Dovecot config and it runs just fine.

Now I personally am running into problems with SMTP Auth in Postfix for sending from an outside client.

Joe has split out the Ubuntu stuff into a seperate package and is working on the modifications as I understand it. With a little time and luck, this'll all be a distant memory and all of the Ubuntoos will just work. :-) Good luck Joe!
  The administrator has disabled public write access.
#3381
Joe (Admin)
Posts: 4117
graph
Re: Re: postfix - dovecot problems 2006/12/12 00:19  
Hey guys,

Yep, the prelease of Dovecot isn't being correctly recognized by Webmin's Dovecot module. The 1.0 format is supported, but it detects it based on the appearance of the configuration file, and it doesn't seem to recognize this particular version as 1.0.

So, it's a subtle bug in Webmin, which I'll report to Jamie and it should be fixed in Webmin in the next release.

The problem with SASL authentication is that Postfix runs in a chroot environment on Debian/Ubuntu, but saslauthd isn't in that chroot! So the two can't talk to each other. Fixing this problem is relatively simple, I think (I'm working on incomplete information, as I haven't actually tested this yet). I believe the following steps will get things talking correctly:

mkdir -p /var/spool/postfix/var/run/saslauthd

And then edit /etc/default/saslauthd to set the following option as shown:

PARAMS="-m /var/spool/postfix/var/run/saslauthd -r"

Then, when you restart saslauthd and postfix they should be able to talk (again, I'm pretty sure, I need to test it).

It all feels kinda clunky, since all of our other platforms have this bit working out of the box. But Ubuntu is pretty slick in a lot of other areas, so we can forgive it this failing. I'll get this tested and made automatic during install very soon.

If this doesn't make things act normal, Tom, let me know and I'll dig some more.
  The administrator has disabled public write access.
#3382
Joe (Admin)
Posts: 4117
graph
Re: Re: Re: postfix - dovecot problems 2006/12/12 00:23  
Oops. I forgot a step. You'll want also want to remove the old /var/run/saslauthd and hardlink it to /var/spool/postfix/var/run/saslauthd.

Actually, now that I think of it, hardlinking the /var/spool/postfix/var/run/saslauthd to /var/run/saslauthd might work just as well without needing a third step.

So, I think we can replace the first step with:

ln /var/run/saslauthd /var/spool/postfix/var/run/saslauthd

Maybe. (Forgive all of my indecision on this...I'm going from reading lots of docs, and not much actual experimental evidence. The real world experience will come tomorrow, I hope.) ;-)
  The administrator has disabled public write access.
#3383
Tomtreas (User)
Posts: 16
graphgraph
Re: postfix - dovecot problems 2006/12/12 00:52  
Renamed /var/run/saslauthd to .bak then executed the command ln /var/run/saslauthd /var/spool/postfix/var/run/saslauthd

THis after doing steps one and two in the first email. Response from Dapper was:

root@ns1:/var/run# ln /var/run/saslauthd /var/spool/postfix/var/run/saslauthd
ln: `/var/run/saslauthd': hard link not allowed for directory
  The administrator has disabled public write access.
#3385
Tomtreas (User)
Posts: 16
graphgraph
Re: postfix - dovecot problems 2006/12/12 00:56  
UPDATE: Even without the hardlink (and the OOPS part) ;) it's working now!
  The administrator has disabled public write access.
#3384
Joe (Admin)
Posts: 4117
graph
Re: Re: postfix - dovecot problems 2006/12/12 00:59  
Oops... Righto. Can't hard link a directory, indeed.

Somewhere in the back of my mind, I knew there was a reason for doing it the first way, and then symlinking in the other direction.

So, ignore the second, incorrect advice, and redo the first step.

Then create a symbolic link for /var/run/saslauthd.

ln -s /var/spool/postfix/var/run/saslauthd /var/run/saslauthd

I think that'll work. The /var/run thing it just so that the initscript and Webmin knows whether Dovecot is running (since they expect the pid file to be in /var/run/saslauthd). Complicated.

chroots are often pretty complex. If postfix didn't have an absolutely stellar security history I would say it's worth it. But since it does have a stellar security record, I can't say it's worth the extra hassle and complexity. But we'll get it all invisible to the user soon enough, and only I'll have to think about the added complexity. ;-)
  The administrator has disabled public write access.
#3386
Joe (Admin)
Posts: 4117
graph
Re: Re: Re: postfix - dovecot problems 2006/12/12 01:03  
Oh, and I'll mention for those who might be interested, the reason we can't just symlink the /var/run directory into the postfix chroot is because symlinks don't work from within a chroot to files outside of the chroot. (But they can go into a chroot from outside of it...so for those services outside of the chroot, like Webmin and the initscript, the symlink in /var/run will work fine.)
  The administrator has disabled public write access.
#3387
Joe (Admin)
Posts: 4117
graph
Re: Re: postfix - dovecot problems 2006/12/12 01:06  
UPDATE: Even without the hardlink (and the OOPS part) ;) it's working now!

Rock! Thanks for the update. That makes my job easier. I'll just plug that change into the installer and have it rolled out by tomorrow.

The "even without the hardlink" is right, to a degree. The link was intended to make the initscript and other various bits capable of checking the PID of the Dovecot process. I think Webmin wants to see it, as well. So, when you need to restart, check status, etc. of your Dovecot process, I suspect it needs the symbolic link in /var/run. I'm not certain of that, though. ;-)
  The administrator has disabled public write access.
#3388
Tomtreas (User)
Posts: 16
graphgraph
Re: Re: Re: Re: postfix - dovecot problems 2006/12/12 01:07  
Hmmm.. I guess when it was working it just ignored that I was sending a username and password then for SMTP before I created the symlink back. I created that symlink and then restarted saslauthd and postfix and then it wouldn't accept my username and password again. :( I know you are testing stuff tomorrow (or later today in my case now) so it's kewl. I gotta get some sleep anyhow right now. :)

Thanks again for everything Joe! :)
  The administrator has disabled public write access.
Post Reply
get the latest posts directly to your desktop

Talk and Get Help

Support
Forums
Bugs and Issues

Get Virtualmin

OS Support
Buy Online
Download
Copyright 2005-2007 Virtualmin, Inc. All rights reserved.