dovecot/dovecot.patch

changeset 237
76b4896bea63
parent 204
5aa32536e189
child 239
d2e66a0e1aa8
equal deleted inserted replaced
3:742bfa74f438 4:8a9230caab94
1 Index: configure.in
2 --- configure.in.orig 2009-07-27 07:26:10 +0200
3 +++ configure.in 2009-07-27 16:49:17 +0200
4 @@ -1970,14 +1970,14 @@
5 AC_CHECK_PROG(PG_CONFIG, pg_config, YES, NO)
6 if test $PG_CONFIG = NO; then
7 # based on code from PHP
8 - for i in /usr /usr/local /usr/local/pgsql; do
9 - for j in include include/pgsql include/postgres include/postgresql ""; do
10 + for i in @l_prefix@; do
11 + for j in include/postgresql; do
12 if test -r "$i/$j/libpq-fe.h"; then
13 PGSQL_INCLUDE=$i/$j
14 fi
15 done
16 - for lib in lib lib64; do
17 - for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do
18 + for lib in lib; do
19 + for j in $lib; do
20 if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then
21 PGSQL_LIBDIR=$i/$j
22 fi
1 Index: configure 23 Index: configure
2 diff -Nau configure.orig configure 24 --- configure.orig 2009-07-27 07:26:28 +0200
3 --- configure.orig 2009-05-18 03:39:51.000000000 +0200 25 +++ configure 2009-07-27 16:50:02 +0200
4 +++ configure 2009-05-27 14:29:11.972121045 +0200 26 @@ -29424,14 +29424,14 @@
5 @@ -28482,14 +28482,14 @@
6 27
7 if test $want_pgsql != no; then 28 if test $PG_CONFIG = NO; then
8 # based on code from PHP 29 # based on code from PHP
9 - for i in /usr /usr/local /usr/local/pgsql; do 30 - for i in /usr /usr/local /usr/local/pgsql; do
10 - for j in include include/pgsql include/postgres include/postgresql ""; do 31 - for j in include include/pgsql include/postgres include/postgresql ""; do
11 + for i in @l_prefix@; do 32 + for i in @l_prefix@; do
12 + for j in include/postgresql; do 33 + for j in include/postgresql; do
13 if test -r "$i/$j/libpq-fe.h"; then 34 if test -r "$i/$j/libpq-fe.h"; then
14 PGSQL_INCLUDE=$i/$j 35 PGSQL_INCLUDE=$i/$j
15 fi 36 fi
16 done 37 done
17 - for lib in lib lib64; do 38 - for lib in lib lib64; do
18 - for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do 39 - for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do
19 + for lib in lib; do 40 + for lib in lib; do
20 + for j in $lib; do 41 + for j in $lib; do
21 if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then 42 if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then
22 PGSQL_LIBDIR=$i/$j 43 PGSQL_LIBDIR=$i/$j
23 fi 44 fi
24 Index: configure.in
25 diff -Nau configure.in.orig configure.in
26 --- configure.in.orig 2009-05-18 03:39:35.000000000 +0200
27 +++ configure.in 2009-05-27 14:29:11.926298334 +0200
28 @@ -1962,14 +1962,14 @@
29
30 if test $want_pgsql != no; then
31 # based on code from PHP
32 - for i in /usr /usr/local /usr/local/pgsql; do
33 - for j in include include/pgsql include/postgres include/postgresql ""; do
34 + for i in @l_prefix@; do
35 + for j in include/postgresql; do
36 if test -r "$i/$j/libpq-fe.h"; then
37 PGSQL_INCLUDE=$i/$j
38 fi
39 done
40 - for lib in lib lib64; do
41 - for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do
42 + for lib in lib; do
43 + for j in $lib; do
44 if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then
45 PGSQL_LIBDIR=$i/$j
46 fi
47 Index: doc/dovecot-sql-example.conf
48 diff -Nau doc/dovecot-sql-example.conf.orig doc/dovecot-sql-example.conf
49 --- doc/dovecot-sql-example.conf.orig 2009-01-05 21:49:58.000000000 +0100
50 +++ doc/dovecot-sql-example.conf 2009-05-27 14:29:11.973657746 +0200
51 @@ -47,7 +47,8 @@
52 # the default my.cnf location
53 # option_group - Read options from the given group (default: client)
54 #
55 -# You can connect to UNIX sockets by using host: host=/var/run/mysql.sock
56 +# You can connect to UNIX sockets by using host:
57 +# host=@l_prefix@/var/mysql/mysql.sock
58 # Note that currently you can't use spaces in parameters.
59 #
60 # MySQL supports multiple host parameters for load balancing / HA.
61 @@ -58,7 +59,7 @@
62 # Examples:
63 # connect = host=192.168.1.1 dbname=users
64 # connect = host=sql.example.com dbname=virtual user=virtual password=blarg
65 -# connect = /etc/dovecot/authdb.sqlite
66 +# connect = @l_prefix@/etc/dovecot/authdb.sqlite
67 #
68 #connect =
69
70 Index: dovecot-example.conf
71 diff -Nau dovecot-example.conf.orig dovecot-example.conf
72 --- dovecot-example.conf.orig 2009-05-13 18:41:46.000000000 +0200
73 +++ dovecot-example.conf 2009-05-27 14:29:11.981522023 +0200
74 @@ -13,11 +13,10 @@
75 # those. These are exceptions to this though: No sections (e.g. namespace {})
76 # or plugin settings are added by default, they're listed only as examples.
77 # Paths are also just examples with the real defaults being based on configure
78 -# options. The paths listed here are for configure --prefix=/usr
79 -# --sysconfdir=/etc --localstatedir=/var --with-ssldir=/etc/ssl
80 +# options.
81
82 # Base directory where to store runtime data.
83 -#base_dir = /var/run/dovecot/
84 +#base_dir = @l_prefix@/var/dovecot/run
85
86 # Protocols we want to be serving: imap imaps pop3 pop3s managesieve
87 # If you only want to use dovecot-auth, you can set this to "none".
88 @@ -43,7 +42,7 @@
89 # listen = *:12000
90 # ..
91 # }
92 -#listen = *
93 +#listen = 127.0.0.1
94
95 # Disable LOGIN command and all other plaintext authentications unless
96 # SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP
97 @@ -65,7 +64,9 @@
98
99 # Log file to use for error messages, instead of sending them to syslog.
100 # /dev/stderr can be used to log into stderr.
101 -#log_path =
102 +log_path = @l_prefix@/var/dovecot/log/dovecot-error.log # Error messages.
103 +info_log_path = @l_prefix@/var/dovecot/log/dovecot-info.log # Info/debug messages.
104 +log_timestamp = '%b %d %H:%M:%S ' # Prefix for each line written to log file.
105
106 # Log file to use for informational and debug messages.
107 # Default is the same as log_path.
108 @@ -87,7 +88,7 @@
109 # IP or host address where to listen in for SSL connections. Remember to also
110 # add imaps and/or pop3s to protocols setting. Defaults to same as "listen"
111 # setting if not specified.
112 -#ssl_listen =
113 +#ssl_listen = 127.0.0.1
114
115 # Disable SSL/TLS support. <doc/wiki/SSL.txt>
116 #ssl_disable = no
117 @@ -96,8 +97,8 @@
118 # dropping root privileges, so keep the key file unreadable by anyone but
119 # root. Included doc/mkcert.sh can be used to easily generate self-signed
120 # certificate, just make sure to update the domains in dovecot-openssl.cnf
121 -#ssl_cert_file = /etc/ssl/certs/dovecot.pem
122 -#ssl_key_file = /etc/ssl/private/dovecot.pem
123 +#ssl_cert_file = @l_prefix@/etc/dovecot/ssl/dovecot.crt
124 +#ssl_key_file = @l_prefix@/etc/dovecot/ssl/dovecot.key
125
126 # If key file is password protected, give the password here. Alternatively
127 # give it when starting dovecot with -p parameter. Since this file is often
128 @@ -140,7 +141,7 @@
129 # which login needs to be able to connect to. The sockets are created when
130 # running as root, so you don't have to worry about permissions. Note that
131 # everything in this directory is deleted when Dovecot is started.
132 -#login_dir = /var/run/dovecot/login
133 +#login_dir = @l_prefix@/var/dovecot/run/login
134
135 # chroot login process to the login_dir. Only reason not to do this is if you
136 # wish to run the whole Dovecot without roots. <doc/wiki/Rootless.txt>
137 @@ -150,7 +151,7 @@
138 # and don't use it anywhere else. The user must also belong to a group where
139 # only it has access, it's used to control access for authentication process.
140 # Note that this user is NOT used to access mails. <doc/wiki/UserIds.txt>
141 -#login_user = dovecot
142 +#login_user = @l_nusr@
143
144 # Set max. process size in megabytes. If you don't use
145 # login_process_per_connection you might need to grow this.
146 @@ -271,8 +272,8 @@
147 # System user and group used to access mails. If you use multiple, userdb
148 # can override these by returning uid or gid fields. You can use either numbers
149 # or names. <doc/wiki/UserIds.txt>
150 -#mail_uid =
151 -#mail_gid =
152 +#mail_uid = @l_rusr@
153 +#mail_gid = @l_rusr@
154
155 # Group to enable temporarily for privileged operations. Currently this is
156 # used only with INBOX when either its initial creation or dotlocking fails.
157 @@ -507,20 +508,24 @@
158 ##
159
160 protocol imap {
161 + # Override main log file paths
162 + log_path = @l_prefix@/var/dovecot/log/imap-error.log
163 + info_log_path = @l_prefix@/var/dovecot/log/imap-info.log
164 +
165 # Login executable location.
166 - #login_executable = /usr/libexec/dovecot/imap-login
167 + #login_executable = @l_prefix@/libexec/dovecot/imap-login
168
169 # IMAP executable location. Changing this allows you to execute other
170 # binaries before the imap process is executed.
171 #
172 # This would write rawlogs into ~/dovecot.rawlog/ directory:
173 - # mail_executable = /usr/libexec/dovecot/rawlog /usr/libexec/dovecot/imap
174 + # mail_executable = @l_prefix@/libexec/dovecot/rawlog @l_prefix@/libexec/dovecot/imap
175 #
176 # This would attach gdb into the imap process and write backtraces into
177 # /tmp/gdbhelper.* files:
178 - # mail_executable = /usr/libexec/dovecot/gdbhelper /usr/libexec/dovecot/imap
179 + # mail_executable = @l_prefix@/libexec/dovecot/gdbhelper @l_prefix@/libexec/dovecot/imap
180 #
181 - #mail_executable = /usr/libexec/dovecot/imap
182 + #mail_executable = @l_prefix@/libexec/dovecot/imap
183
184 # Maximum IMAP command line length in bytes. Some clients generate very long
185 # command lines with huge mailboxes, so you may need to raise this if you get
186 @@ -534,7 +539,7 @@
187 # Support for dynamically loadable plugins. mail_plugins is a space separated
188 # list of plugins to load.
189 #mail_plugins =
190 - #mail_plugin_dir = /usr/lib/dovecot/imap
191 + #mail_plugin_dir = @l_prefix@/lib/dovecot/imap
192
193 # Send IMAP capabilities in greeting message. This makes it unnecessary for
194 # clients to request it with CAPABILITY command, so it saves one round-trip.
195 @@ -576,12 +581,16 @@
196 ##
197
198 protocol pop3 {
199 + # Override main log file paths
200 + log_path = @l_prefix@/var/dovecot/log/pop3-error.log
201 + info_log_path = @l_prefix@/var/dovecot/log/pop3-info.log
202 +
203 # Login executable location.
204 - #login_executable = /usr/libexec/dovecot/pop3-login
205 + #login_executable = @l_prefix@/libexec/dovecot/pop3-login
206
207 # POP3 executable location. See IMAP's mail_executable above for examples
208 # how this could be changed.
209 - #mail_executable = /usr/libexec/dovecot/pop3
210 + #mail_executable = @l_prefix@/libexec/dovecot/pop3
211
212 # Don't try to set mails non-recent or seen with POP3 sessions. This is
213 # mostly intended to reduce disk I/O. With maildir it doesn't move files
214 @@ -641,7 +650,7 @@
215 # Support for dynamically loadable plugins. mail_plugins is a space separated
216 # list of plugins to load.
217 #mail_plugins =
218 - #mail_plugin_dir = /usr/lib/dovecot/pop3
219 + #mail_plugin_dir = @l_prefix@/lib/dovecot/pop3
220
221 # Workarounds for various client bugs:
222 # outlook-no-nuls:
223 @@ -701,6 +710,10 @@
224 ##
225
226 protocol lda {
227 + # Override main log file paths
228 + log_path = @l_prefix@/var/dovecot/log/deliver-error.log
229 + info_log_path = @l_prefix@/var/dovecot/log/deliver-info.log
230 +
231 # Address to use when sending rejection mails.
232 postmaster_address = postmaster@example.com
233
234 @@ -711,7 +724,7 @@
235 # Support for dynamically loadable plugins. mail_plugins is a space separated
236 # list of plugins to load.
237 #mail_plugins =
238 - #mail_plugin_dir = /usr/lib/dovecot/lda
239 + #mail_plugin_dir = @l_prefix@/lib/dovecot/lda
240
241 # If user is over quota, return with temporary failure instead of
242 # bouncing the mail.
243 @@ -725,7 +738,7 @@
244 #deliver_log_format = msgid=%m: %$
245
246 # Binary to use for sending mails.
247 - #sendmail_path = /usr/lib/sendmail
248 + #sendmail_path = @l_prefix@/sbin/sendmail
249
250 # Subject: header to use for rejection mails. You can use the same variables
251 # as for rejection_reason below.
252 @@ -736,7 +749,7 @@
253 #rejection_reason = Your message to <%t> was automatically rejected:%n%r
254
255 # UNIX socket path to master authentication server to find users.
256 - #auth_socket_path = /var/run/dovecot/auth-master
257 + #auth_socket_path = @l_prefix@/var/dovecot/run/auth-master
258 }
259
260 ##
261 @@ -744,7 +757,7 @@
262 ##
263
264 # Executable location
265 -#auth_executable = /usr/libexec/dovecot/dovecot-auth
266 +#auth_executable = @l_prefix@/libexec/dovecot/dovecot-auth
267
268 # Set max. process size in megabytes.
269 #auth_process_size = 256
270 @@ -834,7 +847,7 @@
271 #auth_ntlm_use_winbind = no
272
273 # Path for Samba's ntlm_auth helper binary.
274 -#auth_winbind_helper_path = /usr/bin/ntlm_auth
275 +#auth_winbind_helper_path = @l_prefix@/bin/ntlm_auth
276
277 # Number of seconds to delay before replying to failed authentications.
278 #auth_failure_delay = 2
279 @@ -867,7 +880,7 @@
280
281 #passdb passwd-file {
282 # File contains a list of usernames, one per line
283 - #args = /etc/dovecot.deny
284 + #args = @l_prefix@/etc/dovecot/dovecot.deny
285 #deny = yes
286 #}
287
288 @@ -950,13 +963,13 @@
289 # SQL database <doc/wiki/AuthDatabase.SQL.txt>
290 #passdb sql {
291 # Path for SQL configuration file, see doc/dovecot-sql-example.conf
292 - #args =
293 + #args = @l_prefix@/etc/dovecot/dovecot-sql.conf
294 #}
295
296 # LDAP database <doc/wiki/AuthDatabase.LDAP.txt>
297 #passdb ldap {
298 # Path for LDAP configuration file, see doc/dovecot-ldap-example.conf
299 - #args =
300 + #args = @l_prefix@/etc/dovecot/dovecot-ldap.conf
301 #}
302
303 # vpopmail authentication <doc/wiki/AuthDatabase.VPopMail.txt>
304 @@ -1021,13 +1034,13 @@
305 # SQL database <doc/wiki/AuthDatabase.SQL.txt>
306 #userdb sql {
307 # Path for SQL configuration file, see doc/dovecot-sql-example.conf
308 - #args =
309 + #args = @l_prefix@/etc/dovecot/dovecot-sql.conf
310 #}
311
312 # LDAP database <doc/wiki/AuthDatabase.LDAP.txt>
313 #userdb ldap {
314 # Path for LDAP configuration file, see doc/dovecot-ldap-example.conf
315 - #args =
316 + #args = @l_prefix@/etc/dovecot/dovecot-ldap.conf
317 #}
318
319 # vpopmail <doc/wiki/AuthDatabase.VPopMail.txt>
320 @@ -1040,7 +1053,7 @@
321 # authentication with BSDs internally accesses shadow files, which also
322 # requires roots. Note that this user is NOT used to access mails.
323 # That user is specified by userdb above.
324 - user = root
325 + user = @l_nusr@
326
327 # Directory where to chroot the process. Most authentication backends don't
328 # work if this is set, and there's no point chrooting if auth_user is root.
329 @@ -1064,7 +1077,7 @@
330 # Master socket provides access to userdb information. It's typically
331 # used to give Dovecot's local delivery agent access to userdb so it
332 # can find mailbox locations.
333 - #path = /var/run/dovecot/auth-master
334 + #path = @l_prefix@/var/dovecot/run/auth-master
335 #mode = 0600
336 # Default user/group is the one who started dovecot-auth (root)
337 #user =
338 @@ -1074,7 +1087,7 @@
339 # The client socket is generally safe to export to everyone. Typical use
340 # is to export it to your SMTP server so it can do SMTP AUTH lookups
341 # using it.
342 - #path = /var/run/dovecot/auth-client
343 + #path = @l_prefix@/var/dovecot/run/auth-client
344 #mode = 0660
345 #}
346 #}
347 @@ -1088,7 +1101,7 @@
348 #auth external {
349 # socket connect {
350 # master {
351 -# path = /var/run/dovecot/auth-master
352 +# path = @l_prefix@/dovecot/run/auth-master
353 # }
354 # }
355 #}
356 @@ -1104,8 +1117,8 @@
357 # referenced using URIs in format "proxy::<name>".
358
359 dict {
360 - #quota = mysql:/etc/dovecot-dict-quota.conf
361 - #expire = db:/var/lib/dovecot/expire.db
362 + #quota = mysql:@l_prefix@/etc/dovecot/dovecot-dict-quota.conf
363 + #expire = db:@l_prefix@/var/dovecot/lib/expire.db
364 }
365
366 # Path to Berkeley DB's configuration file. See doc/dovecot-db-example.conf
367 @@ -1156,7 +1169,7 @@
368 # one file for each mailbox, eg. INBOX or sub.mailbox. cache_secs parameter
369 # specifies how many seconds to wait between stat()ing dovecot-acl file
370 # to see if it changed.
371 - #acl = vfile:/etc/dovecot-acls:cache_secs=300
372 + #acl = vfile:@l_prefix@/etc/dovecot/dovecot-acls:cache_secs=300
373
374 # Convert plugin. If set, specifies the source storage path which is
375 # converted to destination storage (mail_location) when the user logs in.
376 @@ -1175,14 +1188,14 @@
377 # until the message can be saved within quota limits. The configuration file
378 # is a text file where each line is in format: <priority> <mailbox name>
379 # Mails are first deleted in lowest -> highest priority number order
380 - #trash = /etc/dovecot-trash.conf
381 + #trash = @l_prefix@/etc/dovecot/dovecot-trash.conf
382
383 # Expire plugin. Mails are expunged from mailboxes after being there the
384 # configurable time. The first expiration date for each mailbox is stored in
385 # a dictionary so it can be quickly determined which mailboxes contain
386 # expired mails. The actual expunging is done in a nightly cronjob, which
387 # you must set up:
388 - # dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool
389 + # dovecot --exec-mail ext @l_prefix@/libexec/dovecot/expire-tool
390 #expire = Trash 7 Spam 30
391 #expire_dict = proxy::expire
392
393 Index: src/deliver/deliver.c 45 Index: src/deliver/deliver.c
394 diff -Nau src/deliver/deliver.c.orig src/deliver/deliver.c 46 --- src/deliver/deliver.c.orig 2009-06-28 01:47:56 +0200
395 --- src/deliver/deliver.c.orig 2009-02-27 00:31:13.000000000 +0100 47 +++ src/deliver/deliver.c 2009-07-27 16:47:39 +0200
396 +++ src/deliver/deliver.c 2009-05-27 14:29:11.983461484 +0200 48 @@ -46,7 +46,7 @@
397 @@ -41,7 +41,7 @@
398 #include <syslog.h> 49 #include <syslog.h>
399 50
400 #define DEFAULT_CONFIG_FILE SYSCONFDIR"/dovecot.conf" 51 #define DEFAULT_CONFIG_FILE SYSCONFDIR"/dovecot.conf"
401 -#define DEFAULT_SENDMAIL_PATH "/usr/lib/sendmail" 52 -#define DEFAULT_SENDMAIL_PATH "/usr/lib/sendmail"
402 +#define DEFAULT_SENDMAIL_PATH "@l_prefix@/sbin/sendmail" 53 +#define DEFAULT_SENDMAIL_PATH "@l_prefix@/sbin/sendmail"
403 #define DEFAULT_ENVELOPE_SENDER "MAILER-DAEMON" 54 #define DEFAULT_ENVELOPE_SENDER "MAILER-DAEMON"
404 55
405 /* After buffer grows larger than this, create a temporary file to /tmp 56 /* After buffer grows larger than this, create a temporary file to /tmp
406 Index: src/master/master-settings.c
407 diff -Nau src/master/master-settings.c.orig src/master/master-settings.c
408 --- src/master/master-settings.c.orig 2009-05-13 19:32:34.000000000 +0200
409 +++ src/master/master-settings.c 2009-05-27 14:29:11.985776641 +0200
410 @@ -178,14 +178,14 @@
411 MEMBER(syslog_facility) "mail",
412
413 /* general */
414 - MEMBER(protocols) "imap imaps",
415 - MEMBER(listen) "*",
416 - MEMBER(ssl_listen) "",
417 + MEMBER(protocols) "imap",
418 + MEMBER(listen) "127.0.0.1",
419 + MEMBER(ssl_listen) "127.0.0.1",
420
421 - MEMBER(ssl_disable) FALSE,
422 + MEMBER(ssl_disable) TRUE,
423 MEMBER(ssl_ca_file) "",
424 - MEMBER(ssl_cert_file) SSLDIR"/certs/dovecot.pem",
425 - MEMBER(ssl_key_file) SSLDIR"/private/dovecot.pem",
426 + MEMBER(ssl_cert_file) "@l_prefix@/etc/dovecot/ssl/dovecot.crt",
427 + MEMBER(ssl_key_file) "@l_prefix@/etc/dovecot/ssl/dovecot.key",
428 MEMBER(ssl_key_password) "",
429 MEMBER(ssl_parameters_regenerate) 168,
430 MEMBER(ssl_cipher_list) "",
431 @@ -200,7 +200,7 @@
432 /* login */
433 MEMBER(login_dir) "login",
434 MEMBER(login_executable) NULL,
435 - MEMBER(login_user) "dovecot",
436 + MEMBER(login_user) "@l_musr@",
437 MEMBER(login_greeting) "Dovecot ready.",
438 MEMBER(login_log_format_elements) "user=<%u> method=%m rip=%r lip=%l %c",
439 MEMBER(login_log_format) "%$: %s",
440 @@ -325,7 +325,7 @@
441 MEMBER(anonymous_username) "anonymous",
442 MEMBER(krb5_keytab) "",
443 MEMBER(gssapi_hostname) "",
444 - MEMBER(winbind_helper_path) "/usr/bin/ntlm_auth",
445 + MEMBER(winbind_helper_path) "@l_prefix@/bin/ntlm_auth",
446 MEMBER(failure_delay) 2,
447
448 MEMBER(verbose) FALSE,

mercurial