Jump to content
Froxlor Forum
  • 0

dovecot configuration problem


jogr

Question

Hello

 

everything wokrs fine, without dovecot.

All mails are stored as shown:

root@myserver /var/kunden/mail/customer1/qwer@customerdomain.de # ls
cur  mail  new  tmp
root@myserver /var/kunden/mail/customer1/qwer@customerdomain.de # ls new
1286357457.V804I1920023M594749.myserver.de  1286471258.V804I1920037M751233.myserver.de  1286472976.V804I192003aM522949.myserver.de
1286469360.V804I1920034M105213.myserver.de  1286472045.V804I1920039M73313.myserver.de   1286473817.V804I192003cM858630.myserver.de
root@myserver /var/kunden/mail/customer1/qwer@customerdomain.de #

 

But it seems, that dovecot could not reach this directory

Oct  7 19:59:32 myserver dovecot: pop3-login: Login: user=<qwer@customerdomain.de>, method=PLAIN, rip=77.11.175.238, lip=178.63.yyy.xx
Oct  7 19:59:33 myserver dovecot: POP3(qwer@customerdomain.de): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0

 

If I set mail_location to maildir (as described here: http://wiki1.dovecot...indMailLocation ), a subdirectory Maildir is set under /var/kunden/mail/customer1/qwer@customerdomain.de, but postfix will not deliver its mail there.

 

I think, my problem will be solved if I can persuade postfix to store its mail under /var/kunden/mail/customer1/qwer@customerdomain.de/Maildir, or if I make dovecot to hold mails from /var/kunden/mail/customer1/qwer@customerdomain.de, but I can't see the way to realise one of the two ways.

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

Perhaps I am using wrong use-Flags to get autodetect working

 /etc # less /etc/portage/package.use | grep dovecot
mail-mta/postfix            	ipv6 mysql -sasl ssl vda dovecot-sasl
net-mail/dovecot            	bzip2 doc ipv6 maildir managesieve mysql sieve ssl zlib ssl debug pop3d mbox
#www-apps/syscp         		bind domainkey dovecot log mailquota ssl tickets
www-apps/froxlor            	aps autoresponder bind dovecot ftpquota log mailquota ssl tickets awstats

 

If it might help, I can (re-)post dovecot.conf and dovecot-sql.conf.

Link to comment
Share on other sites

mail-mta/postfix-2.6.6  dovecot-sasl hardened ipv6 mysql pam sasl ssl vda -cdb -ldap -mbox -nis -postgres (-selinux)
net-mail/dovecot-1.2.15 maildir managesieve mysql pam sieve ssl zlib -berkdb -caps -cydir -dbox -doc -ipv6 -kerberos -ldap -mbox -postgres -sqlite -suid -vpopmail

Link to comment
Share on other sites

Ok, I've set my use flags to yours.

When I cut out mail_location I got:

Oct 13 14:48:25 myserver amavis[12460]: Net::Server: 2010/10/13-14:48:25 Server closing!
Oct 13 14:48:25 myserver amavis[25766]: (25766-01) smtp session rundown all sessions, idle 833.9 s, smtp:[127.0.0.1]:10025, state ehlo
Oct 13 14:48:25 myserver amavis[25766]: (25766-01) smtp session rundown, closing session smtp:[127.0.0.1]:10025
//starting dovecot with new use flags and active mail_location
Oct 13 14:48:57 myserver dovecot: Dovecot v1.2.15 starting up (core dumps disabled)
Oct 13 14:48:57 myserver dovecot: auth-worker(default): mysql: Connected to localhost (froxlor)
Oct 13 14:49:17 myserver postfix/smtpd[19681]: connect from mail-fx0-f47.google.com[209.85.161.47]
Oct 13 14:49:17 myserver postfix/smtpd[19681]: B2B622A8025: client=mail-fx0-f47.google.com[209.85.161.47]
Oct 13 14:49:17 myserver postfix/cleanup[19689]: B2B622A8025: message-id=<AANLkTinKhN88Br5Pb8_P6PsNxG+otDcbfN6aNHnUJXGT@mail.gmail.com>
Oct 13 14:49:17 myserver postfix/qmgr[26729]: B2B622A8025: from=<my.adress@googlemail.com>, size=2111, nrcpt=1 (queue active)
Oct 13 14:49:21 myserver postfix/smtpd[19730]: connect from localhost[127.0.0.1]
Oct 13 14:49:21 myserver postfix/smtpd[19730]: C32062A8027: client=localhost[127.0.0.1]
Oct 13 14:49:21 myserver postfix/cleanup[19689]: C32062A8027: message-id=<AANLkTinKhN88Br5Pb8_P6PsNxG+otDcbfN6aNHnUJXGT@mail.gmail.com>
Oct 13 14:49:21 myserver postfix/qmgr[26729]: C32062A8027: from=<my.adress@googlemail.com>, size=3073, nrcpt=1 (queue active)
Oct 13 14:49:21 myserver postfix/lmtp[19691]: B2B622A8025: to=<qwer@customer_domain.de>, relay=127.0.0.1[127.0.0.1]:10024, delay=4.1, delays=0.04/0/0/4.1, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=19896-01, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as C32062A8027)
Oct 13 14:49:21 myserver postfix/qmgr[26729]: B2B622A8025: removed
Oct 13 14:49:21 myserver postfix/virtual[20138]: C32062A8027: to=<qwer@customer_domain.de>, relay=virtual, delay=0.12, delays=0.01/0/0/0.11, dsn=2.0.0, status=sent (delivered to maildir)
Oct 13 14:49:21 myserver postfix/qmgr[26729]: C32062A8027: removed
Oct 13 14:49:47 myserver postfix/smtpd[19681]: disconnect from mail-fx0-f47.google.com[209.85.161.47]
Oct 13 14:50:01 myserver postfix/postfix-script[20207]: refreshing the Postfix mail system
Oct 13 14:50:01 myserver postfix/master[13914]: reload -- version 2.6.6, configuration /etc/postfix
Oct 13 14:50:01 myserver postfix/anvil[20116]: statistics: max connection rate 1/60s for (smtp:209.85.161.47) at Oct 13 14:49:17
Oct 13 14:50:01 myserver postfix/anvil[20116]: statistics: max connection count 1 for (smtp:209.85.161.47) at Oct 13 14:49:17
Oct 13 14:50:01 myserver postfix/anvil[20116]: statistics: max cache size 1 at Oct 13 14:49:17
Oct 13 14:50:07 myserver dovecot: imap-login: Login: user=<qwer@customer_domain.de>, method=PLAIN, rip=93.212.33.106, lip=178.63.xxx.xxx, TLS
//starting dovecot without setting mail_location to test if autodetect will work
Oct 13 14:52:30 myserver dovecot: Dovecot v1.2.15 starting up (core dumps disabled)
Oct 13 14:52:30 myserver dovecot: auth-worker(default): mysql: Connected to localhost (froxlor)
Oct 13 14:52:39 myserver postfix/smtpd[20338]: connect from mail-fx0-f47.google.com[209.85.161.47]
Oct 13 14:52:39 myserver postfix/smtpd[20338]: B15EE2A8025: client=mail-fx0-f47.google.com[209.85.161.47]
Oct 13 14:52:39 myserver postfix/cleanup[20348]: B15EE2A8025: message-id=<AANLkTiniMKKktMN8g9K0a=ydky-D+Johe6LK2wFfs2MT@mail.gmail.com>
Oct 13 14:52:39 myserver postfix/qmgr[20212]: B15EE2A8025: from=<my.adress@googlemail.com>, size=2113, nrcpt=1 (queue active)
Oct 13 14:52:43 myserver postfix/smtpd[20365]: connect from localhost[127.0.0.1]
Oct 13 14:52:43 myserver postfix/smtpd[20365]: C8CDB2A8027: client=localhost[127.0.0.1]
Oct 13 14:52:43 myserver postfix/cleanup[20348]: C8CDB2A8027: message-id=<AANLkTiniMKKktMN8g9K0a=ydky-D+Johe6LK2wFfs2MT@mail.gmail.com>
Oct 13 14:52:43 myserver postfix/qmgr[20212]: C8CDB2A8027: from=<my.adress@googlemail.com>, size=3075, nrcpt=1 (queue active)
Oct 13 14:52:43 myserver postfix/lmtp[20350]: B15EE2A8025: to=<qwer@customer_domain.de>, relay=127.0.0.1[127.0.0.1]:10024, delay=4.1, delays=0.04/0/0/4.1, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=19898-01, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as C8CDB2A8027)
Oct 13 14:52:43 myserver postfix/qmgr[20212]: B15EE2A8025: removed
Oct 13 14:52:43 myserver postfix/virtual[20366]: C8CDB2A8027: to=<qwer@customer_domain.de>, relay=virtual, delay=0.12, delays=0.01/0/0/0.1, dsn=2.0.0, status=sent (delivered to maildir)
Oct 13 14:52:43 myserver postfix/qmgr[20212]: C8CDB2A8027: removed
Oct 13 14:53:05 myserver dovecot: imap-login: Login: user=<qwer@customer_domain.de>, method=PLAIN, rip=93.212.33.106, lip=178.63.xxx.xxx, TLS
Oct 13 14:53:06 myserver dovecot: imap-login: Login: user=<qwer@customer_domain.de>, method=PLAIN, rip=93.212.33.106, lip=178.63.xxx.xxx, TLS
Oct 13 14:53:09 myserver postfix/smtpd[20338]: disconnect from mail-fx0-f47.google.com[209.85.161.47]
Oct 13 14:53:16 myserver dovecot: imap-login: Login: user=<qwer@customer_domain.de>, method=PLAIN, rip=93.212.33.106, lip=178.63.xxx.xxx, TLS
Oct 13 14:53:17 myserver dovecot: imap-login: Login: user=<qwer@customer_domain.de>, method=PLAIN, rip=93.212.33.106, lip=178.63.xxx.xxx, TLS

 

