LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   need help with getting Dovecot mail server to work (https://www.linuxquestions.org/questions/linux-server-73/need-help-with-getting-dovecot-mail-server-to-work-629231/)

steve51184 03-19-2008 11:27 AM

need help with getting Dovecot mail server to work
 
hi i've tried to get Dovecot mail server to work and the install went ok but when i run "/etc/init.d/dovecot start" i get this error:

Code:

Error: Error in configuration file /etc/dovecot/dovecot.conf line 762: Auth section not allowed here (section changed at line 762)
Fatal: Invalid configuration in /etc/dovecot/dovecot.conf

and here's my (default) dovecot.conf file:
http://paste-it.net/7441

os: ubuntu server 7.1

rayfordj 03-19-2008 01:39 PM

is it possibly due to the auth default2 { defined immediately above (line 760)?

Code:

#
auth default2 {

 
auth default {


steve51184 03-19-2008 01:43 PM

that was done from this guide in part 3c

rayfordj 03-19-2008 02:57 PM

If i'm reading that article correctly it would look like this:
Code:

auth default {
mechanisms = plain login
passdb pam {
}
userdb passwd {
}
socket listen {
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}

auth default2 {

what i meant by my previous statement is you are not closing the 'auth default2' stanza before you open your 'auth default' stanza.

by doing the above you are using the already existing closing } that is "buried" further down past the comments and default settings.

steve51184 03-19-2008 04:26 PM

Quote:

Originally Posted by rayfordj (Post 3094184)
If i'm reading that article correctly it would look like this:
Code:

auth default {
mechanisms = plain login
passdb pam {
}
userdb passwd {
}
socket listen {
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}

auth default2 {

what i meant by my previous statement is you are not closing the 'auth default2' stanza before you open your 'auth default' stanza.

by doing the above you are using the already existing closing } that is "buried" further down past the comments and default settings.

but that code you just posted is what i have.. or am i missing something? (ie what should it look like?)

billymayday 03-19-2008 04:50 PM

What he means is try changing

Code:

auth default2 {
to

Code:

auth default2 {

}

Note the additional "}"

steve51184 03-19-2008 05:05 PM

Quote:

Originally Posted by billymayday (Post 3094263)
What he means is try changing

Code:

auth default2 {
to

Code:

auth default2 {

}

Note the additional "}"

thanks for replying but that give the same error but for line 774 instead of line 762

http://paste-it.net/7447

billymayday 03-19-2008 05:18 PM

Try commenting out lines 774-776

if that doesn't work, do you still have a copy of the default dovecot.conf? If so, my the version you've been working on to a saved version (say dovecot.conf.sav) and copy the default to dovecot.conf. It should work out of the box anyway (except you may want to change the protocols section to imap and pop)

steve51184 03-19-2008 05:31 PM

Quote:

Originally Posted by billymayday (Post 3094284)
Try commenting out lines 774-776

if that doesn't work, do you still have a copy of the default dovecot.conf? If so, my the version you've been working on to a saved version (say dovecot.conf.sav) and copy the default to dovecot.conf. It should work out of the box anyway (except you may want to change the protocols section to imap and pop)

that gives this error:

Code:

Error: Error in configuration file /etc/dovecot/dovecot.conf line 781: Unknown setting: mechanisms
Fatal: Invalid configuration in /etc/dovecot/dovecot.conf


rayfordj 03-19-2008 05:33 PM

in the default config file (before your modifications) it has

auth default {

# some comments
#
some values {
stuff
}
#comments
#comments

#and eventually closes the 'auth default' stanza with
}

so when you put your copy/paste under and rename the above to auth default2 you are placing an auth in an auth which does not work.

what you want to do is take the code that you pasted into (under) the auth default2 and move it above the (now named) auth default2 line.


http://paste-it.net/7449

billymayday 03-19-2008 05:35 PM

Did you try my other suggestion of the default config?

Where did the version you are using come from? It sounds like you have the wrong version for the dovecot version you are trying to run. Definitely try the original config that came with dovecot

steve51184 03-19-2008 05:48 PM

Quote:

Originally Posted by rayfordj (Post 3094297)
in the default config file (before your modifications) it has

auth default {

# some comments
#
some values {
stuff
}
#comments
#comments

#and eventually closes the 'auth default' stanza with
}

so when you put your copy/paste under and rename the above to auth default2 you are placing an auth in an auth which does not work.

what you want to do is take the code that you pasted into (under) the auth default2 and move it above the (now named) auth default2 line.


http://paste-it.net/7449

that's works but i get a new error:

Code:

Error: Can't use mail executable /usr/lib/dovecot/pop3: No such file or directory
Fatal: Invalid configuration in /etc/dovecot/dovecot.conf

seems i need to set that link to the correct file?

billymayday 03-19-2008 05:57 PM

How did you install dovecot?

steve51184 03-19-2008 06:14 PM

seems i missed the second command from this guide:

http://www.mysql-apache-php.com/#mailserver

apt-get install dovecot-imapd dovecot-pop3d dovecot-common

all working now :)

rayfordj 03-19-2008 06:24 PM

Good to hear!


All times are GMT -5. The time now is 10:43 AM.