[Dovecot] 2nd Question on v1.0 setup and maildir

Chris H. fbsd at 1command.com
Fri Jun 23 02:33:03 EEST 2006


Hello,
In an effort to help I have a couple of questions regarding your
environment. First, I guess I should preface this by indicating that
I needed to make 0 (zero) path indicators/ pointers to maildirs in
the dovecot.conf file to make dovecot work correctly. I run with the
majority of users as actual users on the system. Those that are
virtual are aliased in sendmail. I run everything out of a MySQL
database in an effort to make any moves/ changes as simple as
backing up the DB > moving/ changing-mail-system and re-initializing
the mail system. That said;
I (as you) run sendmail as the MTA. Oh, I also manage/ run webmail
to handle the virtual users out of the DB (actual users as well).
OK, on to your delemna, as you undoubtedly already know, on most
*NIX systems sendmail keeps users mail in /var/mail/<user-name>
mail that is en-route is in /var/spool/mqueue or
/var/spool/clientmqueue
using maildomain as localhost permits keeping
sendmail/imap(s)/pop(3) happy with users <default> mail in
~/<username> (/usr/home/<username>.
In my experience with dovecot automatically creating a mail
folder/ directory in the users folder/ directory as part of the
user creation process makes dovecot quite happy. As dovecot then
creates (for imap(s)) a .imap folder in the /home/<username>/mail
folder - eg; /home/<username>/mail/.imap in that folder, dovecot
also creates: (again, for imap(s)) INBOX, and inside of that:
dovecot.index, dovecot.index.cache, and dovecot.index.log.
I don't mean to have sounded condecending in this approach to
explaining all this. But chose to keep it as simple and concice
as possible for the sake of _clarity_. Note: all this was
accomplished _without_ making _any_ pointers in dovecot.conf
*other* than SSL, logging and dovecot permissions (note the omission
of any mail folder related settings).

 From my dovecot.conf:
# Protocols we want to be serving:
#  imap imaps pop3 pop3s
# protocols = imap pop3
protocols = imaps

#   protocol imap {
#     listen = *:10143
#     ssl_listen = *:10943
#     ..
#   }
#   protocol pop3 {
#     listen = *:10100
#     ..
#   }
listen = *:993

# Disable SSL/TLS support.
ssl_disable = no

ssl_cert_file = /etc/ssl/certs/dovecot.pem
#ssl_key_file = /etc/ssl/private/dovecot.pem

# Request client to send a certificate.
ssl_verify_client_cert = no

#ssl_parameters_regenerate = 168
ssl_parameters_regenerate = 0
(the above line can *really* affect performance, as regeneration
is *very* CPU intensive. A setting of 0 (zero) requires regeneration
only on startup)

# SSL ciphers to use
ssl_cipher_list = ALL:!LOW

shutdown_clients = yes

log_path = /var/log/dovecotlog
(The line above can *really* help you here, as it can
emit possible pointers, as to what might be causing your
undesired results - this line should be MANDITORY)

log_timestamp = "%b %d %H:%M:%S "
(the above line will also be a pointer)

# Directory where authentication process places authentication
# UNIX sockets which login needs to be able to connect to.
# The sockets are created when running as root, so you don't
# have to worry about permissions. Note that everything in this
# directory is deleted when Dovecot is started.
login_dir = /var/run/dovecot/login
(Do you have this line?)

# chroot login process to the login_dir. Only reason not
# to do this is if you wish to run the whole Dovecot
# without roots. http://wiki.dovecot.org/Rootless
login_chroot = yes
(and this one?)

# User to use for the login process. Create a completely
# new user for this, and don't use it anywhere else.
# The user must also belong to a group where only it has
# access, it's used to control access for authentication process.
# Note that this user is NOT used to access mails.
# http://wiki.dovecot.org/UserIds
login_user = dovecot

# Set max. process size in megabytes. If you don't use
# login_process_per_connection you might need to grow this.
login_process_size = 64
(Line above depends on the average size of your userbase/
workload)

# Should each login be processed in it's own process (yes),
# or should one login process be allowed to process multiple
# connections (no)? Yes is more secure, espcially with
# SSL/TLS enabled. No is faster since there's no need
# to create processes all the time.
#login_process_per_connection = yes
login_process_per_connection = no

# Greeting message for clients.
login_greeting = IMAP server ready.
(or just for fun:
login_greeting = Big brother's watching you.)

# Space-separated list of elements we want to log.
# The elements which have a non-empty variable
# value are joined together to form a comma-separated
# string.
login_log_format_elements = user=<%u> method=%m rip=%r lip=%l %c
(This line above, can also assist you in DEBUGING problems)

login_log_format = %$: %s
(again, also a helpful DEBUG tool)

# Maximum number of running mail processes.
# When this limit is reached,
# new users aren't allowed to log in.
max_mail_processes = 1024

# Show more verbose process titles (in ps).
# Currently shows user name and IP address.
# Useful for seeing who are actually using
# the IMAP processes (eg. shared mailboxes
# or if same uid is used for multiple accounts).
verbose_proctitle = yes
(Need more information?)

# Show protocol level SSL errors.
verbose_ssl = no

first_valid_uid = 500
#last_valid_uid = 0

first_valid_gid = 0
#last_valid_gid = 0

# Grant access to these extra groups for mail
# processes. Typical use would be to give "mail"
# group write access to /var/mail to be able to
# create dotlocks.
mail_extra_groups = mail
(Here is an important setting! What's yours look like?)

# Support for dynamically loadable plugins.
# mail_plugins is a space separated list of plugins
# to load.
#  mail_plugins = convert,imap_quota,zlib,trash
mail_plugin_dir = /usr/local/lib/dovecot/imap

##
## POP3 specific settings
##

protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}

auth_username_chars = 
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@
(The above line probably wrapped in your mail reader (client)
it should be ONE long line without a break)

auth_verbose = yes

auth_worker_max_count = 30

userdb passwd {
}

# User to use for the process. This user needs access
# to only user and password databases, nothing else.
# Only shadow and pam authentication requires roots,
# so use something else if possible. Note that passwd
# authentication with BSDs internally accesses shadow
# files, which also requires roots. Note that this user
# is NOT used to access mails. That user is specified
# by userdb above.
user = root

I've left out some of the lines in my conf. But they didn't
really apply to your situation anyway. I hope my experience
will help jumpstart your setup.

Best wishes,
Chris H.


Quoting Patrick Carney <patrick at castandcrew.com>:

> Correction. Yes it should be /home/Patrick/Maildir/new/
>
> My mistake. Yes it is a sendmail problem.
>
>
>
> -----Original Message-----
> From: dovecot-bounces at dovecot.org [mailto:dovecot-bounces at dovecot.org] On
> Behalf Of Odhiambo WASHINGTON
> Sent: Thursday, June 22, 2006 9:28 AM
> To: dovecot at dovecot.org
> Subject: Re: [Dovecot] 2nd Question on v1.0 setup and maildir
>
> * On 22/06/06 09:15 -0700, Patrick Carney wrote:
> |
> |
> |
> |
> |   _____
> |
> | From: Patrick Carney [mailto:patrick at castandcrew.com]
> | Sent: Thursday, June 22, 2006 8:55 AM
> | To: 'dovecot at dovecot.org'
> | Subject: Question on v1.0 setup and maildir
> |
> |
> |
> | Hello all.
> |
> |
> |
> | I appreciate the responses to my problem on v0.99.14. Thank you all.
> |
> |
> |
> | We have built a new server running version 1.0-0_15.beta9.el4.  The mail
> | delivery agent is sendmail. We seem to have gotten it up fairly easily.
> But
> | we have one problem. We are using the maildir feature instead of mbox and
> | when ever mail gets delivered, it is not sending it to the \maildir\new
> | folder. It seems to be dumping it in the root of the maildir directory,
> thus
> | when a client checks for email, it appears nothing is there.
>
> Tell us the exact path where the mail ends up since \maildir\new is NOT
> a Unix file path.
>
> Mail should be delivered to /home/patrick/Maildir/new/
>
> If it is not ending there, it's Sendmail problem, not Dovecot.
>
> [snip]
>
> | #
> |
> | default_mail_env = maildir:/home/%u/Maildir
>
> Wherever the mail ends, you can fix that default_mail_env to get it....
>
> Let's know where Sendmail delivers the mail (I mean the directory path).
>
>
>
> -Wash
>
> http://www.netmeister.org/news/learn2quote.html
>
> DISCLAIMER: See http://www.wananchi.com/bms/terms.php
>
> --
> +======================================================================+
>    |\      _,,,---,,_     | Odhiambo Washington    <wash at wananchi.com>
> Zzz /,`.-'`'    -.  ;-;;,_ | Wananchi Online Ltd.   www.wananchi.com
>   |,4-  ) )-,_. ,\ (  `'-'| Tel: +254 20 313985-9  +254 20 313922
>  '---''(_/--'  `-'\_)     | GSM: +254 722 743223   +254 733 744121
> +======================================================================+
>
> It wasn't that she had a rose in her teeth, exactly.  It was more like
> the rose and the teeth were in the same glass.
>
>



-- 
panic: kernel trap (ignored)


-----------------------------------------------------------------
FreeBSD 5.4-RELEASE-p12 (SMP - 900x2) Tue Mar 7 19:37:23 PST 2006
/////////////////////////////////////////////////////////////////

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: PGP Digital Signature
Url : http://dovecot.org/pipermail/dovecot/attachments/20060622/14f2a432/attachment.pgp


More information about the dovecot mailing list