After commenting out mail_location, TB will recieve no mail

 

/etc # cat dovecot/dovecot.conf
base_dir = /var/run/dovecot
protocols = imap pop3 imaps pop3s lda managesieve
listen = *
mail_access_groups = vmail
mail_debug = no
## allow Plaintext Logins from foreign IP if the Connection doesn't use TLS
disable_plaintext_auth = no
#mail_location = maildir:~

# When creating any namespaces, you must also have a private namespace:
#namespace private {
#  separator = /
#  prefix =
#  #location defaults to mail_location.
#  inbox = yes
#}

#namespace public {
#  separator = /
#  prefix =
#  location = maildir:~/Maildir
#  subscriptions = no  # v1.1+
#}

### SSL Settings
### After setting this options, set disable_plaintext_auth to yes (see above)
### and add imaps pop3s to the protocols
ssl_cert_file = /etc/ssl/server/www_configureweb_de.crt
ssl_key_file = /etc/ssl/server/configureweb_de.key
## This is an example with CACerts class3 cert!
ssl_ca_file = /etc/ssl/server/www_configureweb_de.ca-bundle
ssl_cipher_list = ALL:!LOW:!SSLv2

protocol imap {
   	mail_plugins = quota imap_quota
}

protocol pop3 {
# leave this uncommented if you are migrating from Courier also see Migration from Courier
pop3_uidl_format = UID%u-%v
mail_plugins = quota

}
protocol lda {
   	# postmaster is the one in charge of the mail system. MUST be set to a valid address!
postmaster_address = admin@configureweb.de
auth_socket_path = /var/run/dovecot/auth-master
mail_plugins = quota sieve
sendmail_path = /usr/sbin/sendmail
}

