| Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-19-2012, 12:29 AM
|
#1
|
|
Member
Registered: Jul 2008
Location: Tallahassee, FL 32304
Distribution: Bebian Sid for server, KXStudio 12.04 Beta 1 for desktop
Posts: 33
Rep:
|
Dovecot config not compatible with the one in HowToForge
The article states that it's for Arch, but it should work for Debian Sid with the use of apt-get instead of pacman. Anyway, here's what I'm having trouble with.
Here's the article that I'm having trouble with:
http://www.howtoforge.com/arch-linux...ix-and-dovecot
Code:
apt-cache policy dovecot
root@debian-server:/home/grayson# apt-cache policy dovecot-common
dovecot-common:
Installed: 1:2.0.18-1
Candidate: 1:2.0.18-1
Version table:
1:2.1.4-1 0
1 http://ftp.us.debian.org/debian/ experimental/main amd64 Packages
*** 1:2.0.18-1 0
500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
100 /var/lib/dpkg/status
root@debian-server:/home/grayson# apt-cache policy dovecot-core
dovecot-core:
Installed: 1:2.0.18-1
Candidate: 1:2.0.18-1
Version table:
1:2.1.4-1 0
1 http://ftp.us.debian.org/debian/ experimental/main amd64 Packages
*** 1:2.0.18-1 0
500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
100 /var/lib/dpkg/status
root@debian-server:/home/grayson#
This is what I used to have from HowToForge with my changes from :
Code:
protocols = imap imaps
disable_plaintext_auth = yes
log_timestamp = "%b %d %H:%M:%S "
ssl = yes
ssl_cert_file = /etc/ssl/certs/graysonpeddie.crt
ssl_key_file = /etc/ssl/private/graysonpeddie.key
mail_location = maildir:~/Maildir
mail_access_groups = mail
auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@
protocol imap {
imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
}
auth default
{
mechanisms = plain
login passdb pam { }
userdb passwd { }
user = root
socket listen {
client {
path = /var/run/dovecot/auth-client
user = postfix
group = postfix
mode = 0660
}
}
}
Here's mine:
Code:
# 2.0.18: /etc/dovecot/dovecot.conf
# OS: Linux 3.3.0-rc6-amd64 x86_64 Debian wheezy/sid
protocols = imap
disable_plaintext_auth = yes
log_timestamp = "%b %d %H:%M:%S "
ssl = yes
ssl_cert = /etc/ssl/certs/graysonpeddie.crt
ssl_key = /etc/ssl/private/graysonpeddie.key
mail_location = maildir:~/Maildir
mail_access_groups = mail
auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234$
protocol imap {
imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
}
auth default {
auth_mechanisms = plain login
passdb = pam
userdb = password
socket listen {
client {
path = /var/run/dovecot/auth-client
user = postfix
group = postfix
mode = 0660
}
}
}
Well, here's what happened with dovecot -n:
Code:
# 2.0.18: /etc/dovecot/dovecot.conf
doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -n > dovecot-new.conf
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:15: add auth_ prefix to all settings inside auth {} and remove the auth {} section completely
doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 17: Unknown setting: auth_passdb
root@debian-server:/home/grayson#
I've been looking for the howto articles long and hard trying to find anything up-to-date (like 2012) and all I've been looking for is out-of-date articles as postfix -n told me to replace ssl_cert_file with ssl_cert, ssl_key_file with ssl_key, replace this with that, add auth_ prefix to everything inside the auth{} section and remove auth{} but dovecot complains even more with warnings, and this is getting very endless.
Is dovecot obsolete? Without any up-to-date howto guide for setting up dovecot, I'm confused.
Last edited by GraysonPeddie; 04-19-2012 at 12:51 AM.
Reason: I forgot to post a link to the article that is giving me trouble.
|
|
|
|
04-19-2012, 02:04 AM
|
#2
|
|
Senior Member
Registered: Mar 2012
Posts: 1,884
|
This is mine:
Code:
stargate:~# dovecot -n
# 1.2.15: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-5-686 i686 Debian 6.0.4
log_timestamp: %Y-%m-%d %H:%M:%S
login_dir: /var/run/dovecot/login
login_executable: /usr/lib/dovecot/imap-login
mail_privileged_group: mail
mbox_write_locks: fcntl dotlock
namespace:
type: private
separator: /
inbox: yes
list: yes
subscriptions: yes
auth default:
mechanisms: plain login
verbose: yes
passdb:
driver: pam
userdb:
driver: passwd
socket:
type: listen
client:
path: /var/spool/postfix/private/auth
mode: 432
user: postfix
group: postfix
Maybe you are using a dovecot 2.x conf instead of 1.2.x ...
|
|
|
|
04-19-2012, 04:15 AM
|
#3
|
|
Senior Member
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125
|
Quote:
Originally Posted by descendant_command
Maybe you are using a dovecot 2.x conf instead of 1.2.x ...
|
That was my thought too. If you are migrating from version 1, you will get warnings about certain functions being deprecated and, or not supported along with a message about "running dovecot -n" or something to that effect. What that will do is give you a cleaned up configuration file that converts the settings to the new format.
|
|
|
|
04-19-2012, 08:36 AM
|
#4
|
|
Member
Registered: Jul 2008
Location: Tallahassee, FL 32304
Distribution: Bebian Sid for server, KXStudio 12.04 Beta 1 for desktop
Posts: 33
Original Poster
Rep:
|
I've just installed dovecot afresh, not migrating. I'll give it a try.
Update: Would you mind posting your configuration file instead of dovecot -n? I'm not getting it about the ":" as it is expecting "=" instead.
Last edited by GraysonPeddie; 04-19-2012 at 08:55 AM.
|
|
|
|
04-19-2012, 10:02 AM
|
#5
|
|
Senior Member
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125
|
Here is my Dovecot2 configuration. As long as I created or copied the files in the correct directories, they had the proper context for SELinux. You will need to be careful of that and if you are using SELinux check with an ls -aZ. This was "cleaned up" by the auto modification tool from a Dovecot 1 configuration.
Code:
# 2.0.14: /etc/dovecot/dovecot.conf
auth_mechanisms = plain cram-md5 digest-md5
base_dir = /var/run/dovecot/
first_valid_uid = 5000
last_valid_uid = 5000
log_timestamp = "%Y-%m-%d %H:%M:%s "
mail_location = maildir:/var/mail/%d/%n
#managesieve_notify_capability = mailto
#managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date
passdb {
args = /etc/dovecot/dovecot-sql.conf
driver = sql
}
protocols = imap pop3
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
unix_listener auth-master {
group = mail
mode = 0660
user = vmail
}
#user = nobody
#Not sure about this one, it came from the Gentoo Wiki on Dovecot 2
user = root
}
service auth-worker {
# user = $default_internal_user
# remembered this from gentoo docs
user = root
unix_listener auth-worker {
user = postfix
}
}
service imap-login {
executable = /usr/libexec/dovecot/imap-login
inet_listener imap {
address = *
port = 143
}
inet_listener imaps {
address = *
port = 993
}
}
service imap {
executable = /usr/libexec/dovecot/imap
}
service pop3-login {
executable = /usr/libexec/dovecot/pop3-login
inet_listener pop3 {
address = *
port = 110
}
inet_listener pop3s {
address = *
port = 995
}
}
service pop3 {
executable = /usr/libexec/dovecot/pop3
}
ssl_cert = </etc/postfix/ssl.crt
ssl_key = </etc/postfix/ssl.key
userdb {
args = /etc/dovecot/dovecot-sql.conf
driver = sql
}
protocol imap {
imap_client_workarounds = tb-extra-mailbox-sep
imap_max_line_length = 64 k
}
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
}
protocol lda {
auth_socket_path = /var/run/dovecot/auth-master
postmaster_address = postmaster@
sendmail_path = /usr/lib/sendmail
}
|
|
|
|
04-19-2012, 10:49 AM
|
#6
|
|
Member
Registered: Jul 2008
Location: Tallahassee, FL 32304
Distribution: Bebian Sid for server, KXStudio 12.04 Beta 1 for desktop
Posts: 33
Original Poster
Rep:
|
Okay, I think I figured it out:
[code]passdb { example2 = example3 }
Code:
passdb
{
driver = pam
}
...and
Code:
passdb {
{
driver = pam }
all seem to give me errors, so the correct way to write code is:
Code:
passdb {
driver = pam
}
So after I fixed the problem, this is what I'm getting with dovecot -n:
Code:
# 2.0.18: /etc/dovecot/dovecot.conf
# OS: Linux 3.3.0-rc6-amd64 x86_64 Debian wheezy/sid
auth_mechanisms = plain login
mail_access_groups = mail
mail_location = maildir:~/Maildir
passdb {
driver = pam
}
protocols = imap
service auth {
unix_listener auth-client {
group = postfix
mode = 0660
user = postfix
}
user = root
}
ssl_cert = /etc/ssl/certs/graysonpeddie.crt
ssl_key = /etc/ssl/private/graysonpeddie.key
userdb {
driver = passdb
}
protocol imap {
imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
}
But then I'm still having problem:
Code:
root@debian-server:/home/grayson# ps aux | grep dovecot
root 5169 0.0 0.0 21448 920 ? Ss 11:47 0:00 /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf
dovecot 5171 0.0 0.0 12988 1016 ? S 11:47 0:00 dovecot/anvil
root 5172 0.0 0.0 13116 1140 ? S 11:47 0:00 dovecot/log
root 5175 0.0 0.0 22668 2312 ? S 11:47 0:00 dovecot/config
root 5181 0.0 0.0 7800 860 pts/0 S+ 11:47 0:00 grep dovecot
root@debian-server:/home/grayson# telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
root@debian-server:/home/grayson#
I am so new to Dovecot...
|
|
|
|
04-19-2012, 11:54 AM
|
#7
|
|
Senior Member
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125
|
I would recommend, if you haven't already, turning on debugging in Dovecot. There are about 3 different debugging methods and option in dovecot. I can't recall the off hand, but I think the man and wiki pages discuss them. You should be able to get some information from your mail log, with and without the debugging too.
|
|
|
|
04-19-2012, 01:24 PM
|
#8
|
|
Member
Registered: Jul 2008
Location: Tallahassee, FL 32304
Distribution: Bebian Sid for server, KXStudio 12.04 Beta 1 for desktop
Posts: 33
Original Poster
Rep:
|
Okay. Here is my configuration file for anyone to try out:
Code:
auth_mechanisms = plain login
mail_access_groups = mail
mail_location = maildir:~/Maildir
passdb {
driver = pam
}
protocols = imap
service auth {
unix_listener auth-client {
group = postfix
mode = 0660
user = postfix
}
user = root
}
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
userdb {
driver = passwd
}
protocol imap {
imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
}
This is very basic so it's not going to be that secure.
Once I've restarted Dovecot, here's what I got:
Code:
root@debian-server:/home/grayson# telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
Once I've changed the two lines for dovecot.pem to graysonpeddie.crt and graysonpeddie.key, it also worked. It turns out I have to add a < for both of the lines as shown in my code. Weird.
|
|
|
|
04-19-2012, 02:30 PM
|
#9
|
|
Senior Member
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125
|
Quote:
|
It turns out I have to add a < for both of the lines as shown in my code.
|
Now that you mention this, I recall running into this problem too. I think it generated an error message in the log file upon restart and I can't recall where I saw the "fix" documented at, but I think it is one of the new features unique to Dovecot 2, that should be an FAQ.
|
|
|
|
04-19-2012, 03:10 PM
|
#10
|
|
Member
Registered: Jul 2008
Location: Tallahassee, FL 32304
Distribution: Bebian Sid for server, KXStudio 12.04 Beta 1 for desktop
Posts: 33
Original Poster
Rep:
|
Hmm... It seems to me that the ampersand have been ignored.
By the way, it would be nice if the Debian Sid repository contains Dovecot 1 and Dovecot 2, but that is what I get for running Debian Sid as I like to stay in the bleeding edge of things, like Mono 2.10 and MythTV 0.25.  Otherwise, there needs to be howto articles for Dovecot 2 for those who are starting afresh and are using the latest version of their chosen distribution (like CentOS (not a rolling release) or Arch Linux).
|
|
|
|
All times are GMT -5. The time now is 07:13 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|