1.1 --- a/dovecot/dovecot.patch Sat May 23 16:09:22 2009 +0200 1.2 +++ b/dovecot/dovecot.patch Wed May 27 19:56:08 2009 +0200 1.3 @@ -1,6 +1,30 @@ 1.4 +Index: configure 1.5 +diff -Nau configure.orig configure 1.6 +--- configure.orig 2009-05-18 03:39:51.000000000 +0200 1.7 ++++ configure 2009-05-27 14:29:11.972121045 +0200 1.8 +@@ -28482,14 +28482,14 @@ 1.9 + 1.10 + if test $want_pgsql != no; then 1.11 + # based on code from PHP 1.12 +- for i in /usr /usr/local /usr/local/pgsql; do 1.13 +- for j in include include/pgsql include/postgres include/postgresql ""; do 1.14 ++ for i in @l_prefix@; do 1.15 ++ for j in include/postgresql; do 1.16 + if test -r "$i/$j/libpq-fe.h"; then 1.17 + PGSQL_INCLUDE=$i/$j 1.18 + fi 1.19 + done 1.20 +- for lib in lib lib64; do 1.21 +- for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do 1.22 ++ for lib in lib; do 1.23 ++ for j in $lib; do 1.24 + if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then 1.25 + PGSQL_LIBDIR=$i/$j 1.26 + fi 1.27 Index: configure.in 1.28 ---- configure.in.orig 2009-03-13 23:06:16 +0100 1.29 -+++ configure.in 2009-03-14 09:11:12 +0100 1.30 +diff -Nau configure.in.orig configure.in 1.31 +--- configure.in.orig 2009-05-18 03:39:35.000000000 +0200 1.32 ++++ configure.in 2009-05-27 14:29:11.926298334 +0200 1.33 @@ -1962,14 +1962,14 @@ 1.34 1.35 if test $want_pgsql != no; then 1.36 @@ -20,31 +44,10 @@ 1.37 if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then 1.38 PGSQL_LIBDIR=$i/$j 1.39 fi 1.40 -Index: configure 1.41 ---- configure.orig 2009-03-13 23:06:32 +0100 1.42 -+++ configure 2009-03-14 09:11:12 +0100 1.43 -@@ -27966,14 +27966,14 @@ 1.44 - 1.45 - if test $want_pgsql != no; then 1.46 - # based on code from PHP 1.47 -- for i in /usr /usr/local /usr/local/pgsql; do 1.48 -- for j in include include/pgsql include/postgres include/postgresql ""; do 1.49 -+ for i in @l_prefix@; do 1.50 -+ for j in include/postgresql; do 1.51 - if test -r "$i/$j/libpq-fe.h"; then 1.52 - PGSQL_INCLUDE=$i/$j 1.53 - fi 1.54 - done 1.55 -- for lib in lib lib64; do 1.56 -- for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do 1.57 -+ for lib in lib; do 1.58 -+ for j in $lib; do 1.59 - if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then 1.60 - PGSQL_LIBDIR=$i/$j 1.61 - fi 1.62 Index: doc/dovecot-sql-example.conf 1.63 ---- doc/dovecot-sql-example.conf.orig 2009-01-05 21:49:58 +0100 1.64 -+++ doc/dovecot-sql-example.conf 2009-03-14 09:11:12 +0100 1.65 +diff -Nau doc/dovecot-sql-example.conf.orig doc/dovecot-sql-example.conf 1.66 +--- doc/dovecot-sql-example.conf.orig 2009-01-05 21:49:58.000000000 +0100 1.67 ++++ doc/dovecot-sql-example.conf 2009-05-27 14:29:11.973657746 +0200 1.68 @@ -47,7 +47,8 @@ 1.69 # the default my.cnf location 1.70 # option_group - Read options from the given group (default: client) 1.71 @@ -65,30 +68,25 @@ 1.72 #connect = 1.73 1.74 Index: dovecot-example.conf 1.75 ---- dovecot-example.conf.orig 2009-03-13 22:23:14 +0100 1.76 -+++ dovecot-example.conf 2009-03-14 09:12:40 +0100 1.77 -@@ -11,16 +11,14 @@ 1.78 - 1.79 - # Default values are shown for each setting, it's not required to uncomment 1.80 - # any of the lines. Exception to this are paths, they're just examples with 1.81 --# the real defaults being based on configure options. The paths listed here 1.82 --# are for configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var 1.83 --# --with-ssldir=/etc/ssl 1.84 -+# the real defaults being based on configure options. 1.85 +diff -Nau dovecot-example.conf.orig dovecot-example.conf 1.86 +--- dovecot-example.conf.orig 2009-05-13 18:41:46.000000000 +0200 1.87 ++++ dovecot-example.conf 2009-05-27 14:29:11.981522023 +0200 1.88 +@@ -13,11 +13,10 @@ 1.89 + # those. These are exceptions to this though: No sections (e.g. namespace {}) 1.90 + # or plugin settings are added by default, they're listed only as examples. 1.91 + # Paths are also just examples with the real defaults being based on configure 1.92 +-# options. The paths listed here are for configure --prefix=/usr 1.93 +-# --sysconfdir=/etc --localstatedir=/var --with-ssldir=/etc/ssl 1.94 ++# options. 1.95 1.96 # Base directory where to store runtime data. 1.97 -#base_dir = /var/run/dovecot/ 1.98 +#base_dir = @l_prefix@/var/dovecot/run 1.99 1.100 - # Protocols we want to be serving: imap imaps pop3 pop3s 1.101 + # Protocols we want to be serving: imap imaps pop3 pop3s managesieve 1.102 # If you only want to use dovecot-auth, you can set this to "none". 1.103 --#protocols = imap imaps 1.104 -+#protocols = imap 1.105 - 1.106 - # A space separated list of IP or host addresses where to listen in for 1.107 - # connections. "*" listens in all IPv4 interfaces. "[::]" listens in all IPv6 1.108 -@@ -38,7 +36,7 @@ 1.109 - # listen = *:10100 1.110 +@@ -43,7 +42,7 @@ 1.111 + # listen = *:12000 1.112 # .. 1.113 # } 1.114 -#listen = * 1.115 @@ -96,7 +94,7 @@ 1.116 1.117 # Disable LOGIN command and all other plaintext authentications unless 1.118 # SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP 1.119 -@@ -60,7 +58,9 @@ 1.120 +@@ -65,7 +64,9 @@ 1.121 1.122 # Log file to use for error messages, instead of sending them to syslog. 1.123 # /dev/stderr can be used to log into stderr. 1.124 @@ -107,18 +105,16 @@ 1.125 1.126 # Log file to use for informational and debug messages. 1.127 # Default is the same as log_path. 1.128 -@@ -82,17 +82,17 @@ 1.129 +@@ -87,7 +88,7 @@ 1.130 # IP or host address where to listen in for SSL connections. Remember to also 1.131 # add imaps and/or pop3s to protocols setting. Defaults to same as "listen" 1.132 # setting if not specified. 1.133 -#ssl_listen = 1.134 +#ssl_listen = 127.0.0.1 1.135 1.136 - # Disable SSL/TLS support. <doc/wiki/SSL> 1.137 --#ssl_disable = no 1.138 -+#ssl_disable = yes 1.139 - 1.140 - # PEM encoded X.509 SSL/TLS certificate and private key. They're opened before 1.141 + # Disable SSL/TLS support. <doc/wiki/SSL.txt> 1.142 + #ssl_disable = no 1.143 +@@ -96,8 +97,8 @@ 1.144 # dropping root privileges, so keep the key file unreadable by anyone but 1.145 # root. Included doc/mkcert.sh can be used to easily generate self-signed 1.146 # certificate, just make sure to update the domains in dovecot-openssl.cnf 1.147 @@ -129,7 +125,7 @@ 1.148 1.149 # If key file is password protected, give the password here. Alternatively 1.150 # give it when starting dovecot with -p parameter. Since this file is often 1.151 -@@ -135,7 +135,7 @@ 1.152 +@@ -140,7 +141,7 @@ 1.153 # which login needs to be able to connect to. The sockets are created when 1.154 # running as root, so you don't have to worry about permissions. Note that 1.155 # everything in this directory is deleted when Dovecot is started. 1.156 @@ -138,7 +134,7 @@ 1.157 1.158 # chroot login process to the login_dir. Only reason not to do this is if you 1.159 # wish to run the whole Dovecot without roots. <doc/wiki/Rootless.txt> 1.160 -@@ -145,7 +145,7 @@ 1.161 +@@ -150,7 +151,7 @@ 1.162 # and don't use it anywhere else. The user must also belong to a group where 1.163 # only it has access, it's used to control access for authentication process. 1.164 # Note that this user is NOT used to access mails. <doc/wiki/UserIds.txt> 1.165 @@ -147,10 +143,10 @@ 1.166 1.167 # Set max. process size in megabytes. If you don't use 1.168 # login_process_per_connection you might need to grow this. 1.169 -@@ -266,8 +266,8 @@ 1.170 +@@ -271,8 +272,8 @@ 1.171 # System user and group used to access mails. If you use multiple, userdb 1.172 # can override these by returning uid or gid fields. You can use either numbers 1.173 - # or names. <doc/wiki/UserIds> 1.174 + # or names. <doc/wiki/UserIds.txt> 1.175 -#mail_uid = 1.176 -#mail_gid = 1.177 +#mail_uid = @l_rusr@ 1.178 @@ -158,7 +154,7 @@ 1.179 1.180 # Group to enable temporarily for privileged operations. Currently this is 1.181 # used only with INBOX when either its initial creation or dotlocking fails. 1.182 -@@ -502,8 +502,12 @@ 1.183 +@@ -507,20 +508,24 @@ 1.184 ## 1.185 1.186 protocol imap { 1.187 @@ -172,16 +168,22 @@ 1.188 1.189 # IMAP executable location. Changing this allows you to execute other 1.190 # binaries before the imap process is executed. 1.191 -@@ -515,7 +519,7 @@ 1.192 + # 1.193 + # This would write rawlogs into ~/dovecot.rawlog/ directory: 1.194 +- # mail_executable = /usr/libexec/dovecot/rawlog /usr/libexec/dovecot/imap 1.195 ++ # mail_executable = @l_prefix@/libexec/dovecot/rawlog @l_prefix@/libexec/dovecot/imap 1.196 + # 1.197 + # This would attach gdb into the imap process and write backtraces into 1.198 # /tmp/gdbhelper.* files: 1.199 - # mail_executable = /usr/libexec/dovecot/gdbhelper /usr/libexec/dovecot/imap 1.200 +- # mail_executable = /usr/libexec/dovecot/gdbhelper /usr/libexec/dovecot/imap 1.201 ++ # mail_executable = @l_prefix@/libexec/dovecot/gdbhelper @l_prefix@/libexec/dovecot/imap 1.202 # 1.203 - #mail_executable = /usr/libexec/dovecot/imap 1.204 + #mail_executable = @l_prefix@/libexec/dovecot/imap 1.205 1.206 # Maximum IMAP command line length in bytes. Some clients generate very long 1.207 # command lines with huge mailboxes, so you may need to raise this if you get 1.208 -@@ -529,7 +533,7 @@ 1.209 +@@ -534,7 +539,7 @@ 1.210 # Support for dynamically loadable plugins. mail_plugins is a space separated 1.211 # list of plugins to load. 1.212 #mail_plugins = 1.213 @@ -190,7 +192,7 @@ 1.214 1.215 # Send IMAP capabilities in greeting message. This makes it unnecessary for 1.216 # clients to request it with CAPABILITY command, so it saves one round-trip. 1.217 -@@ -571,12 +575,16 @@ 1.218 +@@ -576,12 +581,16 @@ 1.219 ## 1.220 1.221 protocol pop3 { 1.222 @@ -209,7 +211,7 @@ 1.223 1.224 # Don't try to set mails non-recent or seen with POP3 sessions. This is 1.225 # mostly intended to reduce disk I/O. With maildir it doesn't move files 1.226 -@@ -636,7 +644,7 @@ 1.227 +@@ -641,7 +650,7 @@ 1.228 # Support for dynamically loadable plugins. mail_plugins is a space separated 1.229 # list of plugins to load. 1.230 #mail_plugins = 1.231 @@ -218,7 +220,7 @@ 1.232 1.233 # Workarounds for various client bugs: 1.234 # outlook-no-nuls: 1.235 -@@ -654,6 +662,10 @@ 1.236 +@@ -701,6 +710,10 @@ 1.237 ## 1.238 1.239 protocol lda { 1.240 @@ -229,7 +231,7 @@ 1.241 # Address to use when sending rejection mails. 1.242 postmaster_address = postmaster@example.com 1.243 1.244 -@@ -664,7 +676,7 @@ 1.245 +@@ -711,7 +724,7 @@ 1.246 # Support for dynamically loadable plugins. mail_plugins is a space separated 1.247 # list of plugins to load. 1.248 #mail_plugins = 1.249 @@ -238,7 +240,7 @@ 1.250 1.251 # If user is over quota, return with temporary failure instead of 1.252 # bouncing the mail. 1.253 -@@ -678,7 +690,7 @@ 1.254 +@@ -725,7 +738,7 @@ 1.255 #deliver_log_format = msgid=%m: %$ 1.256 1.257 # Binary to use for sending mails. 1.258 @@ -247,7 +249,7 @@ 1.259 1.260 # Subject: header to use for rejection mails. You can use the same variables 1.261 # as for rejection_reason below. 1.262 -@@ -689,7 +701,7 @@ 1.263 +@@ -736,7 +749,7 @@ 1.264 #rejection_reason = Your message to <%t> was automatically rejected:%n%r 1.265 1.266 # UNIX socket path to master authentication server to find users. 1.267 @@ -256,7 +258,7 @@ 1.268 } 1.269 1.270 ## 1.271 -@@ -697,7 +709,7 @@ 1.272 +@@ -744,7 +757,7 @@ 1.273 ## 1.274 1.275 # Executable location 1.276 @@ -265,7 +267,7 @@ 1.277 1.278 # Set max. process size in megabytes. 1.279 #auth_process_size = 256 1.280 -@@ -787,7 +799,7 @@ 1.281 +@@ -834,7 +847,7 @@ 1.282 #auth_ntlm_use_winbind = no 1.283 1.284 # Path for Samba's ntlm_auth helper binary. 1.285 @@ -274,7 +276,7 @@ 1.286 1.287 # Number of seconds to delay before replying to failed authentications. 1.288 #auth_failure_delay = 2 1.289 -@@ -820,7 +832,7 @@ 1.290 +@@ -867,7 +880,7 @@ 1.291 1.292 #passdb passwd-file { 1.293 # File contains a list of usernames, one per line 1.294 @@ -283,7 +285,7 @@ 1.295 #deny = yes 1.296 #} 1.297 1.298 -@@ -903,13 +915,13 @@ 1.299 +@@ -950,13 +963,13 @@ 1.300 # SQL database <doc/wiki/AuthDatabase.SQL.txt> 1.301 #passdb sql { 1.302 # Path for SQL configuration file, see doc/dovecot-sql-example.conf 1.303 @@ -299,7 +301,7 @@ 1.304 #} 1.305 1.306 # vpopmail authentication <doc/wiki/AuthDatabase.VPopMail.txt> 1.307 -@@ -974,13 +986,13 @@ 1.308 +@@ -1021,13 +1034,13 @@ 1.309 # SQL database <doc/wiki/AuthDatabase.SQL.txt> 1.310 #userdb sql { 1.311 # Path for SQL configuration file, see doc/dovecot-sql-example.conf 1.312 @@ -315,7 +317,7 @@ 1.313 #} 1.314 1.315 # vpopmail <doc/wiki/AuthDatabase.VPopMail.txt> 1.316 -@@ -993,7 +1005,7 @@ 1.317 +@@ -1040,7 +1053,7 @@ 1.318 # authentication with BSDs internally accesses shadow files, which also 1.319 # requires roots. Note that this user is NOT used to access mails. 1.320 # That user is specified by userdb above. 1.321 @@ -324,7 +326,7 @@ 1.322 1.323 # Directory where to chroot the process. Most authentication backends don't 1.324 # work if this is set, and there's no point chrooting if auth_user is root. 1.325 -@@ -1017,7 +1029,7 @@ 1.326 +@@ -1064,7 +1077,7 @@ 1.327 # Master socket provides access to userdb information. It's typically 1.328 # used to give Dovecot's local delivery agent access to userdb so it 1.329 # can find mailbox locations. 1.330 @@ -333,7 +335,7 @@ 1.331 #mode = 0600 1.332 # Default user/group is the one who started dovecot-auth (root) 1.333 #user = 1.334 -@@ -1027,7 +1039,7 @@ 1.335 +@@ -1074,7 +1087,7 @@ 1.336 # The client socket is generally safe to export to everyone. Typical use 1.337 # is to export it to your SMTP server so it can do SMTP AUTH lookups 1.338 # using it. 1.339 @@ -342,7 +344,7 @@ 1.340 #mode = 0660 1.341 #} 1.342 #} 1.343 -@@ -1041,7 +1053,7 @@ 1.344 +@@ -1088,7 +1101,7 @@ 1.345 #auth external { 1.346 # socket connect { 1.347 # master { 1.348 @@ -351,7 +353,7 @@ 1.349 # } 1.350 # } 1.351 #} 1.352 -@@ -1057,8 +1069,8 @@ 1.353 +@@ -1104,8 +1117,8 @@ 1.354 # referenced using URIs in format "proxy::<name>". 1.355 1.356 dict { 1.357 @@ -362,7 +364,7 @@ 1.358 } 1.359 1.360 # Path to Berkeley DB's configuration file. See doc/dovecot-db-example.conf 1.361 -@@ -1109,7 +1121,7 @@ 1.362 +@@ -1156,7 +1169,7 @@ 1.363 # one file for each mailbox, eg. INBOX or sub.mailbox. cache_secs parameter 1.364 # specifies how many seconds to wait between stat()ing dovecot-acl file 1.365 # to see if it changed. 1.366 @@ -371,7 +373,7 @@ 1.367 1.368 # Convert plugin. If set, specifies the source storage path which is 1.369 # converted to destination storage (mail_location) when the user logs in. 1.370 -@@ -1128,14 +1140,14 @@ 1.371 +@@ -1175,14 +1188,14 @@ 1.372 # until the message can be saved within quota limits. The configuration file 1.373 # is a text file where each line is in format: <priority> <mailbox name> 1.374 # Mails are first deleted in lowest -> highest priority number order 1.375 @@ -389,8 +391,9 @@ 1.376 #expire_dict = proxy::expire 1.377 1.378 Index: src/deliver/deliver.c 1.379 ---- src/deliver/deliver.c.orig 2009-02-27 00:31:13 +0100 1.380 -+++ src/deliver/deliver.c 2009-03-14 09:11:12 +0100 1.381 +diff -Nau src/deliver/deliver.c.orig src/deliver/deliver.c 1.382 +--- src/deliver/deliver.c.orig 2009-02-27 00:31:13.000000000 +0100 1.383 ++++ src/deliver/deliver.c 2009-05-27 14:29:11.983461484 +0200 1.384 @@ -41,7 +41,7 @@ 1.385 #include <syslog.h> 1.386 1.387 @@ -401,8 +404,9 @@ 1.388 1.389 /* After buffer grows larger than this, create a temporary file to /tmp 1.390 Index: src/master/master-settings.c 1.391 ---- src/master/master-settings.c.orig 2009-03-13 20:11:53 +0100 1.392 -+++ src/master/master-settings.c 2009-03-14 09:11:12 +0100 1.393 +diff -Nau src/master/master-settings.c.orig src/master/master-settings.c 1.394 +--- src/master/master-settings.c.orig 2009-05-13 19:32:34.000000000 +0200 1.395 ++++ src/master/master-settings.c 2009-05-27 14:29:11.985776641 +0200 1.396 @@ -178,14 +178,14 @@ 1.397 MEMBER(syslog_facility) "mail", 1.398 1.399 @@ -433,7 +437,7 @@ 1.400 MEMBER(login_greeting) "Dovecot ready.", 1.401 MEMBER(login_log_format_elements) "user=<%u> method=%m rip=%r lip=%l %c", 1.402 MEMBER(login_log_format) "%$: %s", 1.403 -@@ -317,7 +317,7 @@ 1.404 +@@ -325,7 +325,7 @@ 1.405 MEMBER(anonymous_username) "anonymous", 1.406 MEMBER(krb5_keytab) "", 1.407 MEMBER(gssapi_hostname) "",