# HG changeset patch # User Michael Schloh von Bennewitz # Date 1240316617 -7200 # Node ID 0cbfb8a2de97667bd279c07691e33c737a974b2c # Parent 79d9e4114aabc4592c5283f11c82c1e70ca9068f Specify additional log paths, correct user names, adapt permissions. diff -r 79d9e4114aab -r 0cbfb8a2de97 dovecot/dovecot.patch --- a/dovecot/dovecot.patch Tue Apr 21 14:20:49 2009 +0200 +++ b/dovecot/dovecot.patch Tue Apr 21 14:23:37 2009 +0200 @@ -96,7 +96,18 @@ # Disable LOGIN command and all other plaintext authentications unless # SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP -@@ -82,17 +80,17 @@ +@@ -60,7 +58,9 @@ + + # Log file to use for error messages, instead of sending them to syslog. + # /dev/stderr can be used to log into stderr. +-#log_path = ++log_path = @l_prefix@/var/dovecot/log/dovecot-error.log # Error messages. ++info_log_path = @l_prefix@/var/dovecot/log/dovecot-info.log # Info/debug messages. ++log_timestamp = '%b %d %H:%M:%S ' # Prefix for each line written to log file. + + # Log file to use for informational and debug messages. + # Default is the same as log_path. +@@ -82,17 +82,17 @@ # IP or host address where to listen in for SSL connections. Remember to also # add imaps and/or pop3s to protocols setting. Defaults to same as "listen" # setting if not specified. @@ -118,7 +129,7 @@ # If key file is password protected, give the password here. Alternatively # give it when starting dovecot with -p parameter. Since this file is often -@@ -135,7 +133,7 @@ +@@ -135,7 +135,7 @@ # 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. @@ -127,25 +138,41 @@ # chroot login process to the login_dir. Only reason not to do this is if you # wish to run the whole Dovecot without roots. -@@ -145,7 +143,7 @@ +@@ -145,7 +145,7 @@ # 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. -#login_user = dovecot -+#login_user = @l_musr@ ++#login_user = @l_nusr@ # Set max. process size in megabytes. If you don't use # login_process_per_connection you might need to grow this. -@@ -503,7 +501,7 @@ +@@ -266,8 +266,8 @@ + # System user and group used to access mails. If you use multiple, userdb + # can override these by returning uid or gid fields. You can use either numbers + # or names. +-#mail_uid = +-#mail_gid = ++#mail_uid = @l_rusr@ ++#mail_gid = @l_rusr@ + + # Group to enable temporarily for privileged operations. Currently this is + # used only with INBOX when either its initial creation or dotlocking fails. +@@ -502,8 +502,12 @@ + ## protocol imap { ++ # Override main log file paths ++ log_path = @l_prefix@/var/dovecot/log/imap-error.log ++ info_log_path = @l_prefix@/var/dovecot/log/imap-info.log ++ # Login executable location. - #login_executable = /usr/libexec/dovecot/imap-login + #login_executable = @l_prefix@/libexec/dovecot/imap-login # IMAP executable location. Changing this allows you to execute other # binaries before the imap process is executed. -@@ -515,7 +513,7 @@ +@@ -515,7 +519,7 @@ # /tmp/gdbhelper.* files: # mail_executable = /usr/libexec/dovecot/gdbhelper /usr/libexec/dovecot/imap # @@ -154,7 +181,7 @@ # Maximum IMAP command line length in bytes. Some clients generate very long # command lines with huge mailboxes, so you may need to raise this if you get -@@ -529,7 +527,7 @@ +@@ -529,7 +533,7 @@ # Support for dynamically loadable plugins. mail_plugins is a space separated # list of plugins to load. #mail_plugins = @@ -163,9 +190,14 @@ # Send IMAP capabilities in greeting message. This makes it unnecessary for # clients to request it with CAPABILITY command, so it saves one round-trip. -@@ -572,11 +570,11 @@ +@@ -571,12 +575,16 @@ + ## protocol pop3 { ++ # Override main log file paths ++ log_path = @l_prefix@/var/dovecot/log/pop3-error.log ++ info_log_path = @l_prefix@/var/dovecot/log/pop3-info.log ++ # Login executable location. - #login_executable = /usr/libexec/dovecot/pop3-login + #login_executable = @l_prefix@/libexec/dovecot/pop3-login @@ -177,7 +209,7 @@ # Don't try to set mails non-recent or seen with POP3 sessions. This is # mostly intended to reduce disk I/O. With maildir it doesn't move files -@@ -636,7 +634,7 @@ +@@ -636,7 +644,7 @@ # Support for dynamically loadable plugins. mail_plugins is a space separated # list of plugins to load. #mail_plugins = @@ -186,7 +218,18 @@ # Workarounds for various client bugs: # outlook-no-nuls: -@@ -664,7 +662,7 @@ +@@ -654,6 +662,10 @@ + ## + + protocol lda { ++ # Override main log file paths ++ log_path = @l_prefix@/var/dovecot/log/deliver-error.log ++ info_log_path = @l_prefix@/var/dovecot/log/deliver-info.log ++ + # Address to use when sending rejection mails. + postmaster_address = postmaster@example.com + +@@ -664,7 +676,7 @@ # Support for dynamically loadable plugins. mail_plugins is a space separated # list of plugins to load. #mail_plugins = @@ -195,7 +238,7 @@ # If user is over quota, return with temporary failure instead of # bouncing the mail. -@@ -678,7 +676,7 @@ +@@ -678,7 +690,7 @@ #deliver_log_format = msgid=%m: %$ # Binary to use for sending mails. @@ -204,7 +247,7 @@ # Subject: header to use for rejection mails. You can use the same variables # as for rejection_reason below. -@@ -689,7 +687,7 @@ +@@ -689,7 +701,7 @@ #rejection_reason = Your message to <%t> was automatically rejected:%n%r # UNIX socket path to master authentication server to find users. @@ -213,7 +256,7 @@ } ## -@@ -697,7 +695,7 @@ +@@ -697,7 +709,7 @@ ## # Executable location @@ -222,7 +265,7 @@ # Set max. process size in megabytes. #auth_process_size = 256 -@@ -787,7 +785,7 @@ +@@ -787,7 +799,7 @@ #auth_ntlm_use_winbind = no # Path for Samba's ntlm_auth helper binary. @@ -231,7 +274,7 @@ # Number of seconds to delay before replying to failed authentications. #auth_failure_delay = 2 -@@ -820,7 +818,7 @@ +@@ -820,7 +832,7 @@ #passdb passwd-file { # File contains a list of usernames, one per line @@ -240,7 +283,7 @@ #deny = yes #} -@@ -903,13 +901,13 @@ +@@ -903,13 +915,13 @@ # SQL database #passdb sql { # Path for SQL configuration file, see doc/dovecot-sql-example.conf @@ -256,7 +299,7 @@ #} # vpopmail authentication -@@ -974,13 +972,13 @@ +@@ -974,13 +986,13 @@ # SQL database #userdb sql { # Path for SQL configuration file, see doc/dovecot-sql-example.conf @@ -272,7 +315,16 @@ #} # vpopmail -@@ -1017,7 +1015,7 @@ +@@ -993,7 +1005,7 @@ + # 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 ++ user = @l_nusr@ + + # Directory where to chroot the process. Most authentication backends don't + # work if this is set, and there's no point chrooting if auth_user is root. +@@ -1017,7 +1029,7 @@ # Master socket provides access to userdb information. It's typically # used to give Dovecot's local delivery agent access to userdb so it # can find mailbox locations. @@ -281,7 +333,7 @@ #mode = 0600 # Default user/group is the one who started dovecot-auth (root) #user = -@@ -1027,7 +1025,7 @@ +@@ -1027,7 +1039,7 @@ # The client socket is generally safe to export to everyone. Typical use # is to export it to your SMTP server so it can do SMTP AUTH lookups # using it. @@ -290,7 +342,7 @@ #mode = 0660 #} #} -@@ -1041,7 +1039,7 @@ +@@ -1041,7 +1053,7 @@ #auth external { # socket connect { # master { @@ -299,7 +351,7 @@ # } # } #} -@@ -1057,8 +1055,8 @@ +@@ -1057,8 +1069,8 @@ # referenced using URIs in format "proxy::". dict { @@ -310,7 +362,7 @@ } # Path to Berkeley DB's configuration file. See doc/dovecot-db-example.conf -@@ -1109,7 +1107,7 @@ +@@ -1109,7 +1121,7 @@ # one file for each mailbox, eg. INBOX or sub.mailbox. cache_secs parameter # specifies how many seconds to wait between stat()ing dovecot-acl file # to see if it changed. @@ -319,7 +371,7 @@ # Convert plugin. If set, specifies the source storage path which is # converted to destination storage (mail_location) when the user logs in. -@@ -1128,14 +1126,14 @@ +@@ -1128,14 +1140,14 @@ # until the message can be saved within quota limits. The configuration file # is a text file where each line is in format: # Mails are first deleted in lowest -> highest priority number order diff -r 79d9e4114aab -r 0cbfb8a2de97 dovecot/dovecot.spec --- a/dovecot/dovecot.spec Tue Apr 21 14:20:49 2009 +0200 +++ b/dovecot/dovecot.spec Tue Apr 21 14:23:37 2009 +0200 @@ -39,7 +39,7 @@ Group: Mail License: MIT+LGPL Version: %{V_major}.%{V_minor} -Release: 20090416 +Release: 20090418 # package options %option with_fsl yes @@ -218,9 +218,7 @@ --without-gc \ --without-gssapi \ --without-lucene \ - --without-vpopmail \ - --enable-shared \ - --disable-static + --without-vpopmail %{l_make} %{l_mflags -O} %if "%{with_sieve}" == "yes" @@ -300,11 +298,11 @@ '%config %attr(0600,%{l_musr},%{l_mgrp}) %{l_prefix}/etc/dovecot/*' \ '%config %attr(0640,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/dovecot/dovecot.conf' \ '%dir %attr(0700,%{l_susr},%{l_mgrp}) %{l_prefix}/etc/dovecot/ssl' \ - '%dir %attr(0755,%{l_susr},%{l_mgrp}) %{l_prefix}/var/dovecot' \ - '%dir %attr(0770,%{l_susr},%{l_rgrp}) %{l_prefix}/var/dovecot/dat' \ - '%dir %attr(0770,%{l_susr},%{l_rgrp}) %{l_prefix}/var/dovecot/log' \ - '%dir %attr(0755,%{l_susr},%{l_rgrp}) %{l_prefix}/var/dovecot/run' \ - '%dir %attr(0750,%{l_susr},%{l_ngrp}) %{l_prefix}/var/dovecot/run/login' \ + '%dir %attr(0755,%{l_musr},%{l_mgrp}) %{l_prefix}/var/dovecot' \ + '%dir %attr(0770,%{l_musr},%{l_rgrp}) %{l_prefix}/var/dovecot/dat' \ + '%dir %attr(0770,%{l_musr},%{l_rgrp}) %{l_prefix}/var/dovecot/log' \ + '%dir %attr(0750,%{l_musr},%{l_rgrp}) %{l_prefix}/var/dovecot/run' \ + '%dir %attr(0750,%{l_musr},%{l_ngrp}) %{l_prefix}/var/dovecot/run/login' \ '%doc %{l_prefix}/share/dovecot/doc' \ '%doc %{l_prefix}/share/dovecot/doc/wiki'