auth default {
mechanisms = plain login
passdb sql {
   	args = /etc/dovecot/dovecot-sql.conf
}

userdb prefetch {
}

userdb sql {
   	args = /etc/dovecot/dovecot-sql.conf
}

user = vmail
socket listen {
   	# Postfix uses the client socket for SMTP Auth
   	client {
       	# Assuming the default Postfix $queue_directory setting
       	path = /var/spool/postfix/private/auth
       	mode = 0660
       	# Assuming the default Postfix user and group
       	user = postfix
       	group = postfix
   	}
   	# Note that we're setting a master socket. SMTP AUTH for Postfix and Exim uses client sockets.
   	master {
                   	path = /var/run/dovecot/auth-master
                   	mode = 0660
                   	user = vmail
                   	group = vmail
}

}
}
plugin {
   	quota = maildir:User Quota
   	sieve = ~/.dovecot.sieve
   	sieve_dir = ~/sieve
   	sieve_global_path = /etc/dovecot/sieve/global-spam.sieve
#   	sieve_global_path = /var/kunden/sieve/default.sieve
#   	sieve_global_dir = /var/kunden/sieve/global/
}
protocol managesieve {
 listen = *:2000

 login_executable = /usr/libexec/dovecot/managesieve-login
 mail_executable = /usr/libexec/dovecot/managesieve

