dovecot.patch 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. Index: configure
  2. --- configure.orig 2008-05-05 00:02:24.000000000 +0200
  3. +++ configure 2008-05-16 12:09:26.000000000 +0200
  4. @@ -31919,14 +31919,14 @@
  5. if test $want_pgsql != no; then
  6. # based on code from PHP
  7. - for i in /usr /usr/local /usr/local/pgsql; do
  8. - for j in include include/pgsql include/postgres include/postgresql ""; do
  9. + for i in @l_prefix@; do
  10. + for j in include/postgresql; do
  11. if test -r "$i/$j/libpq-fe.h"; then
  12. PGSQL_INCLUDE=$i/$j
  13. fi
  14. done
  15. - for lib in lib lib64; do
  16. - for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do
  17. + for lib in lib; do
  18. + for j in $lib; do
  19. if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then
  20. PGSQL_LIBDIR=$i/$j
  21. fi
  22. Index: configure.in
  23. --- configure.in.orig 2008-05-05 00:01:52.000000000 +0200
  24. +++ configure.in 2008-05-16 12:09:26.000000000 +0200
  25. @@ -1753,14 +1753,14 @@
  26. if test $want_pgsql != no; then
  27. # based on code from PHP
  28. - for i in /usr /usr/local /usr/local/pgsql; do
  29. - for j in include include/pgsql include/postgres include/postgresql ""; do
  30. + for i in @l_prefix@; do
  31. + for j in include/postgresql; do
  32. if test -r "$i/$j/libpq-fe.h"; then
  33. PGSQL_INCLUDE=$i/$j
  34. fi
  35. done
  36. - for lib in lib lib64; do
  37. - for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do
  38. + for lib in lib; do
  39. + for j in $lib; do
  40. if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then
  41. PGSQL_LIBDIR=$i/$j
  42. fi
  43. Index: doc/dovecot-sql-example.conf
  44. --- doc/dovecot-sql-example.conf.orig 2008-05-05 00:01:52.000000000 +0200
  45. +++ doc/dovecot-sql-example.conf 2008-05-16 12:09:26.000000000 +0200
  46. @@ -47,7 +47,8 @@
  47. # the default my.cnf location
  48. # option_group - Read options from the given group (default: client)
  49. #
  50. -# You can connect to UNIX sockets by using host: host=/var/run/mysql.sock
  51. +# You can connect to UNIX sockets by using host:
  52. +# host=@l_prefix@/var/mysql/mysql.sock
  53. # Note that currently you can't use spaces in parameters.
  54. #
  55. # sqlite:
  56. @@ -56,7 +57,7 @@
  57. # Examples:
  58. # connect = host=192.168.1.1 dbname=users
  59. # connect = host=sql.example.com dbname=virtual user=virtual password=blarg
  60. -# connect = /etc/dovecot/authdb.sqlite
  61. +# connect = @l_prefix@/etc/dovecot/authdb.sqlite
  62. #
  63. #connect =
  64. Index: dovecot-example.conf
  65. --- dovecot-example.conf.orig 2008-05-05 00:01:52.000000000 +0200
  66. +++ dovecot-example.conf 2008-05-16 12:11:39.000000000 +0200
  67. @@ -11,16 +11,14 @@
  68. # Default values are shown for each setting, it's not required to uncomment
  69. # any of the lines. Exception to this are paths, they're just examples with
  70. -# the real defaults being based on configure options. The paths listed here
  71. -# are for configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
  72. -# --with-ssldir=/etc/ssl
  73. +# the real defaults being based on configure options.
  74. # Base directory where to store runtime data.
  75. -#base_dir = /var/run/dovecot/
  76. +#base_dir = @l_prefix@/var/dovecot/run
  77. # Protocols we want to be serving: imap imaps pop3 pop3s
  78. # If you only want to use dovecot-auth, you can set this to "none".
  79. -#protocols = imap imaps
  80. +#protocols = imap
  81. # A space separated list of IP or host addresses where to listen in for
  82. # connections. "*" listens in all IPv4 interfaces. "[::]" listens in all IPv6
  83. @@ -39,7 +37,7 @@
  84. # listen = *:10100
  85. # ..
  86. # }
  87. -#listen = *
  88. +#listen = 127.0.0.1
  89. # Disable LOGIN command and all other plaintext authentications unless
  90. # SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP
  91. @@ -82,17 +80,17 @@
  92. # IP or host address where to listen in for SSL connections. Defaults
  93. # to above if not specified.
  94. -#ssl_listen =
  95. +#ssl_listen = 127.0.0.1
  96. # Disable SSL/TLS support.
  97. -#ssl_disable = no
  98. +#ssl_disable = yes
  99. # PEM encoded X.509 SSL/TLS certificate and private key. They're opened before
  100. # dropping root privileges, so keep the key file unreadable by anyone but
  101. # root. Included doc/mkcert.sh can be used to easily generate self-signed
  102. # certificate, just make sure to update the domains in dovecot-openssl.cnf
  103. -#ssl_cert_file = /etc/ssl/certs/dovecot.pem
  104. -#ssl_key_file = /etc/ssl/private/dovecot.pem
  105. +#ssl_cert_file = @l_prefix@/etc/dovecot/ssl/dovecot.crt
  106. +#ssl_key_file = @l_prefix@/etc/dovecot/ssl/dovecot.key
  107. # If key file is password protected, give the password here. Alternatively
  108. # give it when starting dovecot with -p parameter.
  109. @@ -133,7 +131,7 @@
  110. # which login needs to be able to connect to. The sockets are created when
  111. # running as root, so you don't have to worry about permissions. Note that
  112. # everything in this directory is deleted when Dovecot is started.
  113. -#login_dir = /var/run/dovecot/login
  114. +#login_dir = @l_prefix@/var/dovecot/run/login
  115. # chroot login process to the login_dir. Only reason not to do this is if you
  116. # wish to run the whole Dovecot without roots. <doc/wiki/Rootless.txt>
  117. @@ -143,7 +141,7 @@
  118. # and don't use it anywhere else. The user must also belong to a group where
  119. # only it has access, it's used to control access for authentication process.
  120. # Note that this user is NOT used to access mails. <doc/wiki/UserIds.txt>
  121. -#login_user = dovecot
  122. +#login_user = @l_musr@
  123. # Set max. process size in megabytes. If you don't use
  124. # login_process_per_connection you might need to grow this.
  125. @@ -503,7 +501,7 @@
  126. protocol imap {
  127. # Login executable location.
  128. - #login_executable = /usr/libexec/dovecot/imap-login
  129. + #login_executable = @l_prefix@/libexec/dovecot/imap-login
  130. # IMAP executable location. Changing this allows you to execute other
  131. # binaries before the imap process is executed.
  132. @@ -515,7 +513,7 @@
  133. # /tmp/gdbhelper.* files:
  134. # mail_executable = /usr/libexec/dovecot/gdbhelper /usr/libexec/dovecot/imap
  135. #
  136. - #mail_executable = /usr/libexec/dovecot/imap
  137. + #mail_executable = @l_prefix@/libexec/dovecot/imap
  138. # Maximum IMAP command line length in bytes. Some clients generate very long
  139. # command lines with huge mailboxes, so you may need to raise this if you get
  140. @@ -529,7 +527,7 @@
  141. # Support for dynamically loadable plugins. mail_plugins is a space separated
  142. # list of plugins to load.
  143. #mail_plugins =
  144. - #mail_plugin_dir = /usr/lib/dovecot/imap
  145. + #mail_plugin_dir = @l_prefix@/lib/dovecot/imap
  146. # Send IMAP capabilities in greeting message. This makes it unnecessary for
  147. # clients to request it with CAPABILITY command, so it saves one round-trip.
  148. @@ -572,11 +570,11 @@
  149. protocol pop3 {
  150. # Login executable location.
  151. - #login_executable = /usr/libexec/dovecot/pop3-login
  152. + #login_executable = @l_prefix@/libexec/dovecot/pop3-login
  153. # POP3 executable location. See IMAP's mail_executable above for examples
  154. # how this could be changed.
  155. - #mail_executable = /usr/libexec/dovecot/pop3
  156. + #mail_executable = @l_prefix@/libexec/dovecot/pop3
  157. # Don't try to set mails non-recent or seen with POP3 sessions. This is
  158. # mostly intended to reduce disk I/O. With maildir it doesn't move files
  159. @@ -636,7 +634,7 @@
  160. # Support for dynamically loadable plugins. mail_plugins is a space separated
  161. # list of plugins to load.
  162. #mail_plugins =
  163. - #mail_plugin_dir = /usr/lib/dovecot/pop3
  164. + #mail_plugin_dir = @l_prefix@/lib/dovecot/pop3
  165. # Workarounds for various client bugs:
  166. # outlook-no-nuls:
  167. @@ -664,7 +662,7 @@
  168. # Support for dynamically loadable plugins. mail_plugins is a space separated
  169. # list of plugins to load.
  170. #mail_plugins =
  171. - #mail_plugin_dir = /usr/lib/dovecot/lda
  172. + #mail_plugin_dir = @l_prefix@/lib/dovecot/lda
  173. # If user is over quota, return with temporary failure instead of
  174. # bouncing the mail.
  175. @@ -678,14 +676,14 @@
  176. #deliver_log_format = msgid=%m: %$
  177. # Binary to use for sending mails.
  178. - #sendmail_path = /usr/lib/sendmail
  179. + #sendmail_path = @l_prefix@/sbin/sendmail
  180. # Human readable error message for rejection mails. Use can use variables:
  181. # %n = CRLF, %r = reason, %s = subject, %t = recipient
  182. #rejection_reason = Your message to <%t> was automatically rejected:%n%r
  183. # UNIX socket path to master authentication server to find users.
  184. - #auth_socket_path = /var/run/dovecot/auth-master
  185. + #auth_socket_path = @l_prefix@/var/dovecot/run/auth-master
  186. }
  187. ##
  188. @@ -693,7 +691,7 @@
  189. ##
  190. # Executable location
  191. -#auth_executable = /usr/libexec/dovecot/dovecot-auth
  192. +#auth_executable = @l_prefix@/libexec/dovecot/dovecot-auth
  193. # Set max. process size in megabytes.
  194. #auth_process_size = 256
  195. @@ -783,7 +781,7 @@
  196. #auth_ntlm_use_winbind = no
  197. # Path for Samba's ntlm_auth helper binary.
  198. -#auth_winbind_helper_path = /usr/bin/ntlm_auth
  199. +#auth_winbind_helper_path = @l_prefix@/bin/ntlm_auth
  200. # Number of seconds to delay before replying to failed authentications.
  201. #auth_failure_delay = 2
  202. @@ -816,7 +814,7 @@
  203. #passdb passwd-file {
  204. # File contains a list of usernames, one per line
  205. - #args = /etc/dovecot.deny
  206. + #args = @l_prefix@/etc/dovecot/dovecot.deny
  207. #deny = yes
  208. #}
  209. @@ -899,13 +897,13 @@
  210. # SQL database <doc/wiki/AuthDatabase.SQL.txt>
  211. #passdb sql {
  212. # Path for SQL configuration file, see doc/dovecot-sql-example.conf
  213. - #args =
  214. + #args = @l_prefix@/etc/dovecot/dovecot-sql.conf
  215. #}
  216. # LDAP database <doc/wiki/AuthDatabase.LDAP.txt>
  217. #passdb ldap {
  218. # Path for LDAP configuration file, see doc/dovecot-ldap-example.conf
  219. - #args =
  220. + #args = @l_prefix@/etc/dovecot/dovecot-ldap.conf
  221. #}
  222. # vpopmail authentication <doc/wiki/AuthDatabase.VPopMail.txt>
  223. @@ -962,13 +960,13 @@
  224. # SQL database <doc/wiki/AuthDatabase.SQL.txt>
  225. #userdb sql {
  226. # Path for SQL configuration file, see doc/dovecot-sql-example.conf
  227. - #args =
  228. + #args = @l_prefix@/etc/dovecot/dovecot-sql.conf
  229. #}
  230. # LDAP database <doc/wiki/AuthDatabase.LDAP.txt>
  231. #userdb ldap {
  232. # Path for LDAP configuration file, see doc/dovecot-ldap-example.conf
  233. - #args =
  234. + #args = @l_prefix@/etc/dovecot/dovecot-ldap.conf
  235. #}
  236. # vpopmail <doc/wiki/AuthDatabase.VPopMail.txt>
  237. @@ -1013,7 +1011,7 @@
  238. # Master socket provides access to userdb information. It's typically
  239. # used to give Dovecot's local delivery agent access to userdb so it
  240. # can find mailbox locations.
  241. - #path = /var/run/dovecot/auth-master
  242. + #path = @l_prefix@/dovecot/run/auth-master
  243. #mode = 0600
  244. # Default user/group is the one who started dovecot-auth (root)
  245. #user =
  246. @@ -1023,7 +1021,7 @@
  247. # The client socket is generally safe to export to everyone. Typical use
  248. # is to export it to your SMTP server so it can do SMTP AUTH lookups
  249. # using it.
  250. - #path = /var/run/dovecot/auth-client
  251. + #path = @l_prefix@/dovecot/run/auth-client
  252. #mode = 0660
  253. #}
  254. #}
  255. @@ -1037,7 +1035,7 @@
  256. #auth external {
  257. # socket connect {
  258. # master {
  259. -# path = /var/run/dovecot/auth-master
  260. +# path = @l_prefix@/dovecot/run/auth-master
  261. # }
  262. # }
  263. #}
  264. @@ -1053,7 +1051,7 @@
  265. # referenced using URIs in format "proxy:<name>".
  266. dict {
  267. - #quota = mysql:/etc/dovecot-dict-quota.conf
  268. + #quota = mysql:@l_prefix@/etc/dovecot/dovecot-dict-quota.conf
  269. }
  270. # Path to Berkeley DB's configuration file. See doc/dovecot-db.conf for an
  271. @@ -1105,7 +1103,7 @@
  272. # one file for each mailbox, eg. INBOX or sub.mailbox. cache_secs parameter
  273. # specifies how many seconds to wait between stat()ing dovecot-acl file
  274. # to see if it changed.
  275. - #acl = vfile:/etc/dovecot-acls:cache_secs=300
  276. + #acl = vfile:@l_prefix@/etc/dovecot/dovecot-acls:cache_secs=300
  277. # Convert plugin. If set, specifies the source storage path which is
  278. # converted to destination storage (mail_location) when the user logs in.
  279. @@ -1124,16 +1122,16 @@
  280. # until the message can be saved within quota limits. The configuration file
  281. # is a text file where each line is in format: <priority> <mailbox name>
  282. # Mails are first deleted in lowest -> highest priority number order
  283. - #trash = /etc/dovecot-trash.conf
  284. + #trash = @l_prefix@/etc/dovecot/dovecot-trash.conf
  285. # Expire plugin. Mails are expunged from mailboxes after being there the
  286. # configurable time. The first expiration date for each mailbox is stored in
  287. # a dictionary so it can be quickly determined which mailboxes contain
  288. # expired mails. The actual expunging is done in a nightly cronjob, which
  289. # you must set up:
  290. - # dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool
  291. + # dovecot --exec-mail ext @l_prefix@/libexec/dovecot/expire-tool
  292. #expire = Trash 7 Spam 30
  293. - #expire_dict = db:/var/lib/dovecot/expire.db
  294. + #expire_dict = db:@l_prefix@/var/dovecot/lib/expire.db
  295. # Lazy expunge plugin. Currently works only with maildirs. When a user
  296. # expunges mails, the mails are moved to a mailbox in another namespace
  297. Index: src/deliver/deliver.c
  298. --- src/deliver/deliver.c.orig 2008-05-05 00:01:52.000000000 +0200
  299. +++ src/deliver/deliver.c 2008-05-16 12:09:26.000000000 +0200
  300. @@ -41,7 +41,7 @@
  301. #include <syslog.h>
  302. #define DEFAULT_CONFIG_FILE SYSCONFDIR"/dovecot.conf"
  303. -#define DEFAULT_SENDMAIL_PATH "/usr/lib/sendmail"
  304. +#define DEFAULT_SENDMAIL_PATH "@l_prefix@/sbin/sendmail"
  305. #define DEFAULT_ENVELOPE_SENDER "MAILER-DAEMON"
  306. /* After buffer grows larger than this, create a temporary file to /tmp
  307. Index: src/master/master-settings.c
  308. --- src/master/master-settings.c.orig 2008-05-05 00:01:54.000000000 +0200
  309. +++ src/master/master-settings.c 2008-05-16 12:09:26.000000000 +0200
  310. @@ -178,14 +178,14 @@
  311. MEMBER(syslog_facility) "mail",
  312. /* general */
  313. - MEMBER(protocols) "imap imaps",
  314. - MEMBER(listen) "*",
  315. - MEMBER(ssl_listen) "",
  316. + MEMBER(protocols) "imap",
  317. + MEMBER(listen) "127.0.0.1",
  318. + MEMBER(ssl_listen) "127.0.0.1",
  319. - MEMBER(ssl_disable) FALSE,
  320. + MEMBER(ssl_disable) TRUE,
  321. MEMBER(ssl_ca_file) "",
  322. - MEMBER(ssl_cert_file) SSLDIR"/certs/dovecot.pem",
  323. - MEMBER(ssl_key_file) SSLDIR"/private/dovecot.pem",
  324. + MEMBER(ssl_cert_file) "@l_prefix@/etc/dovecot/ssl/dovecot.crt",
  325. + MEMBER(ssl_key_file) "@l_prefix@/etc/dovecot/ssl/dovecot.key",
  326. MEMBER(ssl_key_password) "",
  327. MEMBER(ssl_parameters_regenerate) 168,
  328. MEMBER(ssl_cipher_list) "",
  329. @@ -200,7 +200,7 @@
  330. /* login */
  331. MEMBER(login_dir) "login",
  332. MEMBER(login_executable) NULL,
  333. - MEMBER(login_user) "dovecot",
  334. + MEMBER(login_user) "@l_musr@",
  335. MEMBER(login_greeting) "Dovecot ready.",
  336. MEMBER(login_log_format_elements) "user=<%u> method=%m rip=%r lip=%l %c",
  337. MEMBER(login_log_format) "%$: %s",
  338. @@ -317,7 +317,7 @@
  339. MEMBER(anonymous_username) "anonymous",
  340. MEMBER(krb5_keytab) "",
  341. MEMBER(gssapi_hostname) "",
  342. - MEMBER(winbind_helper_path) "/usr/bin/ntlm_auth",
  343. + MEMBER(winbind_helper_path) "@l_prefix@/bin/ntlm_auth",
  344. MEMBER(failure_delay) 2,
  345. MEMBER(verbose) FALSE,