summaryrefslogtreecommitdiffstats
path: root/debian/patches/06_debian_paths.diff
blob: 0691f87b573badf5a56167e7db477d8cfaddf252 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Index: postfix/conf/main.cf
===================================================================
--- postfix.orig/conf/main.cf
+++ postfix/conf/main.cf
@@ -51,7 +51,7 @@ compatibility_level = 3.7
 # See the files in examples/chroot-setup for setting up Postfix chroot
 # environments on different UNIX systems.
 #
-queue_directory = /var/spool/postfix
+#queue_directory = /var/spool/postfix
 
 # The command_directory parameter specifies the location of all
 # postXXX commands.
@@ -62,7 +62,7 @@ command_directory = /usr/sbin
 # daemon programs (i.e. programs listed in the master.cf file). This
 # directory must be owned by root.
 #
-daemon_directory = /usr/libexec/postfix
+daemon_directory = /usr/lib/postfix/sbin
 
 # The data_directory parameter specifies the location of Postfix-writable
 # data files (caches, random numbers). This directory must be owned
@@ -474,8 +474,8 @@ mynetworks = 127.0.0.0/8
 # IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE, YOU MUST SET UP AN
 # ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL USER.
 #
-#mailbox_command = /some/where/procmail
-#mailbox_command = /some/where/procmail -a "$EXTENSION"
+#mailbox_command = /usr/bin/procmail
+#mailbox_command = /usr/bin/procmail -a "$EXTENSION"
 
 # The mailbox_transport specifies the optional transport in master.cf
 # to use after processing aliases and .forward files. This parameter
Index: postfix/examples/smtpd-policy/greylist.pl
===================================================================
--- postfix.orig/examples/smtpd-policy/greylist.pl
+++ postfix/examples/smtpd-policy/greylist.pl
@@ -73,7 +73,7 @@ use Sys::Syslog qw(:DEFAULT setlogsock);
 # In case of database corruption, this script saves the database as
 # $database_name.time(), so that the mail system does not get stuck.
 #
-$database_name="/var/mta/greylist.db";
+$database_name="/var/lib/postfix/greylist.db";
 $greylist_delay=60;
 
 #
Index: postfix/makedefs
===================================================================
--- postfix.orig/makedefs
+++ postfix/makedefs
@@ -566,11 +566,18 @@ case "$SYSTEM.$RELEASE" in
 			exit 1
 		    fi
 		    SYSLIBS="-ldb"
+		    SEARCHDIRS=$(${CC-gcc} -print-search-dirs 2>/dev/null |
+			    sed -n '/^libraries: =/s/libraries: =//p' |
+			    sed -e 's/:/\n/g' | xargs -n1 readlink -f |
+			    grep -v 'gcc\|/[0-9.]\+$' | sort -u)
+		    if [ -z "$SEARCHDIRS" ]; then
+			    SEARCHDIRS="/usr/lib64 /lib64 /usr/lib /lib"
+		    fi
 		    ;;
 		esac
 		for name in nsl resolv $GDBM_LIBS
 		do
-		    for lib in /usr/lib64 /lib64 /usr/lib /lib
+		    for lib in $SEARCHDIRS
 		    do
 			test -e $lib/lib$name.a -o -e $lib/lib$name.so && {
 			    SYSLIBS="$SYSLIBS -l$name"
@@ -645,11 +652,18 @@ EOF
 			exit 1
 		    fi
 		    SYSLIBS="-ldb"
+		    SEARCHDIRS=$(${CC-gcc} -print-search-dirs 2>/dev/null |
+			    sed -n '/^libraries: =/s/libraries: =//p' |
+			    sed -e 's/:/\n/g' | xargs -n1 readlink -f |
+			    grep -v 'gcc\|/[0-9.]\+$' | sort -u)
+		    if [ -z "$SEARCHDIRS" ]; then
+			    SEARCHDIRS="/usr/lib64 /lib64 /usr/lib /lib"
+		    fi
 		    ;;
 		esac
 		for name in nsl resolv
 		do
-		    for lib in /usr/lib64 /lib64 /usr/lib /usr/lib/* /lib /lib/*
+		    for lib in $SEARCHDIRS
 		    do
 			test -e $lib/lib$name.a -o -e $lib/lib$name.so && {
 			    SYSLIBS="$SYSLIBS -l$name"
@@ -683,11 +697,18 @@ EOF
 			exit 1
 		    fi
 		    SYSLIBS="-ldb"
+		    SEARCHDIRS=$(${CC-gcc} -print-search-dirs 2>/dev/null |
+			    sed -n '/^libraries: =/s/libraries: =//p' |
+			    sed -e 's/:/\n/g' | xargs -n1 readlink -f |
+			    grep -v 'gcc\|/[0-9.]\+$' | sort -u)
+		    if [ -z "$SEARCHDIRS" ]; then
+			    SEARCHDIRS="/usr/lib64 /lib64 /usr/lib /lib"
+		    fi
 		    ;;
 		esac
 		for name in nsl resolv
 		do
-		    for lib in /usr/lib64 /lib64 /usr/lib /lib
+		    for lib in $SEARCHDIRS
 		    do
 			test -e $lib/lib$name.a -o -e $lib/lib$name.so && {
 			    SYSLIBS="$SYSLIBS -l$name"