michael@148: Index: configure.in michael@148: --- configure.in.orig 2009-03-13 23:06:16 +0100 michael@148: +++ configure.in 2009-03-14 09:11:12 +0100 michael@148: @@ -1962,14 +1962,14 @@ michael@148: michael@148: if test $want_pgsql != no; then michael@148: # based on code from PHP michael@148: - for i in /usr /usr/local /usr/local/pgsql; do michael@148: - for j in include include/pgsql include/postgres include/postgresql ""; do michael@148: + for i in @l_prefix@; do michael@148: + for j in include/postgresql; do michael@148: if test -r "$i/$j/libpq-fe.h"; then michael@148: PGSQL_INCLUDE=$i/$j michael@148: fi michael@148: done michael@148: - for lib in lib lib64; do michael@148: - for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do michael@148: + for lib in lib; do michael@148: + for j in $lib; do michael@148: if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then michael@148: PGSQL_LIBDIR=$i/$j michael@148: fi michael@148: Index: configure michael@148: --- configure.orig 2009-03-13 23:06:32 +0100 michael@148: +++ configure 2009-03-14 09:11:12 +0100 michael@148: @@ -27966,14 +27966,14 @@ michael@148: michael@148: if test $want_pgsql != no; then michael@148: # based on code from PHP michael@148: - for i in /usr /usr/local /usr/local/pgsql; do michael@148: - for j in include include/pgsql include/postgres include/postgresql ""; do michael@148: + for i in @l_prefix@; do michael@148: + for j in include/postgresql; do michael@148: if test -r "$i/$j/libpq-fe.h"; then michael@148: PGSQL_INCLUDE=$i/$j michael@148: fi michael@148: done michael@148: - for lib in lib lib64; do michael@148: - for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do michael@148: + for lib in lib; do michael@148: + for j in $lib; do michael@148: if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then michael@148: PGSQL_LIBDIR=$i/$j michael@148: fi michael@148: Index: doc/dovecot-sql-example.conf michael@148: --- doc/dovecot-sql-example.conf.orig 2009-01-05 21:49:58 +0100 michael@148: +++ doc/dovecot-sql-example.conf 2009-03-14 09:11:12 +0100 michael@148: @@ -47,7 +47,8 @@ michael@148: # the default my.cnf location michael@148: # option_group - Read options from the given group (default: client) michael@148: # michael@148: -# You can connect to UNIX sockets by using host: host=/var/run/mysql.sock michael@148: +# You can connect to UNIX sockets by using host: michael@148: +# host=@l_prefix@/var/mysql/mysql.sock michael@148: # Note that currently you can't use spaces in parameters. michael@148: # michael@148: # MySQL supports multiple host parameters for load balancing / HA. michael@148: @@ -58,7 +59,7 @@ michael@148: # Examples: michael@148: # connect = host=192.168.1.1 dbname=users michael@148: # connect = host=sql.example.com dbname=virtual user=virtual password=blarg michael@148: -# connect = /etc/dovecot/authdb.sqlite michael@148: +# connect = @l_prefix@/etc/dovecot/authdb.sqlite michael@148: # michael@148: #connect = michael@148: michael@148: Index: dovecot-example.conf michael@148: --- dovecot-example.conf.orig 2009-03-13 22:23:14 +0100 michael@148: +++ dovecot-example.conf 2009-03-14 09:12:40 +0100 michael@148: @@ -11,16 +11,14 @@ michael@148: michael@148: # Default values are shown for each setting, it's not required to uncomment michael@148: # any of the lines. Exception to this are paths, they're just examples with michael@148: -# the real defaults being based on configure options. The paths listed here michael@148: -# are for configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var michael@148: -# --with-ssldir=/etc/ssl michael@148: +# the real defaults being based on configure options. michael@148: michael@148: # Base directory where to store runtime data. michael@148: -#base_dir = /var/run/dovecot/ michael@148: +#base_dir = @l_prefix@/var/dovecot/run michael@148: michael@148: # Protocols we want to be serving: imap imaps pop3 pop3s michael@148: # If you only want to use dovecot-auth, you can set this to "none". michael@148: -#protocols = imap imaps michael@148: +#protocols = imap michael@148: michael@148: # A space separated list of IP or host addresses where to listen in for michael@148: # connections. "*" listens in all IPv4 interfaces. "[::]" listens in all IPv6 michael@148: @@ -38,7 +36,7 @@ michael@148: # listen = *:10100 michael@148: # .. michael@148: # } michael@148: -#listen = * michael@148: +#listen = 127.0.0.1 michael@148: michael@148: # Disable LOGIN command and all other plaintext authentications unless michael@148: # SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP michael@148: @@ -82,17 +80,17 @@ michael@148: # IP or host address where to listen in for SSL connections. Remember to also michael@148: # add imaps and/or pop3s to protocols setting. Defaults to same as "listen" michael@148: # setting if not specified. michael@148: -#ssl_listen = michael@148: +#ssl_listen = 127.0.0.1 michael@148: michael@148: # Disable SSL/TLS support. michael@148: -#ssl_disable = no michael@148: +#ssl_disable = yes michael@148: michael@148: # PEM encoded X.509 SSL/TLS certificate and private key. They're opened before michael@148: # dropping root privileges, so keep the key file unreadable by anyone but michael@148: # root. Included doc/mkcert.sh can be used to easily generate self-signed michael@148: # certificate, just make sure to update the domains in dovecot-openssl.cnf michael@148: -#ssl_cert_file = /etc/ssl/certs/dovecot.pem michael@148: -#ssl_key_file = /etc/ssl/private/dovecot.pem michael@148: +#ssl_cert_file = @l_prefix@/etc/dovecot/ssl/dovecot.crt michael@148: +#ssl_key_file = @l_prefix@/etc/dovecot/ssl/dovecot.key michael@148: michael@148: # If key file is password protected, give the password here. Alternatively michael@148: # give it when starting dovecot with -p parameter. Since this file is often michael@148: @@ -135,7 +133,7 @@ michael@148: # which login needs to be able to connect to. The sockets are created when michael@148: # running as root, so you don't have to worry about permissions. Note that michael@148: # everything in this directory is deleted when Dovecot is started. michael@148: -#login_dir = /var/run/dovecot/login michael@148: +#login_dir = @l_prefix@/var/dovecot/run/login michael@148: michael@148: # chroot login process to the login_dir. Only reason not to do this is if you michael@148: # wish to run the whole Dovecot without roots. michael@148: @@ -145,7 +143,7 @@ michael@148: # and don't use it anywhere else. The user must also belong to a group where michael@148: # only it has access, it's used to control access for authentication process. michael@148: # Note that this user is NOT used to access mails. michael@148: -#login_user = dovecot michael@148: +#login_user = @l_musr@ michael@148: michael@148: # Set max. process size in megabytes. If you don't use michael@148: # login_process_per_connection you might need to grow this. michael@148: @@ -503,7 +501,7 @@ michael@148: michael@148: protocol imap { michael@148: # Login executable location. michael@148: - #login_executable = /usr/libexec/dovecot/imap-login michael@148: + #login_executable = @l_prefix@/libexec/dovecot/imap-login michael@148: michael@148: # IMAP executable location. Changing this allows you to execute other michael@148: # binaries before the imap process is executed. michael@148: @@ -515,7 +513,7 @@ michael@148: # /tmp/gdbhelper.* files: michael@148: # mail_executable = /usr/libexec/dovecot/gdbhelper /usr/libexec/dovecot/imap michael@148: # michael@148: - #mail_executable = /usr/libexec/dovecot/imap michael@148: + #mail_executable = @l_prefix@/libexec/dovecot/imap michael@148: michael@148: # Maximum IMAP command line length in bytes. Some clients generate very long michael@148: # command lines with huge mailboxes, so you may need to raise this if you get michael@148: @@ -529,7 +527,7 @@ michael@148: # Support for dynamically loadable plugins. mail_plugins is a space separated michael@148: # list of plugins to load. michael@148: #mail_plugins = michael@148: - #mail_plugin_dir = /usr/lib/dovecot/imap michael@148: + #mail_plugin_dir = @l_prefix@/lib/dovecot/imap michael@148: michael@148: # Send IMAP capabilities in greeting message. This makes it unnecessary for michael@148: # clients to request it with CAPABILITY command, so it saves one round-trip. michael@148: @@ -572,11 +570,11 @@ michael@148: michael@148: protocol pop3 { michael@148: # Login executable location. michael@148: - #login_executable = /usr/libexec/dovecot/pop3-login michael@148: + #login_executable = @l_prefix@/libexec/dovecot/pop3-login michael@148: michael@148: # POP3 executable location. See IMAP's mail_executable above for examples michael@148: # how this could be changed. michael@148: - #mail_executable = /usr/libexec/dovecot/pop3 michael@148: + #mail_executable = @l_prefix@/libexec/dovecot/pop3 michael@148: michael@148: # Don't try to set mails non-recent or seen with POP3 sessions. This is michael@148: # mostly intended to reduce disk I/O. With maildir it doesn't move files michael@148: @@ -636,7 +634,7 @@ michael@148: # Support for dynamically loadable plugins. mail_plugins is a space separated michael@148: # list of plugins to load. michael@148: #mail_plugins = michael@148: - #mail_plugin_dir = /usr/lib/dovecot/pop3 michael@148: + #mail_plugin_dir = @l_prefix@/lib/dovecot/pop3 michael@148: michael@148: # Workarounds for various client bugs: michael@148: # outlook-no-nuls: michael@148: @@ -664,7 +662,7 @@ michael@148: # Support for dynamically loadable plugins. mail_plugins is a space separated michael@148: # list of plugins to load. michael@148: #mail_plugins = michael@148: - #mail_plugin_dir = /usr/lib/dovecot/lda michael@148: + #mail_plugin_dir = @l_prefix@/lib/dovecot/lda michael@148: michael@148: # If user is over quota, return with temporary failure instead of michael@148: # bouncing the mail. michael@148: @@ -678,7 +676,7 @@ michael@148: #deliver_log_format = msgid=%m: %$ michael@148: michael@148: # Binary to use for sending mails. michael@148: - #sendmail_path = /usr/lib/sendmail michael@148: + #sendmail_path = @l_prefix@/sbin/sendmail michael@148: michael@148: # Subject: header to use for rejection mails. You can use the same variables michael@148: # as for rejection_reason below. michael@148: @@ -689,7 +687,7 @@ michael@148: #rejection_reason = Your message to <%t> was automatically rejected:%n%r michael@148: michael@148: # UNIX socket path to master authentication server to find users. michael@148: - #auth_socket_path = /var/run/dovecot/auth-master michael@148: + #auth_socket_path = @l_prefix@/var/dovecot/run/auth-master michael@148: } michael@148: michael@148: ## michael@148: @@ -697,7 +695,7 @@ michael@148: ## michael@148: michael@148: # Executable location michael@148: -#auth_executable = /usr/libexec/dovecot/dovecot-auth michael@148: +#auth_executable = @l_prefix@/libexec/dovecot/dovecot-auth michael@148: michael@148: # Set max. process size in megabytes. michael@148: #auth_process_size = 256 michael@148: @@ -787,7 +785,7 @@ michael@148: #auth_ntlm_use_winbind = no michael@148: michael@148: # Path for Samba's ntlm_auth helper binary. michael@148: -#auth_winbind_helper_path = /usr/bin/ntlm_auth michael@148: +#auth_winbind_helper_path = @l_prefix@/bin/ntlm_auth michael@148: michael@148: # Number of seconds to delay before replying to failed authentications. michael@148: #auth_failure_delay = 2 michael@148: @@ -820,7 +818,7 @@ michael@148: michael@148: #passdb passwd-file { michael@148: # File contains a list of usernames, one per line michael@148: - #args = /etc/dovecot.deny michael@148: + #args = @l_prefix@/etc/dovecot/dovecot.deny michael@148: #deny = yes michael@148: #} michael@148: michael@148: @@ -903,13 +901,13 @@ michael@148: # SQL database michael@148: #passdb sql { michael@148: # Path for SQL configuration file, see doc/dovecot-sql-example.conf michael@148: - #args = michael@148: + #args = @l_prefix@/etc/dovecot/dovecot-sql.conf michael@148: #} michael@148: michael@148: # LDAP database michael@148: #passdb ldap { michael@148: # Path for LDAP configuration file, see doc/dovecot-ldap-example.conf michael@148: - #args = michael@148: + #args = @l_prefix@/etc/dovecot/dovecot-ldap.conf michael@148: #} michael@148: michael@148: # vpopmail authentication michael@148: @@ -974,13 +972,13 @@ michael@148: # SQL database michael@148: #userdb sql { michael@148: # Path for SQL configuration file, see doc/dovecot-sql-example.conf michael@148: - #args = michael@148: + #args = @l_prefix@/etc/dovecot/dovecot-sql.conf michael@148: #} michael@148: michael@148: # LDAP database michael@148: #userdb ldap { michael@148: # Path for LDAP configuration file, see doc/dovecot-ldap-example.conf michael@148: - #args = michael@148: + #args = @l_prefix@/etc/dovecot/dovecot-ldap.conf michael@148: #} michael@148: michael@148: # vpopmail michael@148: @@ -1017,7 +1015,7 @@ michael@148: # Master socket provides access to userdb information. It's typically michael@148: # used to give Dovecot's local delivery agent access to userdb so it michael@148: # can find mailbox locations. michael@148: - #path = /var/run/dovecot/auth-master michael@168: + #path = @l_prefix@/var/dovecot/run/auth-master michael@148: #mode = 0600 michael@148: # Default user/group is the one who started dovecot-auth (root) michael@148: #user = michael@148: @@ -1027,7 +1025,7 @@ michael@148: # The client socket is generally safe to export to everyone. Typical use michael@148: # is to export it to your SMTP server so it can do SMTP AUTH lookups michael@148: # using it. michael@148: - #path = /var/run/dovecot/auth-client michael@168: + #path = @l_prefix@/var/dovecot/run/auth-client michael@148: #mode = 0660 michael@148: #} michael@148: #} michael@148: @@ -1041,7 +1039,7 @@ michael@148: #auth external { michael@148: # socket connect { michael@148: # master { michael@148: -# path = /var/run/dovecot/auth-master michael@148: +# path = @l_prefix@/dovecot/run/auth-master michael@148: # } michael@148: # } michael@148: #} michael@148: @@ -1057,8 +1055,8 @@ michael@148: # referenced using URIs in format "proxy::". michael@148: michael@148: dict { michael@148: - #quota = mysql:/etc/dovecot-dict-quota.conf michael@148: - #expire = db:/var/lib/dovecot/expire.db michael@148: + #quota = mysql:@l_prefix@/etc/dovecot/dovecot-dict-quota.conf michael@148: + #expire = db:@l_prefix@/var/dovecot/lib/expire.db michael@148: } michael@148: michael@148: # Path to Berkeley DB's configuration file. See doc/dovecot-db-example.conf michael@148: @@ -1109,7 +1107,7 @@ michael@148: # one file for each mailbox, eg. INBOX or sub.mailbox. cache_secs parameter michael@148: # specifies how many seconds to wait between stat()ing dovecot-acl file michael@148: # to see if it changed. michael@148: - #acl = vfile:/etc/dovecot-acls:cache_secs=300 michael@148: + #acl = vfile:@l_prefix@/etc/dovecot/dovecot-acls:cache_secs=300 michael@148: michael@148: # Convert plugin. If set, specifies the source storage path which is michael@148: # converted to destination storage (mail_location) when the user logs in. michael@148: @@ -1128,14 +1126,14 @@ michael@148: # until the message can be saved within quota limits. The configuration file michael@148: # is a text file where each line is in format: michael@148: # Mails are first deleted in lowest -> highest priority number order michael@148: - #trash = /etc/dovecot-trash.conf michael@148: + #trash = @l_prefix@/etc/dovecot/dovecot-trash.conf michael@148: michael@148: # Expire plugin. Mails are expunged from mailboxes after being there the michael@148: # configurable time. The first expiration date for each mailbox is stored in michael@148: # a dictionary so it can be quickly determined which mailboxes contain michael@148: # expired mails. The actual expunging is done in a nightly cronjob, which michael@148: # you must set up: michael@148: - # dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool michael@148: + # dovecot --exec-mail ext @l_prefix@/libexec/dovecot/expire-tool michael@148: #expire = Trash 7 Spam 30 michael@148: #expire_dict = proxy::expire michael@148: michael@148: Index: src/deliver/deliver.c michael@148: --- src/deliver/deliver.c.orig 2009-02-27 00:31:13 +0100 michael@148: +++ src/deliver/deliver.c 2009-03-14 09:11:12 +0100 michael@148: @@ -41,7 +41,7 @@ michael@148: #include michael@148: michael@148: #define DEFAULT_CONFIG_FILE SYSCONFDIR"/dovecot.conf" michael@148: -#define DEFAULT_SENDMAIL_PATH "/usr/lib/sendmail" michael@148: +#define DEFAULT_SENDMAIL_PATH "@l_prefix@/sbin/sendmail" michael@148: #define DEFAULT_ENVELOPE_SENDER "MAILER-DAEMON" michael@148: michael@148: /* After buffer grows larger than this, create a temporary file to /tmp michael@148: Index: src/master/master-settings.c michael@148: --- src/master/master-settings.c.orig 2009-03-13 20:11:53 +0100 michael@148: +++ src/master/master-settings.c 2009-03-14 09:11:12 +0100 michael@148: @@ -178,14 +178,14 @@ michael@148: MEMBER(syslog_facility) "mail", michael@148: michael@148: /* general */ michael@148: - MEMBER(protocols) "imap imaps", michael@148: - MEMBER(listen) "*", michael@148: - MEMBER(ssl_listen) "", michael@148: + MEMBER(protocols) "imap", michael@148: + MEMBER(listen) "127.0.0.1", michael@148: + MEMBER(ssl_listen) "127.0.0.1", michael@148: michael@148: - MEMBER(ssl_disable) FALSE, michael@148: + MEMBER(ssl_disable) TRUE, michael@148: MEMBER(ssl_ca_file) "", michael@148: - MEMBER(ssl_cert_file) SSLDIR"/certs/dovecot.pem", michael@148: - MEMBER(ssl_key_file) SSLDIR"/private/dovecot.pem", michael@148: + MEMBER(ssl_cert_file) "@l_prefix@/etc/dovecot/ssl/dovecot.crt", michael@148: + MEMBER(ssl_key_file) "@l_prefix@/etc/dovecot/ssl/dovecot.key", michael@148: MEMBER(ssl_key_password) "", michael@148: MEMBER(ssl_parameters_regenerate) 168, michael@148: MEMBER(ssl_cipher_list) "", michael@148: @@ -200,7 +200,7 @@ michael@148: /* login */ michael@148: MEMBER(login_dir) "login", michael@148: MEMBER(login_executable) NULL, michael@148: - MEMBER(login_user) "dovecot", michael@148: + MEMBER(login_user) "@l_musr@", michael@148: MEMBER(login_greeting) "Dovecot ready.", michael@148: MEMBER(login_log_format_elements) "user=<%u> method=%m rip=%r lip=%l %c", michael@148: MEMBER(login_log_format) "%$: %s", michael@148: @@ -317,7 +317,7 @@ michael@148: MEMBER(anonymous_username) "anonymous", michael@148: MEMBER(krb5_keytab) "", michael@148: MEMBER(gssapi_hostname) "", michael@148: - MEMBER(winbind_helper_path) "/usr/bin/ntlm_auth", michael@148: + MEMBER(winbind_helper_path) "@l_prefix@/bin/ntlm_auth", michael@148: MEMBER(failure_delay) 2, michael@148: michael@148: MEMBER(verbose) FALSE,