1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dovecot/dovecot.patch Tue Apr 07 19:52:45 2009 +0200 1.3 @@ -0,0 +1,392 @@ 1.4 +Index: configure.in 1.5 +--- configure.in.orig 2009-03-13 23:06:16 +0100 1.6 ++++ configure.in 2009-03-14 09:11:12 +0100 1.7 +@@ -1962,14 +1962,14 @@ 1.8 + 1.9 + if test $want_pgsql != no; then 1.10 + # based on code from PHP 1.11 +- for i in /usr /usr/local /usr/local/pgsql; do 1.12 +- for j in include include/pgsql include/postgres include/postgresql ""; do 1.13 ++ for i in @l_prefix@; do 1.14 ++ for j in include/postgresql; do 1.15 + if test -r "$i/$j/libpq-fe.h"; then 1.16 + PGSQL_INCLUDE=$i/$j 1.17 + fi 1.18 + done 1.19 +- for lib in lib lib64; do 1.20 +- for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do 1.21 ++ for lib in lib; do 1.22 ++ for j in $lib; do 1.23 + if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then 1.24 + PGSQL_LIBDIR=$i/$j 1.25 + fi 1.26 +Index: configure 1.27 +--- configure.orig 2009-03-13 23:06:32 +0100 1.28 ++++ configure 2009-03-14 09:11:12 +0100 1.29 +@@ -27966,14 +27966,14 @@ 1.30 + 1.31 + if test $want_pgsql != no; then 1.32 + # based on code from PHP 1.33 +- for i in /usr /usr/local /usr/local/pgsql; do 1.34 +- for j in include include/pgsql include/postgres include/postgresql ""; do 1.35 ++ for i in @l_prefix@; do 1.36 ++ for j in include/postgresql; do 1.37 + if test -r "$i/$j/libpq-fe.h"; then 1.38 + PGSQL_INCLUDE=$i/$j 1.39 + fi 1.40 + done 1.41 +- for lib in lib lib64; do 1.42 +- for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do 1.43 ++ for lib in lib; do 1.44 ++ for j in $lib; do 1.45 + if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then 1.46 + PGSQL_LIBDIR=$i/$j 1.47 + fi 1.48 +Index: doc/dovecot-sql-example.conf 1.49 +--- doc/dovecot-sql-example.conf.orig 2009-01-05 21:49:58 +0100 1.50 ++++ doc/dovecot-sql-example.conf 2009-03-14 09:11:12 +0100 1.51 +@@ -47,7 +47,8 @@ 1.52 + # the default my.cnf location 1.53 + # option_group - Read options from the given group (default: client) 1.54 + # 1.55 +-# You can connect to UNIX sockets by using host: host=/var/run/mysql.sock 1.56 ++# You can connect to UNIX sockets by using host: 1.57 ++# host=@l_prefix@/var/mysql/mysql.sock 1.58 + # Note that currently you can't use spaces in parameters. 1.59 + # 1.60 + # MySQL supports multiple host parameters for load balancing / HA. 1.61 +@@ -58,7 +59,7 @@ 1.62 + # Examples: 1.63 + # connect = host=192.168.1.1 dbname=users 1.64 + # connect = host=sql.example.com dbname=virtual user=virtual password=blarg 1.65 +-# connect = /etc/dovecot/authdb.sqlite 1.66 ++# connect = @l_prefix@/etc/dovecot/authdb.sqlite 1.67 + # 1.68 + #connect = 1.69 + 1.70 +Index: dovecot-example.conf 1.71 +--- dovecot-example.conf.orig 2009-03-13 22:23:14 +0100 1.72 ++++ dovecot-example.conf 2009-03-14 09:12:40 +0100 1.73 +@@ -11,16 +11,14 @@ 1.74 + 1.75 + # Default values are shown for each setting, it's not required to uncomment 1.76 + # any of the lines. Exception to this are paths, they're just examples with 1.77 +-# the real defaults being based on configure options. The paths listed here 1.78 +-# are for configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var 1.79 +-# --with-ssldir=/etc/ssl 1.80 ++# the real defaults being based on configure options. 1.81 + 1.82 + # Base directory where to store runtime data. 1.83 +-#base_dir = /var/run/dovecot/ 1.84 ++#base_dir = @l_prefix@/var/dovecot/run 1.85 + 1.86 + # Protocols we want to be serving: imap imaps pop3 pop3s 1.87 + # If you only want to use dovecot-auth, you can set this to "none". 1.88 +-#protocols = imap imaps 1.89 ++#protocols = imap 1.90 + 1.91 + # A space separated list of IP or host addresses where to listen in for 1.92 + # connections. "*" listens in all IPv4 interfaces. "[::]" listens in all IPv6 1.93 +@@ -38,7 +36,7 @@ 1.94 + # listen = *:10100 1.95 + # .. 1.96 + # } 1.97 +-#listen = * 1.98 ++#listen = 127.0.0.1 1.99 + 1.100 + # Disable LOGIN command and all other plaintext authentications unless 1.101 + # SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP 1.102 +@@ -82,17 +80,17 @@ 1.103 + # IP or host address where to listen in for SSL connections. Remember to also 1.104 + # add imaps and/or pop3s to protocols setting. Defaults to same as "listen" 1.105 + # setting if not specified. 1.106 +-#ssl_listen = 1.107 ++#ssl_listen = 127.0.0.1 1.108 + 1.109 + # Disable SSL/TLS support. <doc/wiki/SSL> 1.110 +-#ssl_disable = no 1.111 ++#ssl_disable = yes 1.112 + 1.113 + # PEM encoded X.509 SSL/TLS certificate and private key. They're opened before 1.114 + # dropping root privileges, so keep the key file unreadable by anyone but 1.115 + # root. Included doc/mkcert.sh can be used to easily generate self-signed 1.116 + # certificate, just make sure to update the domains in dovecot-openssl.cnf 1.117 +-#ssl_cert_file = /etc/ssl/certs/dovecot.pem 1.118 +-#ssl_key_file = /etc/ssl/private/dovecot.pem 1.119 ++#ssl_cert_file = @l_prefix@/etc/dovecot/ssl/dovecot.crt 1.120 ++#ssl_key_file = @l_prefix@/etc/dovecot/ssl/dovecot.key 1.121 + 1.122 + # If key file is password protected, give the password here. Alternatively 1.123 + # give it when starting dovecot with -p parameter. Since this file is often 1.124 +@@ -135,7 +133,7 @@ 1.125 + # which login needs to be able to connect to. The sockets are created when 1.126 + # running as root, so you don't have to worry about permissions. Note that 1.127 + # everything in this directory is deleted when Dovecot is started. 1.128 +-#login_dir = /var/run/dovecot/login 1.129 ++#login_dir = @l_prefix@/var/dovecot/run/login 1.130 + 1.131 + # chroot login process to the login_dir. Only reason not to do this is if you 1.132 + # wish to run the whole Dovecot without roots. <doc/wiki/Rootless.txt> 1.133 +@@ -145,7 +143,7 @@ 1.134 + # and don't use it anywhere else. The user must also belong to a group where 1.135 + # only it has access, it's used to control access for authentication process. 1.136 + # Note that this user is NOT used to access mails. <doc/wiki/UserIds.txt> 1.137 +-#login_user = dovecot 1.138 ++#login_user = @l_musr@ 1.139 + 1.140 + # Set max. process size in megabytes. If you don't use 1.141 + # login_process_per_connection you might need to grow this. 1.142 +@@ -503,7 +501,7 @@ 1.143 + 1.144 + protocol imap { 1.145 + # Login executable location. 1.146 +- #login_executable = /usr/libexec/dovecot/imap-login 1.147 ++ #login_executable = @l_prefix@/libexec/dovecot/imap-login 1.148 + 1.149 + # IMAP executable location. Changing this allows you to execute other 1.150 + # binaries before the imap process is executed. 1.151 +@@ -515,7 +513,7 @@ 1.152 + # /tmp/gdbhelper.* files: 1.153 + # mail_executable = /usr/libexec/dovecot/gdbhelper /usr/libexec/dovecot/imap 1.154 + # 1.155 +- #mail_executable = /usr/libexec/dovecot/imap 1.156 ++ #mail_executable = @l_prefix@/libexec/dovecot/imap 1.157 + 1.158 + # Maximum IMAP command line length in bytes. Some clients generate very long 1.159 + # command lines with huge mailboxes, so you may need to raise this if you get 1.160 +@@ -529,7 +527,7 @@ 1.161 + # Support for dynamically loadable plugins. mail_plugins is a space separated 1.162 + # list of plugins to load. 1.163 + #mail_plugins = 1.164 +- #mail_plugin_dir = /usr/lib/dovecot/imap 1.165 ++ #mail_plugin_dir = @l_prefix@/lib/dovecot/imap 1.166 + 1.167 + # Send IMAP capabilities in greeting message. This makes it unnecessary for 1.168 + # clients to request it with CAPABILITY command, so it saves one round-trip. 1.169 +@@ -572,11 +570,11 @@ 1.170 + 1.171 + protocol pop3 { 1.172 + # Login executable location. 1.173 +- #login_executable = /usr/libexec/dovecot/pop3-login 1.174 ++ #login_executable = @l_prefix@/libexec/dovecot/pop3-login 1.175 + 1.176 + # POP3 executable location. See IMAP's mail_executable above for examples 1.177 + # how this could be changed. 1.178 +- #mail_executable = /usr/libexec/dovecot/pop3 1.179 ++ #mail_executable = @l_prefix@/libexec/dovecot/pop3 1.180 + 1.181 + # Don't try to set mails non-recent or seen with POP3 sessions. This is 1.182 + # mostly intended to reduce disk I/O. With maildir it doesn't move files 1.183 +@@ -636,7 +634,7 @@ 1.184 + # Support for dynamically loadable plugins. mail_plugins is a space separated 1.185 + # list of plugins to load. 1.186 + #mail_plugins = 1.187 +- #mail_plugin_dir = /usr/lib/dovecot/pop3 1.188 ++ #mail_plugin_dir = @l_prefix@/lib/dovecot/pop3 1.189 + 1.190 + # Workarounds for various client bugs: 1.191 + # outlook-no-nuls: 1.192 +@@ -664,7 +662,7 @@ 1.193 + # Support for dynamically loadable plugins. mail_plugins is a space separated 1.194 + # list of plugins to load. 1.195 + #mail_plugins = 1.196 +- #mail_plugin_dir = /usr/lib/dovecot/lda 1.197 ++ #mail_plugin_dir = @l_prefix@/lib/dovecot/lda 1.198 + 1.199 + # If user is over quota, return with temporary failure instead of 1.200 + # bouncing the mail. 1.201 +@@ -678,7 +676,7 @@ 1.202 + #deliver_log_format = msgid=%m: %$ 1.203 + 1.204 + # Binary to use for sending mails. 1.205 +- #sendmail_path = /usr/lib/sendmail 1.206 ++ #sendmail_path = @l_prefix@/sbin/sendmail 1.207 + 1.208 + # Subject: header to use for rejection mails. You can use the same variables 1.209 + # as for rejection_reason below. 1.210 +@@ -689,7 +687,7 @@ 1.211 + #rejection_reason = Your message to <%t> was automatically rejected:%n%r 1.212 + 1.213 + # UNIX socket path to master authentication server to find users. 1.214 +- #auth_socket_path = /var/run/dovecot/auth-master 1.215 ++ #auth_socket_path = @l_prefix@/var/dovecot/run/auth-master 1.216 + } 1.217 + 1.218 + ## 1.219 +@@ -697,7 +695,7 @@ 1.220 + ## 1.221 + 1.222 + # Executable location 1.223 +-#auth_executable = /usr/libexec/dovecot/dovecot-auth 1.224 ++#auth_executable = @l_prefix@/libexec/dovecot/dovecot-auth 1.225 + 1.226 + # Set max. process size in megabytes. 1.227 + #auth_process_size = 256 1.228 +@@ -787,7 +785,7 @@ 1.229 + #auth_ntlm_use_winbind = no 1.230 + 1.231 + # Path for Samba's ntlm_auth helper binary. 1.232 +-#auth_winbind_helper_path = /usr/bin/ntlm_auth 1.233 ++#auth_winbind_helper_path = @l_prefix@/bin/ntlm_auth 1.234 + 1.235 + # Number of seconds to delay before replying to failed authentications. 1.236 + #auth_failure_delay = 2 1.237 +@@ -820,7 +818,7 @@ 1.238 + 1.239 + #passdb passwd-file { 1.240 + # File contains a list of usernames, one per line 1.241 +- #args = /etc/dovecot.deny 1.242 ++ #args = @l_prefix@/etc/dovecot/dovecot.deny 1.243 + #deny = yes 1.244 + #} 1.245 + 1.246 +@@ -903,13 +901,13 @@ 1.247 + # SQL database <doc/wiki/AuthDatabase.SQL.txt> 1.248 + #passdb sql { 1.249 + # Path for SQL configuration file, see doc/dovecot-sql-example.conf 1.250 +- #args = 1.251 ++ #args = @l_prefix@/etc/dovecot/dovecot-sql.conf 1.252 + #} 1.253 + 1.254 + # LDAP database <doc/wiki/AuthDatabase.LDAP.txt> 1.255 + #passdb ldap { 1.256 + # Path for LDAP configuration file, see doc/dovecot-ldap-example.conf 1.257 +- #args = 1.258 ++ #args = @l_prefix@/etc/dovecot/dovecot-ldap.conf 1.259 + #} 1.260 + 1.261 + # vpopmail authentication <doc/wiki/AuthDatabase.VPopMail.txt> 1.262 +@@ -974,13 +972,13 @@ 1.263 + # SQL database <doc/wiki/AuthDatabase.SQL.txt> 1.264 + #userdb sql { 1.265 + # Path for SQL configuration file, see doc/dovecot-sql-example.conf 1.266 +- #args = 1.267 ++ #args = @l_prefix@/etc/dovecot/dovecot-sql.conf 1.268 + #} 1.269 + 1.270 + # LDAP database <doc/wiki/AuthDatabase.LDAP.txt> 1.271 + #userdb ldap { 1.272 + # Path for LDAP configuration file, see doc/dovecot-ldap-example.conf 1.273 +- #args = 1.274 ++ #args = @l_prefix@/etc/dovecot/dovecot-ldap.conf 1.275 + #} 1.276 + 1.277 + # vpopmail <doc/wiki/AuthDatabase.VPopMail.txt> 1.278 +@@ -1017,7 +1015,7 @@ 1.279 + # Master socket provides access to userdb information. It's typically 1.280 + # used to give Dovecot's local delivery agent access to userdb so it 1.281 + # can find mailbox locations. 1.282 +- #path = /var/run/dovecot/auth-master 1.283 ++ #path = @l_prefix@/dovecot/run/auth-master 1.284 + #mode = 0600 1.285 + # Default user/group is the one who started dovecot-auth (root) 1.286 + #user = 1.287 +@@ -1027,7 +1025,7 @@ 1.288 + # The client socket is generally safe to export to everyone. Typical use 1.289 + # is to export it to your SMTP server so it can do SMTP AUTH lookups 1.290 + # using it. 1.291 +- #path = /var/run/dovecot/auth-client 1.292 ++ #path = @l_prefix@/dovecot/run/auth-client 1.293 + #mode = 0660 1.294 + #} 1.295 + #} 1.296 +@@ -1041,7 +1039,7 @@ 1.297 + #auth external { 1.298 + # socket connect { 1.299 + # master { 1.300 +-# path = /var/run/dovecot/auth-master 1.301 ++# path = @l_prefix@/dovecot/run/auth-master 1.302 + # } 1.303 + # } 1.304 + #} 1.305 +@@ -1057,8 +1055,8 @@ 1.306 + # referenced using URIs in format "proxy::<name>". 1.307 + 1.308 + dict { 1.309 +- #quota = mysql:/etc/dovecot-dict-quota.conf 1.310 +- #expire = db:/var/lib/dovecot/expire.db 1.311 ++ #quota = mysql:@l_prefix@/etc/dovecot/dovecot-dict-quota.conf 1.312 ++ #expire = db:@l_prefix@/var/dovecot/lib/expire.db 1.313 + } 1.314 + 1.315 + # Path to Berkeley DB's configuration file. See doc/dovecot-db-example.conf 1.316 +@@ -1109,7 +1107,7 @@ 1.317 + # one file for each mailbox, eg. INBOX or sub.mailbox. cache_secs parameter 1.318 + # specifies how many seconds to wait between stat()ing dovecot-acl file 1.319 + # to see if it changed. 1.320 +- #acl = vfile:/etc/dovecot-acls:cache_secs=300 1.321 ++ #acl = vfile:@l_prefix@/etc/dovecot/dovecot-acls:cache_secs=300 1.322 + 1.323 + # Convert plugin. If set, specifies the source storage path which is 1.324 + # converted to destination storage (mail_location) when the user logs in. 1.325 +@@ -1128,14 +1126,14 @@ 1.326 + # until the message can be saved within quota limits. The configuration file 1.327 + # is a text file where each line is in format: <priority> <mailbox name> 1.328 + # Mails are first deleted in lowest -> highest priority number order 1.329 +- #trash = /etc/dovecot-trash.conf 1.330 ++ #trash = @l_prefix@/etc/dovecot/dovecot-trash.conf 1.331 + 1.332 + # Expire plugin. Mails are expunged from mailboxes after being there the 1.333 + # configurable time. The first expiration date for each mailbox is stored in 1.334 + # a dictionary so it can be quickly determined which mailboxes contain 1.335 + # expired mails. The actual expunging is done in a nightly cronjob, which 1.336 + # you must set up: 1.337 +- # dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool 1.338 ++ # dovecot --exec-mail ext @l_prefix@/libexec/dovecot/expire-tool 1.339 + #expire = Trash 7 Spam 30 1.340 + #expire_dict = proxy::expire 1.341 + 1.342 +Index: src/deliver/deliver.c 1.343 +--- src/deliver/deliver.c.orig 2009-02-27 00:31:13 +0100 1.344 ++++ src/deliver/deliver.c 2009-03-14 09:11:12 +0100 1.345 +@@ -41,7 +41,7 @@ 1.346 + #include <syslog.h> 1.347 + 1.348 + #define DEFAULT_CONFIG_FILE SYSCONFDIR"/dovecot.conf" 1.349 +-#define DEFAULT_SENDMAIL_PATH "/usr/lib/sendmail" 1.350 ++#define DEFAULT_SENDMAIL_PATH "@l_prefix@/sbin/sendmail" 1.351 + #define DEFAULT_ENVELOPE_SENDER "MAILER-DAEMON" 1.352 + 1.353 + /* After buffer grows larger than this, create a temporary file to /tmp 1.354 +Index: src/master/master-settings.c 1.355 +--- src/master/master-settings.c.orig 2009-03-13 20:11:53 +0100 1.356 ++++ src/master/master-settings.c 2009-03-14 09:11:12 +0100 1.357 +@@ -178,14 +178,14 @@ 1.358 + MEMBER(syslog_facility) "mail", 1.359 + 1.360 + /* general */ 1.361 +- MEMBER(protocols) "imap imaps", 1.362 +- MEMBER(listen) "*", 1.363 +- MEMBER(ssl_listen) "", 1.364 ++ MEMBER(protocols) "imap", 1.365 ++ MEMBER(listen) "127.0.0.1", 1.366 ++ MEMBER(ssl_listen) "127.0.0.1", 1.367 + 1.368 +- MEMBER(ssl_disable) FALSE, 1.369 ++ MEMBER(ssl_disable) TRUE, 1.370 + MEMBER(ssl_ca_file) "", 1.371 +- MEMBER(ssl_cert_file) SSLDIR"/certs/dovecot.pem", 1.372 +- MEMBER(ssl_key_file) SSLDIR"/private/dovecot.pem", 1.373 ++ MEMBER(ssl_cert_file) "@l_prefix@/etc/dovecot/ssl/dovecot.crt", 1.374 ++ MEMBER(ssl_key_file) "@l_prefix@/etc/dovecot/ssl/dovecot.key", 1.375 + MEMBER(ssl_key_password) "", 1.376 + MEMBER(ssl_parameters_regenerate) 168, 1.377 + MEMBER(ssl_cipher_list) "", 1.378 +@@ -200,7 +200,7 @@ 1.379 + /* login */ 1.380 + MEMBER(login_dir) "login", 1.381 + MEMBER(login_executable) NULL, 1.382 +- MEMBER(login_user) "dovecot", 1.383 ++ MEMBER(login_user) "@l_musr@", 1.384 + MEMBER(login_greeting) "Dovecot ready.", 1.385 + MEMBER(login_log_format_elements) "user=<%u> method=%m rip=%r lip=%l %c", 1.386 + MEMBER(login_log_format) "%$: %s", 1.387 +@@ -317,7 +317,7 @@ 1.388 + MEMBER(anonymous_username) "anonymous", 1.389 + MEMBER(krb5_keytab) "", 1.390 + MEMBER(gssapi_hostname) "", 1.391 +- MEMBER(winbind_helper_path) "/usr/bin/ntlm_auth", 1.392 ++ MEMBER(winbind_helper_path) "@l_prefix@/bin/ntlm_auth", 1.393 + MEMBER(failure_delay) 2, 1.394 + 1.395 + MEMBER(verbose) FALSE,