dovecot/dovecot.patch

Sun, 26 Apr 2009 18:18:57 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sun, 26 Apr 2009 18:18:57 +0200
changeset 200
664305d6d9be
parent 168
7a1d64c9a105
child 204
5aa32536e189
permissions
-rw-r--r--

Don't show the translate mail on every message by default.

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

mercurial