 managesieve_logout_format = bytes ( in=%i : out=%o )
 mail_debug = yes
}
/etc # init.d/dovecot restart
* Stopping dovecot ...                                                                                                                                                                              	[ ok ]
* Starting dovecot ...
IEffective uid=65534, gid=65534, home=/tmp                                                                                                                                                       		[ ok ]

To me it seems, that everything is allright, but of cause, I might be wrong.

Link to comment
Share on other sites

I don't have mail_location set anywhere in my dovecot.conf

 

base_dir = /var/run/dovecot
protocols = imap pop3 imaps pop3s managesieve
listen = *
mail_access_groups = vmail
mail_debug = no
## Uncomment this line to allow Plaintext Logins from foreign IP if the Connection doesn't use TLS
disable_plaintext_auth = no

### SSL Settings
ssl_cert_file = /etc/postfix/tls/domain.tld.pem
ssl_key_file = /etc/postfix/tls/domain.tld.pem

namespace private {
 prefix = INBOX.
 separator = .
 inbox = yes
}

protocol managesieve {
 listen = *:2000

 login_executable = /usr/libexec/dovecot/managesieve-login
 mail_executable = /usr/libexec/dovecot/managesieve

 managesieve_logout_format = bytes ( in=%i : out=%o )
 mail_debug = yes
}

protocol imap {

}

protocol pop3 {
   # Uncomment this line if you are migrating from Courier also see Migration from Courier
   pop3_uidl_format = UID%u-%v
}
protocol lda {
   # postmaster is the one in charge of the mail system. MUST be set to a vailid address!
   postmaster_address = postmaster@domain.tld
   hostname = mail.domain.tld
   auth_socket_path = /var/run/dovecot/auth-master
   mail_plugins = sieve
   sendmail_path = /usr/sbin/sendmail
}

auth default {
   mechanisms = plain login
   passdb sql {
       args = /etc/dovecot/dovecot-sql.conf
   }

   userdb prefetch {
   }

   userdb sql {
       args = /etc/dovecot/dovecot-sql.conf
   }

   user = vmail
   socket listen {
       # Postfix uses the client socket for SMTP Auth
       client {
           # Assuming the default Postfix $queue_directory setting
           path = /var/spool/postfix/private/auth
           mode = 0660
           # Assuming the default Postfix user and group
           user = postfix
           group = postfix
       }
       # Note that we're setting a master socket. SMTP AUTH for Postfix and Exim uses client sockets.
       master {
                       path = /var/run/dovecot/auth-master
                       mode = 0660
                       user = vmail
                       group = vmail
   }

   }
}

plugin {

 sieve=~/.dovecot.sieve
 sieve_dir=~/sieve
 sieve_global_path = /etc/dovecot/sieve/global-spam.sieve

}

Link to comment
Share on other sites

If I copy/paste your settings and adept the SSL-Part I got the following message

Oct 13 16:17:15 myserver dovecot: IMAP(asdf@customer_domain.de): Namespace 'INBOX.': Mail storage autodetection failed with home=/var/kunden/mail/customer_1/asdf@customer_domain.de/

where

/var/kunden/mail/customer_1# ls -al asdf\@customer_domain.de/
total 64K
drwx------ 6 vmail vmail 4.0K Oct 13 16:12 .
drwx------ 9 vmail vmail 4.0K Oct 13 16:01 ..
drwx------ 5 vmail vmail 4.0K Oct 13 16:12 .Trash
drwx------ 2 vmail vmail 4.0K Oct 13 16:11 cur
-rw------- 1 vmail vmail   10 Oct 13 16:11 dovecot-keywords
-rw------- 1 vmail vmail  277 Oct 13 16:11 dovecot-uidlist
-rw------- 1 vmail vmail	8 Oct 13 16:12 dovecot-uidvalidity
-rw------- 1 vmail vmail	0 Oct 13 16:11 dovecot-uidvalidity.4cb5be17
-rw------- 1 vmail vmail  18K Oct 13 16:11 dovecot.index.cache
-rw------- 1 vmail vmail  804 Oct 13 16:11 dovecot.index.log
drwx------ 2 vmail vmail 4.0K Oct 13 16:11 new
-rw------- 1 vmail vmail	6 Oct 13 16:11 subscriptions
drwx------ 2 vmail vmail 4.0K Oct 13 16:11 tmp

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...