Quellcode durchsuchen

added postfix conf; switched to env file; fixed env var name; added missing tables in sql init script

tags/v1.0.0
Robin Thoni vor 8 Jahren
Ursprung
Commit
bbd6f6ce60

+ 2
- 0
.gitignore Datei anzeigen

@@ -1,2 +1,4 @@
1 1
 *.swp
2 2
 /data/postgresql/data
3
+/postfix/certs/*.crt
4
+/postfix/certs/*.key

+ 21
- 10
docker-compose.yml Datei anzeigen

@@ -11,10 +11,9 @@ services:
11 11
         volumes:
12 12
             - ./data/postgresql/data:/var/lib/postgresql/data
13 13
         ports:
14
-            - "34000:5432"
15
-        environment:
16
-            - POSTGRES_USER=postfixadmin
17
-            - POSTGRES_PASSWORD=pg_password
14
+            - "127.0.0.1:34000:5432"
15
+        env_file:
16
+            - env
18 17
 
19 18
     postfixadmin:
20 19
         build: ./postfixadmin
@@ -24,12 +23,24 @@ services:
24 23
                 aliases:
25 24
                     - postfixadmin.internal.docker
26 25
         ports:
27
-            - "34001:80"
28
-        environment:
29
-            - DB_HOST=postgresql.internal.docker
30
-            - DB_USER=postfixadmin
31
-            - DB_PASSWORD=pg_password
32
-            - DB_DB=postfixadmin
26
+            - "127.0.0.1:34001:80"
27
+        env_file:
28
+            - env
29
+
30
+    postfix:
31
+        build: ./postfix
32
+        container_name: mx-postfix
33
+        networks:
34
+            internal.docker:
35
+                aliases:
36
+                    - postfix.internal.docker
37
+        volumes:
38
+          - ./data/email:/var/email
39
+        ports:
40
+            - "0.0.0.0:25:25"
41
+            - "0.0.0.0:587:587"
42
+        env_file:
43
+            - env
33 44
 
34 45
 networks:
35 46
     internal.docker:

+ 7
- 0
env Datei anzeigen

@@ -0,0 +1,7 @@
1
+POSTGRES_HOST=postgresql.internal.docker
2
+POSTGRES_USER=postfixadmin
3
+POSTGRES_PASSWORD=pg_password
4
+POSTGRES_DB=postfixadmin
5
+
6
+MAIL_DOMAIN=rthoni.com
7
+MAIL_HOSTNAME=mail.rthoni.com

+ 28
- 0
postfix/Dockerfile Datei anzeigen

@@ -0,0 +1,28 @@
1
+FROM debian:jessie
2
+
3
+MAINTAINER Robin Thoni <robin@rthoni.com>
4
+
5
+RUN groupadd -r email --gid=7788 && useradd -r -g email --uid=7788 email
6
+
7
+RUN echo "postfix postfix/main_mailer_type string Internet site" > preseed.txt &&\
8
+    echo "postfix postfix/mailname string mail.example.com" >> preseed.txt
9
+
10
+RUN debconf-set-selections preseed.txt
11
+
12
+RUN DEBIAN_FRONTEND=noninteractive apt-get update &&\
13
+    apt-get install -y postfix postfix-pgsql rsyslog &&\
14
+    apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
15
+
16
+COPY ./run.sh /run.sh
17
+
18
+RUN rm -rf /etc/postfix/*
19
+
20
+COPY ./config/ /etc/postfix/
21
+
22
+COPY ./certs/ /etc/ssl/private/
23
+
24
+VOLUME ["/var/email"]
25
+
26
+EXPOSE 25 587
27
+
28
+CMD ["/run.sh"]

+ 11
- 0
postfix/config/dynamicmaps.cf Datei anzeigen

@@ -0,0 +1,11 @@
1
+# Postfix dynamic maps configuration file.
2
+#
3
+# The first match found is the one that is used.  Wildcards are not supported
4
+# as of postfix 2.0.2
5
+#
6
+#type	location of .so file			open function	(mkmap func)
7
+#====	================================	=============	============
8
+tcp	/usr/lib/postfix/dict_tcp.so		dict_tcp_open	
9
+mysql	/usr/lib/postfix/dict_mysql.so		dict_mysql_open	
10
+sqlite	/usr/lib/postfix/dict_sqlite.so		dict_sqlite_open	
11
+pgsql	/usr/lib/postfix/dict_pgsql.so		dict_pgsql_open	

+ 89
- 0
postfix/config/main.cf Datei anzeigen

@@ -0,0 +1,89 @@
1
+# See /usr/share/postfix/main.cf.dist for a commented, more complete version
2
+
3
+
4
+# Debian specific:  Specifying a file name will cause the first
5
+# line of that file to be used as the name.  The Debian default
6
+# is /etc/mailname.
7
+#myorigin = /etc/mailname
8
+
9
+smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
10
+biff = no
11
+
12
+# appending .domain is the MUA's job.
13
+append_dot_mydomain = no
14
+
15
+# Uncomment the next line to generate "delayed mail" warnings
16
+#delay_warning_time = 4h
17
+
18
+readme_directory = no
19
+
20
+# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
21
+# information on enabling SSL in the smtp client.
22
+
23
+mydomain = example.org
24
+myhostname = mail.example.org
25
+alias_maps = hash:/etc/aliases
26
+alias_database = hash:/etc/aliases
27
+myorigin = $mydomain
28
+mydestination = localhost
29
+relayhost = 
30
+mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
31
+mailbox_command = procmail -a "$EXTENSION"
32
+mailbox_size_limit = 0
33
+recipient_delimiter = +
34
+inet_interfaces = all
35
+
36
+virtual_mailbox_base=/var/email
37
+recipient_bcc_maps = pgsql:/etc/postfix/recipient_bcc.cf
38
+transport_maps = pgsql:/etc/postfix/pgsql_transport.cf
39
+virtual_mailbox_domains = pgsql:/etc/postfix/pgsql_virtual_mailbox_domains.cf
40
+virtual_mailbox_maps = pgsql:/etc/postfix/pgsql_virtual_mailbox_maps.cf
41
+virtual_alias_maps = pgsql:/etc/postfix/pgsql_virtual_alias_maps.cf,
42
+                     pgsql:/etc/postfix/pgsql_virtual_alias_maps_regexp.cf,
43
+                     pgsql:/etc/postfix/pgsql_virtual_alias_maps_alias.cf
44
+relay_domains = pgsql:/etc/postfix/pgsql_relay_domains.cf
45
+virtual_minimum_uid=100
46
+virtual_uid_maps=static:7788
47
+virtual_gid_maps=static:7788
48
+virtual_transport=dovecot
49
+dovecot_destination_recipient_limit = 1
50
+
51
+
52
+smtpd_tls_cert_file=/etc/ssl/private/mail.crt
53
+smtpd_tls_key_file=/etc/ssl/private/mail.key
54
+smtpd_tls_CAfile=/etc/ssl/private/mail-chain.crt
55
+smtp_tls_CAfile=/etc/ssl/private/mail-chain.crt
56
+smtp_use_tls=yes
57
+smtpd_use_tls=yes
58
+smtpd_tls_loglevel=1
59
+smtpd_tls_received_header=yes
60
+tls_random_source=dev:/dev/urandom
61
+smtp_tls_note_starttls_offer=no
62
+smtpd_tls_session_cache_timeout=3600s
63
+smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
64
+smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
65
+queue_directory=/var/spool/postfix
66
+
67
+
68
+smtpd_sasl_type=dovecot
69
+smtpd_sasl_path=private/auth
70
+smtpd_sasl_auth_enable=yes
71
+broken_sasl_auth_clients=yes
72
+smtpd_sasl_security_options=noanonymous
73
+smtpd_sasl_tls_security_options=$smtpd_sasl_security_options
74
+smtpd_sasl_local_domain=$myhostname
75
+smtpd_helo_required=yes
76
+smtpd_helo_restrictions=reject_invalid_helo_hostname
77
+smtpd_recipient_restrictions=permit_mynetworks,
78
+        permit_sasl_authenticated,
79
+        reject_unknown_recipient_domain,
80
+        reject_unauth_pipelining,
81
+        reject_unauth_destination
82
+
83
+message_size_limit = 0
84
+
85
+milter_default_action = accept
86
+milter_protocol = 6
87
+#smtpd_milters = inet:localhost:12345
88
+#non_smtpd_milters = inet:localhost:12345
89
+smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unknown_recipient_domain, reject_unauth_pipelining, reject_unauth_destination

+ 114
- 0
postfix/config/master.cf Datei anzeigen

@@ -0,0 +1,114 @@
1
+#
2
+# Postfix master process configuration file.  For details on the format
3
+# of the file, see the master(5) manual page (command: "man 5 master").
4
+#
5
+# Do not forget to execute "postfix reload" after editing this file.
6
+#
7
+# ==========================================================================
8
+# service type  private unpriv  chroot  wakeup  maxproc command + args
9
+#               (yes)   (yes)   (yes)   (never) (100)
10
+# ==========================================================================
11
+smtp      inet  n       -       -       -       -       smtpd
12
+submission inet n       -       -       -       -       smtpd
13
+  -o smtpd_tls_security_level=encrypt
14
+  -o smtpd_sasl_auth_enable=yes
15
+  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
16
+  -o milter_macro_daemon_name=ORIGINATING
17
+#smtps     inet  n       -       -       -       -       smtpd
18
+#  -o smtpd_tls_wrappermode=yes
19
+#  -o smtpd_sasl_auth_enable=yes
20
+#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
21
+#  -o milter_macro_daemon_name=ORIGINATING
22
+#628       inet  n       -       -       -       -       qmqpd
23
+pickup    fifo  n       -       -       60      1       pickup
24
+cleanup   unix  n       -       -       -       0       cleanup
25
+qmgr      fifo  n       -       n       300     1       qmgr
26
+#qmgr     fifo  n       -       -       300     1       oqmgr
27
+tlsmgr    unix  -       -       -       1000?   1       tlsmgr
28
+rewrite   unix  -       -       -       -       -       trivial-rewrite
29
+bounce    unix  -       -       -       -       0       bounce
30
+defer     unix  -       -       -       -       0       bounce
31
+trace     unix  -       -       -       -       0       bounce
32
+verify    unix  -       -       -       -       1       verify
33
+flush     unix  n       -       -       1000?   0       flush
34
+proxymap  unix  -       -       n       -       -       proxymap
35
+proxywrite unix -       -       n       -       1       proxymap
36
+smtp      unix  -       -       -       -       -       smtp
37
+# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
38
+relay     unix  -       -       -       -       -       smtp
39
+	-o smtp_fallback_relay=
40
+#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
41
+showq     unix  n       -       -       -       -       showq
42
+error     unix  -       -       -       -       -       error
43
+retry     unix  -       -       -       -       -       error
44
+discard   unix  -       -       -       -       -       discard
45
+local     unix  -       n       n       -       -       local
46
+virtual   unix  -       n       n       -       -       virtual
47
+lmtp      unix  -       -       -       -       -       lmtp
48
+anvil     unix  -       -       -       -       1       anvil
49
+scache    unix  -       -       -       -       1       scache
50
+#
51
+# ====================================================================
52
+# Interfaces to non-Postfix software. Be sure to examine the manual
53
+# pages of the non-Postfix software to find out what options it wants.
54
+#
55
+# Many of the following services use the Postfix pipe(8) delivery
56
+# agent.  See the pipe(8) man page for information about ${recipient}
57
+# and other message envelope options.
58
+# ====================================================================
59
+#
60
+# maildrop. See the Postfix MAILDROP_README file for details.
61
+# Also specify in main.cf: maildrop_destination_recipient_limit=1
62
+#
63
+maildrop  unix  -       n       n       -       -       pipe
64
+  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
65
+#
66
+# ====================================================================
67
+#
68
+# Recent Cyrus versions can use the existing "lmtp" master.cf entry.
69
+#
70
+# Specify in cyrus.conf:
71
+#   lmtp    cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
72
+#
73
+# Specify in main.cf one or more of the following:
74
+#  mailbox_transport = lmtp:inet:localhost
75
+#  virtual_transport = lmtp:inet:localhost
76
+#
77
+# ====================================================================
78
+#
79
+# Cyrus 2.1.5 (Amos Gouaux)
80
+# Also specify in main.cf: cyrus_destination_recipient_limit=1
81
+#
82
+#cyrus     unix  -       n       n       -       -       pipe
83
+#  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
84
+#
85
+# ====================================================================
86
+# Old example of delivery via Cyrus.
87
+#
88
+#old-cyrus unix  -       n       n       -       -       pipe
89
+#  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
90
+#
91
+# ====================================================================
92
+#
93
+# See the Postfix UUCP_README file for configuration details.
94
+#
95
+uucp      unix  -       n       n       -       -       pipe
96
+  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
97
+#
98
+# Other external delivery methods.
99
+#
100
+ifmail    unix  -       n       n       -       -       pipe
101
+  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
102
+bsmtp     unix  -       n       n       -       -       pipe
103
+  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
104
+scalemail-backend unix	-	n	n	-	2	pipe
105
+  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
106
+mailman   unix  -       n       n       -       -       pipe
107
+  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
108
+  ${nexthop} ${user}
109
+
110
+dovecot   unix  -       n       n       -       -       pipe
111
+  flags=DRhu user=email:email argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient}
112
+
113
+robotasm unix   -   n   n   -   -   pipe
114
+    flags=F user=email:email argv=/usr/local/bin/robotasm

+ 5
- 0
postfix/config/pgsql_recipient_bcc.cf Datei anzeigen

@@ -0,0 +1,5 @@
1
+hosts = 127.0.0.1
2
+user = postfixadmin
3
+password = pg_password
4
+dbname = postfixadmin
5
+query = SELECT bcc FROM recipient_bcc WHERE recipient='%s'

+ 5
- 0
postfix/config/pgsql_relay_domains.cf Datei anzeigen

@@ -0,0 +1,5 @@
1
+hosts = 127.0.0.1
2
+user = postfixadmin
3
+password = pg_password
4
+dbname = postfixadmin
5
+query = SELECT domain FROM domain WHERE domain='%s' and backupmx = true

+ 5
- 0
postfix/config/pgsql_transport.cf Datei anzeigen

@@ -0,0 +1,5 @@
1
+hosts = 127.0.0.1
2
+user = postfixadmin
3
+password = pg_password
4
+dbname = postfixadmin
5
+query = SELECT transport FROM transport WHERE domain='%s'

+ 5
- 0
postfix/config/pgsql_virtual_alias_maps.cf Datei anzeigen

@@ -0,0 +1,5 @@
1
+hosts = 127.0.0.1
2
+user = postfixadmin
3
+password = pg_password
4
+dbname = postfixadmin
5
+query = SELECT goto FROM alias WHERE address='%s' AND active = true AND is_regexp = false

+ 5
- 0
postfix/config/pgsql_virtual_alias_maps_alias.cf Datei anzeigen

@@ -0,0 +1,5 @@
1
+hosts = 127.0.0.1
2
+user = postfixadmin
3
+password = pg_password
4
+dbname = postfixadmin
5
+query = SELECT goto FROM alias WHERE address=((regexp_split_to_array('%s', '\+|@'))[1]) || '@' || split_part('%s', '@', 2) AND active = true AND is_regexp = false

+ 5
- 0
postfix/config/pgsql_virtual_alias_maps_regexp.cf Datei anzeigen

@@ -0,0 +1,5 @@
1
+hosts = 127.0.0.1
2
+user = postfixadmin
3
+password = pg_password
4
+dbname = postfixadmin
5
+query = SELECT goto FROM alias WHERE '%s' ILIKE CONCAT('^',address,'$') AND SUBSTRING(address,1,1) != '@' AND is_regexp = true

+ 5
- 0
postfix/config/pgsql_virtual_mailbox_domains.cf Datei anzeigen

@@ -0,0 +1,5 @@
1
+hosts = 127.0.0.1
2
+user = postfixadmin
3
+password = pg_password
4
+dbname = postfixadmin
5
+query = SELECT domain FROM domain WHERE domain='%s' and backupmx = false and active = true

+ 5
- 0
postfix/config/pgsql_virtual_mailbox_maps.cf Datei anzeigen

@@ -0,0 +1,5 @@
1
+hosts = 127.0.0.1
2
+user = postfixadmin
3
+password = pg_password
4
+dbname = postfixadmin
5
+query = SELECT maildir FROM mailbox WHERE username='%s' AND active = true

+ 869
- 0
postfix/config/post-install Datei anzeigen

@@ -0,0 +1,869 @@
1
+#!/bin/sh
2
+
3
+# To view the formatted manual page of this file, type:
4
+#	POSTFIXSOURCE/mantools/srctoman - post-install | nroff -man
5
+
6
+#++
7
+# NAME
8
+#	post-install
9
+# SUMMARY
10
+#	Postfix post-installation script
11
+# SYNOPSIS
12
+#	postfix post-install [name=value] command ...
13
+# DESCRIPTION
14
+#	The post-install script performs the finishing touch of a Postfix
15
+#	installation, after the executable programs and configuration
16
+#	files are installed. Usage is one of the following:
17
+# .IP o
18
+#	While installing Postfix from source code on the local machine, the
19
+#	script is run by the postfix-install script to update selected file
20
+#	or directory permissions and to update Postfix configuration files.
21
+# .IP o
22
+#	While installing Postfix from a pre-built package, the script is run
23
+#	by the package management procedure to set all file or directory
24
+#	permissions and to update Postfix configuration files.
25
+# .IP o
26
+#	The script can be used to change installation parameter settings such
27
+#	as mail_owner or setgid_group after Postfix is already installed.
28
+# .IP o
29
+#	The script can be used to upgrade configuration files and to upgrade
30
+#	file/directory permissions of a secondary Postfix instance.
31
+# .IP o
32
+#	At Postfix start-up time, the script is run from "postfix check" to
33
+#	create missing queue directories.
34
+# .PP
35
+#	The post-install script is controlled by installation parameters.
36
+#	Specific parameters are described at the end of this document.
37
+#	All installation parameters must be specified ahead of time via
38
+#	one of the methods described below.
39
+#
40
+#	Arguments
41
+# .IP create-missing
42
+#	Create missing queue directories with ownerships and permissions
43
+#	according to the contents of $daemon_directory/postfix-files
44
+#	and optionally in $daemon_directory/postfix-files.d/*, using
45
+#	the mail_owner and setgid_group parameter settings from the
46
+#	command line, process environment or from the installed
47
+#	main.cf file.
48
+#
49
+#	This is required at Postfix start-up time.
50
+# .IP set-permissions
51
+#	Set all file/directory ownerships and permissions according to the
52
+#	contents of $daemon_directory/postfix-files and optionally
53
+#	in $daemon_directory/postfix-files.d/*, using the mail_owner
54
+#	and setgid_group parameter settings from the command line,
55
+#	process environment or from the installed main.cf file.
56
+#	Implies create-missing.
57
+#
58
+#	This is required when installing Postfix from a pre-built package,
59
+#	or when changing the mail_owner or setgid_group installation parameter
60
+#	settings after Postfix is already installed.
61
+# .IP upgrade-permissions
62
+#	Update ownership and permission of existing files/directories as
63
+#	specified in $daemon_directory/postfix-files and optionally
64
+#	in $daemon_directory/postfix-files.d/*, using the mail_owner
65
+#	and setgid_group parameter settings from the command line,
66
+#	process environment or from the installed main.cf file.
67
+#	Implies create-missing.
68
+#
69
+#	This is required when upgrading an existing Postfix instance.
70
+# .IP upgrade-configuration
71
+#	Edit the installed main.cf and master.cf files, in order to account
72
+#	for missing services and to fix deprecated parameter settings.
73
+#
74
+#	This is required when upgrading an existing Postfix instance.
75
+# .IP upgrade-source
76
+#	Short-hand for: upgrade-permissions upgrade-configuration.
77
+#
78
+#	This is recommended when upgrading Postfix from source code.
79
+# .IP upgrade-package
80
+#	Short-hand for: set-permissions upgrade-configuration.
81
+#
82
+#	This is recommended when upgrading Postfix from a pre-built package.
83
+# .IP first-install-reminder
84
+#	Remind the user that they still need to configure main.cf and the
85
+#	aliases file, and that newaliases still needs to be run.
86
+#
87
+#	This is recommended when Postfix is installed for the first time.
88
+# MULTIPLE POSTFIX INSTANCES
89
+# .ad
90
+# .fi
91
+#	Multiple Postfix instances on the same machine can share command and
92
+#	daemon program files but must have separate configuration and queue
93
+#	directories.
94
+#
95
+#	To create a secondary Postfix installation on the same machine,
96
+#	copy the configuration files from the primary Postfix instance to
97
+#	a secondary configuration directory and execute:
98
+#
99
+#	postfix post-install config_directory=secondary-config-directory \e
100
+# .in +4
101
+#		queue_directory=secondary-queue-directory \e
102
+# .br
103
+#		create-missing
104
+# .PP
105
+#	This creates secondary Postfix queue directories, sets their access
106
+#	permissions, and saves the specified installation parameters to the
107
+#	secondary main.cf file.
108
+#
109
+#	Be sure to list the secondary configuration directory in the
110
+#	alternate_config_directories parameter in the primary main.cf file.
111
+#
112
+#	To upgrade a secondary Postfix installation on the same machine,
113
+#	execute:
114
+#
115
+#	postfix post-install config_directory=secondary-config-directory \e
116
+# .in +4
117
+#		upgrade-permissions upgrade-configuration
118
+# INSTALLATION PARAMETER INPUT METHODS
119
+# .ad
120
+# .fi
121
+#	Parameter settings can be specified through a variety of
122
+#	mechanisms.  In order of decreasing precedence these are:
123
+# .IP "command line"
124
+#	Parameter settings can be given as name=value arguments on
125
+#	the post-install command line. These have the highest precedence.
126
+#	Settings that override the installed main.cf file are saved.
127
+# .IP "process environment"
128
+#	Parameter settings can be given as name=value environment
129
+#	variables.
130
+#	Settings that override the installed main.cf file are saved.
131
+# .IP "installed configuration files"
132
+#	If a parameter is not specified via the command line or via the
133
+#	process environment, post-install will attempt to extract its
134
+#	value from the already installed Postfix main.cf configuration file.
135
+#	These settings have the lowest precedence.
136
+# INSTALLATION PARAMETER DESCRIPTION
137
+# .ad
138
+# .fi
139
+#	The description of installation parameters is as follows:
140
+# .IP config_directory
141
+#	The directory for Postfix configuration files.
142
+# .IP daemon_directory
143
+#	The directory for Postfix daemon programs. This directory
144
+#	should not be in the command search path of any users.
145
+# .IP command_directory
146
+#	The directory for Postfix administrative commands. This
147
+#	directory should be in the command search path of adminstrative users.
148
+# .IP queue_directory
149
+#	The directory for Postfix queues.
150
+# .IP data_directory
151
+#	The directory for Postfix writable data files (caches, etc.).
152
+# .IP sendmail_path
153
+#	The full pathname for the Postfix sendmail command.
154
+#	This is the Sendmail-compatible mail posting interface.
155
+# .IP newaliases_path
156
+#	The full pathname for the Postfix newaliases command.
157
+#	This is the Sendmail-compatible command to build alias databases
158
+#	for the Postfix local delivery agent.
159
+# .IP mailq_path
160
+#	The full pathname for the Postfix mailq command.
161
+#	This is the Sendmail-compatible command to list the mail queue.
162
+# .IP mail_owner
163
+#	The owner of the Postfix queue. Its numerical user ID and group ID
164
+#	must not be used by any other accounts on the system.
165
+# .IP setgid_group
166
+#	The group for mail submission and for queue management commands.
167
+#	Its numerical group ID must not be used by any other accounts on the
168
+#	system, not even by the mail_owner account.
169
+# .IP html_directory
170
+#	The directory for the Postfix HTML files.
171
+# .IP manpage_directory
172
+#	The directory for the Postfix on-line manual pages.
173
+# .IP sample_directory
174
+#	The directory for the Postfix sample configuration files.
175
+#	This feature is obsolete as of Postfix 2.1.
176
+# .IP readme_directory
177
+#	The directory for the Postfix README files.
178
+# SEE ALSO
179
+#	postfix-install(1) Postfix primary installation script.
180
+# FILES
181
+#	$config_directory/main.cf, Postfix installation parameters.
182
+#	$daemon_directory/postfix-files, installation control file.
183
+#	$daemon_directory/postfix-files.d/*, optional control files.
184
+#	$config_directory/install.cf, obsolete configuration file.
185
+# LICENSE
186
+# .ad
187
+# .fi
188
+#	The Secure Mailer license must be distributed with this software.
189
+# AUTHOR(S)
190
+#	Wietse Venema
191
+#	IBM T.J. Watson Research
192
+#	P.O. Box 704
193
+#	Yorktown Heights, NY 10598, USA
194
+#--
195
+
196
+umask 022
197
+
198
+PATH=/bin:/usr/bin:/usr/sbin:/usr/etc:/sbin:/etc:/usr/contrib/bin:/usr/gnu/bin:/usr/ucb:/usr/bsd
199
+SHELL=/bin/sh
200
+IFS=" 	
201
+"
202
+BACKUP_IFS="$IFS"
203
+debug=:
204
+#debug=echo
205
+MOST_PARAMETERS="command_directory daemon_directory data_directory
206
+    html_directory mail_owner mailq_path manpage_directory
207
+    newaliases_path queue_directory readme_directory sample_directory
208
+    sendmail_path setgid_group"
209
+NON_SHARED="config_directory queue_directory data_directory"
210
+
211
+USAGE="Usage: $0 [name=value] command
212
+    create-missing          Create missing queue directories.
213
+    upgrade-source          When installing or upgrading from source code.
214
+    upgrade-package         When installing or upgrading from pre-built package.
215
+    first-install-reminder  Remind of mandatory first-time configuration steps.
216
+    name=value              Specify an installation parameter".
217
+
218
+# Process command-line options and parameter settings. Work around
219
+# brain damaged shells. "IFS=value command" should not make the
220
+# IFS=value setting permanent. But some broken standard allows it.
221
+
222
+create=; set_perms=; upgrade_perms=; upgrade_conf=; first_install_reminder=
223
+obsolete=; keep_list=;
224
+
225
+for arg
226
+do
227
+    case $arg in
228
+                *=*) IFS= eval $arg; IFS="$BACKUP_IFS";;
229
+     create-missing) create=1;;
230
+	  set-perm*) create=1; set_perms=1;;
231
+      upgrade-perm*) create=1; upgrade_perms=1;;
232
+      upgrade-conf*) upgrade_conf=1;;
233
+     upgrade-source) create=1; upgrade_conf=1; upgrade_perms=1;;
234
+    upgrade-package) create=1; upgrade_conf=1; set_perms=1;;
235
+     first-install*) first_install_reminder=1;;
236
+		  *) echo "$0: Error: $USAGE" 1>&2; exit 1;;
237
+    esac
238
+    shift
239
+done
240
+
241
+# Sanity checks.
242
+
243
+test -n "$create$upgrade_conf$first_install_reminder" || {
244
+    echo "$0: Error: $USAGE" 1>&2
245
+    exit 1
246
+}
247
+
248
+# Bootstrapping problem.
249
+
250
+if [ -n "$command_directory" ]
251
+then
252
+    POSTCONF="$command_directory/postconf"
253
+else
254
+    POSTCONF="postconf"
255
+fi
256
+
257
+$POSTCONF -d mail_version >/dev/null 2>/dev/null || {
258
+    echo $0: Error: no $POSTCONF command found. 1>&2
259
+    echo Re-run this command as $0 command_directory=/some/where. 1>&2
260
+    exit 1
261
+}
262
+
263
+# Also used to require license etc. files only in the default instance.
264
+
265
+def_config_directory=`$POSTCONF -d -h config_directory` || exit 1
266
+test -n "$config_directory" ||
267
+    config_directory="$def_config_directory"
268
+
269
+test -d "$config_directory" || {
270
+    echo $0: Error: $config_directory is not a directory. 1>&2
271
+    exit 1
272
+}
273
+
274
+# If this is a secondary instance, don't touch shared files.
275
+# XXX Solaris does not have "test -e".
276
+
277
+instances=`test ! -f $def_config_directory/main.cf || 
278
+    $POSTCONF -c $def_config_directory -h multi_instance_directories | 
279
+	sed 's/,/ /'` || exit 1
280
+
281
+update_shared_files=1
282
+for name in $instances
283
+do
284
+    case "$name" in
285
+    "$def_config_directory") ;;
286
+    "$config_directory") update_shared_files=; break;;
287
+    esac
288
+done
289
+
290
+test -f $daemon_directory/postfix-files || {
291
+    echo $0: Error: $daemon_directory/postfix-files is not a file. 1>&2
292
+    exit 1
293
+}
294
+
295
+# SunOS5 fmt(1) truncates lines > 1000 characters.
296
+
297
+fake_fmt() {
298
+    sed '
299
+    :top
300
+	/^\(  *\)\([^ ][^ ]*\)  */{
301
+	    s//\1\2\
302
+\1/
303
+	    P
304
+	    D
305
+	    b top
306
+	}
307
+    ' | fmt
308
+}
309
+
310
+case `uname -s` in
311
+HP-UX*) FMT=cat;;
312
+SunOS*) FMT=fake_fmt;;
313
+     *) FMT=fmt;;
314
+esac
315
+
316
+# If a parameter is not set via the command line or environment,
317
+# try to use settings from installed configuration files.
318
+
319
+# Extract parameter settings from the obsolete install.cf file, as
320
+# a transitional aid.
321
+
322
+grep setgid_group $config_directory/main.cf >/dev/null 2>&1 || {
323
+    test -f $config_directory/install.cf  && {
324
+        for name in sendmail_path newaliases_path mailq_path setgid manpages
325
+        do
326
+	eval junk=\$$name
327
+        case "$junk" in
328
+        "") eval unset $name;;
329
+        esac
330
+	   eval : \${$name="\`. $config_directory/install.cf; echo \$$name\`"} \
331
+		|| exit 1
332
+        done
333
+        : ${setgid_group=$setgid}
334
+        : ${manpage_directory=$manpages}
335
+    }
336
+}
337
+
338
+# Extract parameter settings from the installed main.cf file.
339
+
340
+test -f $config_directory/main.cf && {
341
+    for name in $MOST_PARAMETERS
342
+    do
343
+	eval junk=\$$name
344
+        case "$junk" in
345
+        "") eval unset $name;;
346
+        esac
347
+        eval : \${$name=\`$POSTCONF -c $config_directory -h $name\`} || exit 1
348
+    done
349
+}
350
+
351
+# Sanity checks
352
+
353
+case $manpage_directory in
354
+ no) echo $0: Error: manpage_directory no longer accepts \"no\" values. 1>&2
355
+     echo Try again with \"$0 manpage_directory=/pathname ...\". 1>&2; exit 1;;
356
+esac
357
+
358
+case $setgid_group in
359
+ no) echo $0: Error: setgid_group no longer accepts \"no\" values. 1>&2
360
+     echo Try again with \"$0 setgid_group=groupname ...\" 1>&2; exit 1;;
361
+esac
362
+
363
+for path in "$daemon_directory" "$command_directory" "$queue_directory" \
364
+    "$sendmail_path" "$newaliases_path" "$mailq_path" "$manpage_directory"
365
+do
366
+   case "$path" in
367
+   /*) ;;
368
+    *) echo $0: Error: \"$path\" should be an absolute path name. 1>&2; exit 1;;
369
+   esac
370
+done
371
+
372
+for path in "$html_directory" "$readme_directory"
373
+do
374
+   case "$path" in
375
+   /*) ;;
376
+   no) ;;
377
+    *) echo $0: Error: \"$path\" should be \"no\" or an absolute path name. 1>&2; exit 1;;
378
+   esac
379
+done
380
+
381
+# Find out what parameters were not specified via command line,
382
+# via environment, or via installed configuration files.
383
+
384
+missing=
385
+for name in $MOST_PARAMETERS
386
+do
387
+    eval test -n \"\$$name\" || missing="$missing $name"
388
+done
389
+
390
+# All parameters must be specified at this point.
391
+
392
+test -n "$non_interactive" -a -n "$missing" && {
393
+    cat <<EOF | ${FMT} 1>&2
394
+$0: Error: some required installation parameters are not defined.
395
+
396
+- Either the parameters need to be given in the $config_directory/main.cf
397
+file from a recent Postfix installation,
398
+
399
+- Or the parameters need to be specified through the process
400
+environment.
401
+
402
+- Or the parameters need to be specified as name=value arguments
403
+on the $0 command line,
404
+
405
+The following parameters were missing:
406
+
407
+    $missing
408
+
409
+EOF
410
+    exit 1
411
+}
412
+
413
+POSTCONF="$command_directory/postconf"
414
+
415
+# Save settings, allowing command line/environment override.
416
+
417
+override=
418
+for name in $MOST_PARAMETERS
419
+do
420
+    eval test \"\$$name\" = \"`$POSTCONF -c $config_directory -h $name`\" || {
421
+	override=1
422
+	break
423
+    }
424
+done
425
+
426
+test -n "$override" && {
427
+    $POSTCONF -c $config_directory -e \
428
+	"daemon_directory = $daemon_directory" \
429
+	"command_directory = $command_directory" \
430
+	"queue_directory = $queue_directory" \
431
+	"data_directory = $data_directory" \
432
+	"mail_owner = $mail_owner" \
433
+	"setgid_group = $setgid_group" \
434
+	"sendmail_path = $sendmail_path" \
435
+	"mailq_path = $mailq_path" \
436
+	"newaliases_path = $newaliases_path" \
437
+	"html_directory = $html_directory" \
438
+	"manpage_directory = $manpage_directory" \
439
+	"sample_directory = $sample_directory" \
440
+	"readme_directory = $readme_directory" \
441
+    || exit 1
442
+}
443
+
444
+# Use file/directory status information in $daemon_directory/postfix-files.
445
+
446
+test -n "$create" && {
447
+    postfix_files_d=$daemon_directory/postfix-files.d
448
+    for postfix_file in $daemon_directory/postfix-files \
449
+	`test -d $postfix_files_d && { find $postfix_files_d -type f | sort; }`
450
+    do
451
+	exec <$postfix_file || exit 1
452
+	while IFS=: read path type owner group mode flags junk
453
+	do
454
+	    IFS="$BACKUP_IFS"
455
+	    set_permission=
456
+	    # Skip comments. Skip shared files, if updating a secondary instance.
457
+	    case $path in
458
+	    [$]*) case "$update_shared_files" in
459
+		  1) $debug keep non-shared or shared $path;;
460
+		  *) non_shared=
461
+		     for name in $NON_SHARED
462
+		     do
463
+			 case $path in
464
+			 "\$$name"*) non_shared=1; break;;
465
+			 esac
466
+		     done
467
+		     case "$non_shared" in
468
+		      1) $debug keep non-shared $path;;
469
+		      *) $debug skip shared $path; continue;;
470
+		     esac;;
471
+		  esac;;
472
+	       *) continue;;
473
+	    esac
474
+	    # Skip hard links and symbolic links.
475
+	    case $type in
476
+	    [hl]) continue;;
477
+	    [df]) ;;
478
+	       *) echo unknown type $type for $path in $postfix_file 1>&2; exit 1;;
479
+	    esac
480
+	    # Expand $name, and canonicalize null fields.
481
+	    for name in path owner group flags
482
+	    do
483
+		eval junk=\${$name}
484
+		case $junk in
485
+		[$]*) eval $name=$junk;;
486
+		   -) eval $name=;;
487
+		   *) ;;
488
+		esac
489
+	    done
490
+	    # Skip uninstalled files.
491
+	    case $path in
492
+	    no|no/*) continue;;
493
+	    esac
494
+	    # Pick up the flags.
495
+	    case $flags in *u*) upgrade_flag=1;; *) upgrade_flag=;; esac
496
+	    case $flags in *c*) create_flag=1;; *) create_flag=;; esac
497
+	    case $flags in *r*) recursive="-R";; *) recursive=;; esac
498
+	    case $flags in *o*) obsolete_flag=1;; *) obsolete_flag=;; esac
499
+	    case $flags in *[1i]*) test ! -r "$path" -a "$config_directory" != \
500
+				    "$def_config_directory" && continue;; esac
501
+	    # Flag obsolete objects. XXX Solaris 2..9 does not have "test -e".
502
+	    if [ -n "$obsolete_flag" ]
503
+	    then
504
+		test -r $path -a "$type" != "d" && obsolete="$obsolete $path"
505
+		continue;
506
+	    else
507
+		keep_list="$keep_list $path"
508
+	    fi
509
+	    # Create missing directories with proper owner/group/mode settings.
510
+	    if [ -n "$create" -a "$type" = "d" -a -n "$create_flag" -a ! -d "$path" ]
511
+	    then
512
+		mkdir $path || exit 1
513
+		set_permission=1
514
+	    # Update all owner/group/mode settings.
515
+	    elif [ -n "$set_perms" ]
516
+	    then
517
+		set_permission=1
518
+	    # Update obsolete owner/group/mode settings.
519
+	    elif [ -n "$upgrade_perms" -a -n "$upgrade_flag" ]
520
+	    then
521
+		set_permission=1
522
+	    fi
523
+	    test -n "$set_permission" && {
524
+		chown $recursive $owner $path || exit 1
525
+		test -z "$group" || chgrp $recursive $group $path || exit 1
526
+		# Don't "chmod -R"; queue file status is encoded in mode bits.
527
+		if [ "$type" = "d" -a -n "$recursive" ]
528
+		then
529
+		    find $path -type d -exec chmod $mode "{}" ";"
530
+		else
531
+		    chmod $mode $path
532
+		fi || exit 1
533
+	    }
534
+	done
535
+	IFS="$BACKUP_IFS"
536
+    done
537
+}
538
+
539
+# Upgrade existing Postfix configuration files if necessary.
540
+
541
+test -n "$upgrade_conf" && {
542
+
543
+    # Postfix 2.0.
544
+    # Add missing relay service to master.cf.
545
+
546
+    grep '^relay' $config_directory/master.cf >/dev/null || {
547
+	echo Editing $config_directory/master.cf, adding missing entry for relay service
548
+	cat >>$config_directory/master.cf <<EOF || exit 1
549
+relay	  unix	-	-	n	-	-	smtp
550
+EOF
551
+    }
552
+
553
+    # Postfix 1.1.
554
+    # Add missing flush service to master.cf.
555
+
556
+    grep '^flush.*flush' $config_directory/master.cf >/dev/null || {
557
+	echo Editing $config_directory/master.cf, adding missing entry for flush service
558
+	cat >>$config_directory/master.cf <<EOF || exit 1
559
+flush     unix  -       -       n       1000?   0       flush
560
+EOF
561
+    }
562
+
563
+    # Postfix 2.1.
564
+    # Add missing trace service to master.cf.
565
+
566
+    grep 'trace.*bounce' $config_directory/master.cf >/dev/null || {
567
+	echo Editing $config_directory/master.cf, adding missing entry for trace service
568
+	cat >>$config_directory/master.cf <<EOF || exit 1
569
+trace	  unix	-	-	n	-	0	bounce
570
+EOF
571
+    }
572
+
573
+    # Postfix 2.1.
574
+    # Add missing verify service to master.cf.
575
+
576
+    grep '^verify.*verify' $config_directory/master.cf >/dev/null || {
577
+	echo Editing $config_directory/master.cf, adding missing entry for verify service
578
+	cat >>$config_directory/master.cf <<EOF || exit 1
579
+verify	  unix	-	-	n	-	1	verify
580
+EOF
581
+    }
582
+
583
+    # Postfix 2.1.
584
+    # Fix verify service process limit.
585
+
586
+    grep '^verify.*[ 	]0[ 	]*verify' \
587
+	$config_directory/master.cf >/dev/null && {
588
+	    echo Editing $config_directory/master.cf, setting verify process limit to 1
589
+	    ed $config_directory/master.cf <<EOF || exit 1
590
+/^verify.*[ 	]0[ 	]*verify/
591
+s/\([ 	]\)0\([ 	]\)/\11\2/
592
+p
593
+w
594
+q
595
+EOF
596
+    }
597
+
598
+    # Postfix 1.1.
599
+    # Change privileged pickup service into unprivileged.
600
+
601
+    grep "^pickup[ 	]*fifo[ 	]*n[ 	]*n" \
602
+	$config_directory/master.cf >/dev/null && {
603
+	    echo Editing $config_directory/master.cf, making the pickup service unprivileged
604
+	    ed $config_directory/master.cf <<EOF || exit 1
605
+/^pickup[ 	]*fifo[ 	]*n[ 	]*n/
606
+s/\(n[ 	]*\)n/\1-/
607
+p
608
+w
609
+q
610
+EOF
611
+    }
612
+
613
+    # Postfix 1.1.
614
+    # Change private cleanup and flush services into public.
615
+
616
+    for name in cleanup flush
617
+    do
618
+	grep "^$name[ 	]*unix[ 	]*[-y]" \
619
+	    $config_directory/master.cf >/dev/null && {
620
+		echo Editing $config_directory/master.cf, making the $name service public
621
+	    ed $config_directory/master.cf <<EOF || exit 1
622
+/^$name[ 	]*unix[ 	]*[-y]/
623
+s/[-y]/n/
624
+p
625
+w
626
+q
627
+EOF
628
+	}
629
+    done
630
+
631
+    # Postfix 2.2.
632
+    # File systems have improved since Postfix came out, and all we
633
+    # require now is that defer and deferred are hashed because those
634
+    # can contain lots of files.
635
+
636
+    found=`$POSTCONF -c $config_directory -h hash_queue_names`
637
+    missing=
638
+    (echo "$found" | grep defer >/dev/null)  || missing="$missing defer"
639
+    (echo "$found" | grep deferred>/dev/null)|| missing="$missing deferred"
640
+    test -n "$missing" && {
641
+	echo fixing main.cf hash_queue_names for missing $missing
642
+	$POSTCONF -c $config_directory -e hash_queue_names="$found$missing" ||
643
+	    exit 1
644
+    }
645
+
646
+    # Turn on safety nets for new features that could bounce mail that
647
+    # would be accepted by a previous Postfix version.
648
+
649
+    # [The "unknown_local_recipient_reject_code = 450" safety net,
650
+    # introduced with Postfix 2.0 and deleted after Postfix 2.3.]
651
+
652
+    # Postfix 2.0.
653
+    # Add missing proxymap service to master.cf.
654
+
655
+    grep '^proxymap.*proxymap' $config_directory/master.cf >/dev/null || {
656
+	echo Editing $config_directory/master.cf, adding missing entry for proxymap service
657
+	cat >>$config_directory/master.cf <<EOF || exit 1
658
+proxymap  unix	-	-	n	-	-	proxymap
659
+EOF
660
+    }
661
+
662
+    # Postfix 2.1.
663
+    # Add missing anvil service to master.cf.
664
+
665
+    grep '^anvil.*anvil' $config_directory/master.cf >/dev/null || {
666
+	echo Editing $config_directory/master.cf, adding missing entry for anvil service
667
+	cat >>$config_directory/master.cf <<EOF || exit 1
668
+anvil	  unix	-	-	n	-	1	anvil
669
+EOF
670
+    }
671
+
672
+    # Postfix 2.2.
673
+    # Add missing scache service to master.cf.
674
+
675
+    grep '^scache.*scache' $config_directory/master.cf >/dev/null || {
676
+	echo Editing $config_directory/master.cf, adding missing entry for scache service
677
+	cat >>$config_directory/master.cf <<EOF || exit 1
678
+scache	  unix	-	-	n	-	1	scache
679
+EOF
680
+    }
681
+
682
+    # Postfix 2.2.
683
+    # Add missing discard service to master.cf.
684
+
685
+    grep '^discard.*discard' $config_directory/master.cf >/dev/null || {
686
+	echo Editing $config_directory/master.cf, adding missing entry for discard service
687
+	cat >>$config_directory/master.cf <<EOF || exit 1
688
+discard	  unix	-	-	n	-	-	discard
689
+EOF
690
+    }
691
+
692
+    # Postfix 2.2.
693
+    # Update the tlsmgr fifo->unix service.
694
+
695
+    grep "^tlsmgr[ 	]*fifo[ 	]" \
696
+	$config_directory/master.cf >/dev/null && {
697
+	    echo Editing $config_directory/master.cf, updating the tlsmgr from fifo to unix service
698
+	    ed $config_directory/master.cf <<EOF || exit 1
699
+/^tlsmgr[ 	]*fifo[ 	]/
700
+s/fifo/unix/
701
+s/[0-9][0-9]*/&?/
702
+p
703
+w
704
+q
705
+EOF
706
+    }
707
+
708
+    # Postfix 2.2.
709
+    # Add missing tlsmgr service to master.cf.
710
+
711
+    grep '^tlsmgr.*tlsmgr' $config_directory/master.cf >/dev/null || {
712
+	echo Editing $config_directory/master.cf, adding missing entry for tlsmgr service
713
+	cat >>$config_directory/master.cf <<EOF || exit 1
714
+tlsmgr    unix  -       -       n       1000?   1       tlsmgr
715
+EOF
716
+    }
717
+
718
+    # Postfix 2.2.
719
+    # Add missing retry service to master.cf.
720
+
721
+    grep '^retry.*error' $config_directory/master.cf >/dev/null || {
722
+	echo Editing $config_directory/master.cf, adding missing entry for retry service
723
+	cat >>$config_directory/master.cf <<EOF || exit 1
724
+retry     unix  -       -       n       -       -       error
725
+EOF
726
+    }
727
+
728
+    # Postfix 2.5.
729
+    # Add missing proxywrite service to master.cf.
730
+
731
+    grep '^proxywrite.*proxymap' $config_directory/master.cf >/dev/null || {
732
+	echo Editing $config_directory/master.cf, adding missing entry for proxywrite service
733
+	cat >>$config_directory/master.cf <<EOF || exit 1
734
+proxywrite unix -       -       n       -       1       proxymap
735
+EOF
736
+    }
737
+
738
+    # Postfix 2.5.
739
+    # Fix a typo in the default master.cf proxywrite entry.
740
+
741
+    grep '^proxywrite.*-[ 	]*proxymap' $config_directory/master.cf >/dev/null && {
742
+	echo Editing $config_directory/master.cf, setting proxywrite process limit to 1
743
+	    ed $config_directory/master.cf <<EOF || exit 1
744
+/^proxywrite.*-[ 	]*proxymap/
745
+s/-\([ 	]*proxymap\)/1\1/
746
+p
747
+w
748
+q
749
+EOF
750
+    }
751
+
752
+    # Postfix 2.8.
753
+    # Add missing postscreen service to master.cf.
754
+
755
+    grep '^#*smtp.*postscreen' $config_directory/master.cf >/dev/null || {
756
+	echo Editing $config_directory/master.cf, adding missing entry for postscreen TCP service
757
+	cat >>$config_directory/master.cf <<EOF || exit 1
758
+#smtp      inet  n       -       n       -       1       postscreen
759
+EOF
760
+    }
761
+
762
+    # Postfix 2.8.
763
+    # Add missing smtpd (unix-domain) service to master.cf.
764
+
765
+    grep '^#*smtpd.*smtpd' $config_directory/master.cf >/dev/null || {
766
+	echo Editing $config_directory/master.cf, adding missing entry for smtpd unix-domain service
767
+	cat >>$config_directory/master.cf <<EOF || exit 1
768
+#smtpd     pass  -       -       n       -       -       smtpd
769
+EOF
770
+    }
771
+
772
+    # Postfix 2.8.
773
+    # Add temporary dnsblog (unix-domain) service to master.cf.
774
+
775
+    grep '^#*dnsblog.*dnsblog' $config_directory/master.cf >/dev/null || {
776
+	echo Editing $config_directory/master.cf, adding missing entry for dnsblog unix-domain service
777
+	cat >>$config_directory/master.cf <<EOF || exit 1
778
+#dnsblog   unix  -       -       n       -       0       dnsblog
779
+EOF
780
+    }
781
+
782
+    # Postfix 2.8.
783
+    # Add tlsproxy (unix-domain) service to master.cf.
784
+
785
+    grep '^#*tlsproxy.*tlsproxy' $config_directory/master.cf >/dev/null || {
786
+	echo Editing $config_directory/master.cf, adding missing entry for tlsproxy unix-domain service
787
+	cat >>$config_directory/master.cf <<EOF || exit 1
788
+#tlsproxy  unix  -       -       n       -       0       tlsproxy
789
+EOF
790
+    }
791
+
792
+    # Report (but do not remove) obsolete files.
793
+
794
+    test -n "$obsolete" && {
795
+	cat <<EOF | ${FMT}
796
+
797
+    Note: the following files or directories still exist but are
798
+    no longer part of Postfix:
799
+
800
+    $obsolete
801
+
802
+EOF
803
+    }
804
+
805
+    # Postfix 2.9.
806
+    # Safety net for incompatible changes in IPv6 defaults.
807
+    # PLEASE DO NOT REMOVE THIS CODE. ITS PURPOSE IS TO AVOID AN
808
+    # UNEXPECTED DROP IN PERFORMANCE AFTER UPGRADING FROM POSTFIX
809
+    # BEFORE 2.9.
810
+    # This code assumes that the default is "inet_protocols = ipv4"
811
+    # when IPv6 support is not compiled in. See util/sys_defs.h.
812
+
813
+    test "`$POSTCONF -dh inet_protocols`" = "ipv4" ||
814
+	test -n "`$POSTCONF -c $config_directory -n inet_protocols`" || {
815
+	cat <<EOF | ${FMT}
816
+    COMPATIBILITY: editing $config_directory/main.cf, setting
817
+    inet_protocols=ipv4.  Specify inet_protocols explicitly if you
818
+    want to enable IPv6.
819
+    In a future release IPv6 will be enabled by default.
820
+EOF
821
+	$POSTCONF -c $config_directory inet_protocols=ipv4 || exit 1
822
+    }
823
+
824
+# Disabled because unhelpful down-stream maintainers disable the safety net.
825
+#    # Postfix 2.10.
826
+#    # Safety net for incompatible changes due to the introduction
827
+#    # of the smtpd_relay_restrictions feature to separate the
828
+#    # mail relay policy from the spam blocking policy.
829
+#    # PLEASE DO NOT REMOVE THIS CODE. ITS PURPOSE IS TO PREVENT
830
+#    # INBOUND MAIL FROM UNEXPECTEDLY BOUNCING AFTER UPGRADING FROM
831
+#    # POSTFIX BEFORE 2.10.
832
+#    test -n "`$POSTCONF -c $config_directory -n smtpd_relay_restrictions`" || {
833
+#	cat <<EOF | ${FMT}
834
+#    COMPATIBILITY: editing $config_directory/main.cf, overriding
835
+#    smtpd_relay_restrictions to prevent inbound mail from
836
+#    unexpectedly bouncing.
837
+#    Specify an empty smtpd_relay_restrictions value to keep using 
838
+#    smtpd_recipient_restrictions as before.
839
+#EOF
840
+#	$POSTCONF -c $config_directory "smtpd_relay_restrictions = \
841
+#	    permit_mynetworks permit_sasl_authenticated \
842
+#	    defer_unauth_destination" || exit 1
843
+#    }
844
+}
845
+
846
+# A reminder if this is the first time Postfix is being installed.
847
+
848
+test -n "$first_install_reminder" && {
849
+
850
+    ALIASES=`$POSTCONF -c $config_directory -h alias_database | sed 's/^[^:]*://'`
851
+    NEWALIASES_PATH=`$POSTCONF -c $config_directory -h newaliases_path`
852
+    cat <<EOF | ${FMT}
853
+
854
+    Warning: you still need to edit myorigin/mydestination/mynetworks
855
+    parameter settings in $config_directory/main.cf.
856
+
857
+    See also http://www.postfix.org/STANDARD_CONFIGURATION_README.html
858
+    for information about dialup sites or about sites inside a
859
+    firewalled network.
860
+
861
+    BTW: Check your $ALIASES file and be sure to set up aliases
862
+    that send mail for root and postmaster to a real person, then
863
+    run $NEWALIASES_PATH.
864
+
865
+EOF
866
+
867
+}
868
+
869
+exit 0

+ 442
- 0
postfix/config/postfix-files Datei anzeigen

@@ -0,0 +1,442 @@
1
+#
2
+# Do not edit this file.
3
+#
4
+# This file controls the postfix-install script for installation of
5
+# Postfix programs, configuration files and documentation, as well
6
+# as the post-install script for setting permissions and for updating
7
+# Postfix configuration files. See the respective manual pages within
8
+# the script files.
9
+#
10
+# Do not list $command_directory in this file, or it will be blown
11
+# away by a future Postfix uninstallation procedure. You would not
12
+# want to lose all files in /usr/sbin.
13
+#
14
+# Each record in this file describes one file or directory.
15
+# Fields are separated by ":". Specify a null field as "-".
16
+# Missing fields or separators at the end are OK.
17
+#
18
+# File format:
19
+#	name:type:owner:group:permission:flags
20
+#	No group means don't change group ownership.
21
+#
22
+# File types:
23
+#	d=directory
24
+#	f=regular file
25
+#	h=hard link (*)
26
+#	l=symbolic link (*)
27
+#
28
+# (*) With hard links and symbolic links, the owner field becomes the
29
+#     source pathname, while the group and permissions are ignored.
30
+#
31
+# File flags:
32
+#	No flag means the flag is not active.
33
+#	p=preserve existing file, do not replace (postfix-install).
34
+#	u=update owner/group/mode (post-install upgrade-permissions).
35
+#	c=create missing directory (post-install create-missing).
36
+#	r=apply owner/group recursively (post-install set/upgrade-permissions).
37
+#	o=obsolete, no longer part of Postfix
38
+#	1=optional for non-default instance (config_dir != built-in default).
39
+#
40
+# Note: the "u" flag is for upgrading the permissions of existing files
41
+# or directories after changes in Postfix architecture. For robustness
42
+# it is a good idea to "u" all the files that have special ownership or
43
+# permissions, so that running "make install" fixes any glitches.
44
+#
45
+$config_directory:d:root:-:755:u
46
+$data_directory:d:$mail_owner:-:700:uc
47
+$daemon_directory:d:root:-:755:u
48
+$queue_directory:d:root:-:755:uc
49
+$sample_directory:d:root:-:755:o
50
+$readme_directory:d:root:-:755
51
+$html_directory:d:root:-:755
52
+$queue_directory/active:d:$mail_owner:-:700:ucr
53
+$queue_directory/bounce:d:$mail_owner:-:700:ucr
54
+$queue_directory/corrupt:d:$mail_owner:-:700:ucr
55
+$queue_directory/defer:d:$mail_owner:-:700:ucr
56
+$queue_directory/deferred:d:$mail_owner:-:700:ucr
57
+$queue_directory/flush:d:$mail_owner:-:700:ucr
58
+$queue_directory/hold:d:$mail_owner:-:700:ucr
59
+$queue_directory/incoming:d:$mail_owner:-:700:ucr
60
+$queue_directory/private:d:$mail_owner:-:700:uc
61
+$queue_directory/maildrop:d:$mail_owner:$setgid_group:730:uc
62
+$queue_directory/public:d:$mail_owner:$setgid_group:710:uc
63
+$queue_directory/pid:d:root:-:755:uc
64
+$queue_directory/saved:d:$mail_owner:-:700:ucr
65
+$queue_directory/trace:d:$mail_owner:-:700:ucr
66
+$daemon_directory/anvil:f:root:-:755
67
+$daemon_directory/bounce:f:root:-:755
68
+$daemon_directory/dict_cdb.so:f:root:-:755
69
+$daemon_directory/dict_ldap.so:f:root:-:755
70
+$daemon_directory/dict_pcre.so:f:root:-:755
71
+$daemon_directory/dict_mysql.so:f:root:-:755
72
+$daemon_directory/dict_sqlite.so:f:root:-:755
73
+$daemon_directory/dict_tcp.so:f:root:-:755
74
+$daemon_directory/dict_sdbm.so:f:root:-:755
75
+$daemon_directory/cleanup:f:root:-:755
76
+$daemon_directory/discard:f:root:-:755
77
+$daemon_directory/dnsblog:f:root:-:755
78
+$daemon_directory/error:f:root:-:755
79
+$daemon_directory/flush:f:root:-:755
80
+#$daemon_directory/lmtp:f:root:-:755
81
+$daemon_directory/local:f:root:-:755
82
+$daemon_directory/main.cf:f:root:-:644
83
+$daemon_directory/master.cf:f:root:-:644
84
+$daemon_directory/master:f:root:-:755
85
+$daemon_directory/oqmgr:f:root:-:755
86
+$daemon_directory/pickup:f:root:-:755
87
+$daemon_directory/pipe:f:root:-:755
88
+$daemon_directory/post-install:f:root:-:755
89
+$daemon_directory/postfix-files:f:root:-:644
90
+$daemon_directory/postfix-script:f:root:-:755
91
+$daemon_directory/postfix-wrapper:f:root:-:755
92
+$daemon_directory/postmulti-script:f:root:-:755
93
+$daemon_directory/postscreen:f:root:-:755
94
+$daemon_directory/proxymap:f:root:-:755
95
+$daemon_directory/qmgr:f:root:-:755
96
+$daemon_directory/qmqpd:f:root:-:755
97
+$daemon_directory/scache:f:root:-:755
98
+$daemon_directory/showq:f:root:-:755
99
+$daemon_directory/smtp:f:root:-:755
100
+$daemon_directory/smtpd:f:root:-:755
101
+$daemon_directory/spawn:f:root:-:755
102
+$daemon_directory/tlsproxy:f:root:-:755
103
+$daemon_directory/tlsmgr:f:root:-:755
104
+$daemon_directory/trivial-rewrite:f:root:-:755
105
+$daemon_directory/verify:f:root:-:755
106
+$daemon_directory/virtual:f:root:-:755
107
+/usr/lib/libpostfix-dns.so.1:f:root:-:755
108
+/usr/lib/libpostfix-global.so.1:f:root:-:755
109
+/usr/lib/libpostfix-tls.so.1:f:root:-:755
110
+/usr/lib/libpostfix-master.so.1:f:root:-:755
111
+/usr/lib/libpostfix-util.so.1:f:root:-:755
112
+$daemon_directory/nqmgr:h:$daemon_directory/qmgr
113
+$daemon_directory/lmtp:h:$daemon_directory/smtp
114
+$command_directory/postalias:f:root:-:755
115
+$command_directory/postcat:f:root:-:755
116
+$command_directory/postconf:f:root:-:755
117
+$command_directory/postfix:f:root:-:755
118
+$command_directory/postkick:f:root:-:755
119
+$command_directory/postlock:f:root:-:755
120
+$command_directory/postlog:f:root:-:755
121
+$command_directory/postmap:f:root:-:755
122
+$command_directory/postmulti:f:root:-:755
123
+$command_directory/postsuper:f:root:-:755
124
+$command_directory/postdrop:f:root:$setgid_group:2755:u
125
+$command_directory/postqueue:f:root:$setgid_group:2755:u
126
+$sendmail_path:f:root:-:755
127
+$newaliases_path:l:$sendmail_path
128
+$mailq_path:l:$sendmail_path
129
+$config_directory/LICENSE:f:root:-:644:1
130
+$config_directory/TLS_LICENSE:f:root:-:644:1
131
+$config_directory/access:f:root:-:644:p1
132
+$config_directory/aliases:f:root:-:644:p1
133
+$config_directory/bounce.cf.default:f:root:-:644:1
134
+$config_directory/canonical:f:root:-:644:p1
135
+$config_directory/dynamicmaps.cf:f:root:-:644:p1
136
+$config_directory/cidr_table:f:root:-:644:o
137
+$config_directory/generic:f:root:-:644:p1
138
+$config_directory/generics:f:root:-:644:o
139
+$config_directory/header_checks:f:root:-:644:p1
140
+$config_directory/install.cf:f:root:-:644:o
141
+$config_directory/main.cf.default:f:root:-:644:1
142
+$config_directory/main.cf:f:root:-:644:p
143
+$config_directory/makedefs.out:f:root:-:644:1
144
+$config_directory/master.cf:f:root:-:644:p
145
+$config_directory/pcre_table:f:root:-:644:o
146
+$config_directory/postfix-files:f:root:-:644:o
147
+$config_directory/regexp_table:f:root:-:644:o
148
+$config_directory/relocated:f:root:-:644:p1
149
+$config_directory/tcp_table:f:root:-:644:o
150
+$config_directory/transport:f:root:-:644:p1
151
+$config_directory/virtual:f:root:-:644:p1
152
+$config_directory/postfix-script:f:root:-:755:o
153
+$config_directory/postfix-script-sgid:f:root:-:755:o
154
+$config_directory/postfix-script-nosgid:f:root:-:755:o
155
+$config_directory/post-install:f:root:-:755:o
156
+$manpage_directory/man1/mailq.1:f:root:-:644
157
+$manpage_directory/man1/newaliases.1:f:root:-:644
158
+$manpage_directory/man1/postalias.1:f:root:-:644
159
+$manpage_directory/man1/postcat.1:f:root:-:644
160
+$manpage_directory/man1/postconf.1:f:root:-:644
161
+$manpage_directory/man1/postdrop.1:f:root:-:644
162
+$manpage_directory/man1/postfix.1:f:root:-:644
163
+$manpage_directory/man1/postkick.1:f:root:-:644
164
+$manpage_directory/man1/postlock.1:f:root:-:644
165
+$manpage_directory/man1/postlog.1:f:root:-:644
166
+$manpage_directory/man1/postmap.1:f:root:-:644
167
+$manpage_directory/man1/postmulti.1:f:root:-:644
168
+$manpage_directory/man1/postqueue.1:f:root:-:644
169
+$manpage_directory/man1/postsuper.1:f:root:-:644
170
+$manpage_directory/man1/sendmail.1:f:root:-:644
171
+$manpage_directory/man5/access.5:f:root:-:644
172
+$manpage_directory/man5/aliases.5:f:root:-:644
173
+$manpage_directory/man5/body_checks.5:f:root:-:644
174
+$manpage_directory/man5/bounce.5:f:root:-:644
175
+$manpage_directory/man5/canonical.5:f:root:-:644
176
+$manpage_directory/man5/cidr_table.5:f:root:-:644
177
+$manpage_directory/man5/generics.5:f:root:-:644:o
178
+$manpage_directory/man5/generic.5:f:root:-:644
179
+$manpage_directory/man5/header_checks.5:f:root:-:644
180
+$manpage_directory/man5/ldap_table.5:f:root:-:644
181
+$manpage_directory/man5/lmdb_table.5:f:root:-:644
182
+$manpage_directory/man5/master.5:f:root:-:644
183
+$manpage_directory/man5/memcache_table.5:f:root:-:644
184
+$manpage_directory/man5/mysql_table.5:f:root:-:644
185
+$manpage_directory/man5/socketmap_table.5:f:root:-:644
186
+$manpage_directory/man5/sqlite_table.5:f:root:-:644
187
+$manpage_directory/man5/nisplus_table.5:f:root:-:644
188
+$manpage_directory/man5/pcre_table.5:f:root:-:644
189
+$manpage_directory/man5/pgsql_table.5:f:root:-:644
190
+$manpage_directory/man5/postconf.5:f:root:-:644
191
+$manpage_directory/man5/postfix-wrapper.5:f:root:-:644
192
+$manpage_directory/man5/regexp_table.5:f:root:-:644
193
+$manpage_directory/man5/relocated.5:f:root:-:644
194
+$manpage_directory/man5/tcp_table.5:f:root:-:644
195
+$manpage_directory/man5/transport.5:f:root:-:644
196
+$manpage_directory/man5/virtual.5:f:root:-:644
197
+$manpage_directory/man8/bounce.8:f:root:-:644
198
+$manpage_directory/man8/cleanup.8:f:root:-:644
199
+$manpage_directory/man8/anvil.8:f:root:-:644
200
+$manpage_directory/man8/defer.8:f:root:-:644
201
+$manpage_directory/man8/discard.8:f:root:-:644
202
+$manpage_directory/man8/dnsblog.8:f:root:-:644
203
+$manpage_directory/man8/error.8:f:root:-:644
204
+$manpage_directory/man8/flush.8:f:root:-:644
205
+$manpage_directory/man8/lmtp.8:f:root:-:644
206
+$manpage_directory/man8/local.8:f:root:-:644
207
+$manpage_directory/man8/master.8:f:root:-:644
208
+$manpage_directory/man8/nqmgr.8:f:root:-:644:o
209
+$manpage_directory/man8/oqmgr.8:f:root:-:644:
210
+$manpage_directory/man8/pickup.8:f:root:-:644
211
+$manpage_directory/man8/pipe.8:f:root:-:644
212
+$manpage_directory/man8/postscreen.8:f:root:-:644
213
+$manpage_directory/man8/proxymap.8:f:root:-:644
214
+$manpage_directory/man8/qmgr.8:f:root:-:644
215
+$manpage_directory/man8/qmqpd.8:f:root:-:644
216
+$manpage_directory/man8/scache.8:f:root:-:644
217
+$manpage_directory/man8/showq.8:f:root:-:644
218
+$manpage_directory/man8/smtp.8:f:root:-:644
219
+$manpage_directory/man8/smtpd.8:f:root:-:644
220
+$manpage_directory/man8/spawn.8:f:root:-:644
221
+$manpage_directory/man8/tlsproxy.8:f:root:-:644
222
+$manpage_directory/man8/tlsmgr.8:f:root:-:644
223
+$manpage_directory/man8/trace.8:f:root:-:644
224
+$manpage_directory/man8/trivial-rewrite.8:f:root:-:644
225
+$manpage_directory/man8/verify.8:f:root:-:644
226
+$manpage_directory/man8/virtual.8:f:root:-:644
227
+$sample_directory/sample-aliases.cf:f:root:-:644:o
228
+$sample_directory/sample-auth.cf:f:root:-:644:o
229
+$sample_directory/sample-canonical.cf:f:root:-:644:o
230
+$sample_directory/sample-compatibility.cf:f:root:-:644:o
231
+$sample_directory/sample-debug.cf:f:root:-:644:o
232
+$sample_directory/sample-filter.cf:f:root:-:644:o
233
+$sample_directory/sample-flush.cf:f:root:-:644:o
234
+$sample_directory/sample-ipv6.cf:f:root:-:644:o
235
+$sample_directory/sample-ldap.cf:f:root:-:644:o
236
+$sample_directory/sample-lmtp.cf:f:root:-:644:o
237
+$sample_directory/sample-local.cf:f:root:-:644:o
238
+$sample_directory/sample-mime.cf:f:root:-:644:o
239
+$sample_directory/sample-misc.cf:f:root:-:644:o
240
+$sample_directory/sample-pcre-access.cf:f:root:-:644:o
241
+$sample_directory/sample-pcre-body.cf:f:root:-:644:o
242
+$sample_directory/sample-pcre-header.cf:f:root:-:644:o
243
+$sample_directory/sample-pgsql-aliases.cf:f:root:-:644:o
244
+$sample_directory/sample-qmqpd.cf:f:root:-:644:o
245
+$sample_directory/sample-rate.cf:f:root:-:644:o
246
+$sample_directory/sample-regexp-access.cf:f:root:-:644:o
247
+$sample_directory/sample-regexp-body.cf:f:root:-:644:o
248
+$sample_directory/sample-regexp-header.cf:f:root:-:644:o
249
+$sample_directory/sample-relocated.cf:f:root:-:644:o
250
+$sample_directory/sample-resource.cf:f:root:-:644:o
251
+$sample_directory/sample-rewrite.cf:f:root:-:644:o
252
+$sample_directory/sample-scheduler.cf:f:root:-:644:o
253
+$sample_directory/sample-smtp.cf:f:root:-:644:o
254
+$sample_directory/sample-smtpd.cf:f:root:-:644:o
255
+$sample_directory/sample-tls.cf:f:root:-:644:o
256
+$sample_directory/sample-transport.cf:f:root:-:644:o
257
+$sample_directory/sample-verify.cf:f:root:-:644:o
258
+$sample_directory/sample-virtual.cf:f:root:-:644:o
259
+$readme_directory/AAAREADME:f:root:-:644
260
+$readme_directory/ADDRESS_CLASS_README:f:root:-:644
261
+$readme_directory/ADDRESS_REWRITING_README:f:root:-:644
262
+$readme_directory/ADDRESS_VERIFICATION_README:f:root:-:644
263
+$readme_directory/BACKSCATTER_README:f:root:-:644
264
+$readme_directory/BASIC_CONFIGURATION_README:f:root:-:644
265
+$readme_directory/BUILTIN_FILTER_README:f:root:-:644
266
+$readme_directory/CDB_README:f:root:-:644
267
+$readme_directory/CONNECTION_CACHE_README:f:root:-:644
268
+$readme_directory/CONTENT_INSPECTION_README:f:root:-:644
269
+$readme_directory/DATABASE_README:f:root:-:644
270
+$readme_directory/DB_README:f:root:-:644
271
+$readme_directory/DEBUG_README:f:root:-:644
272
+$readme_directory/DSN_README:f:root:-:644
273
+$readme_directory/ETRN_README:f:root:-:644
274
+$readme_directory/FILTER_README:f:root:-:644
275
+$readme_directory/FORWARD_SECRECY_README:f:root:-:644
276
+$readme_directory/HOSTING_README:f:root:-:644:o
277
+$readme_directory/INSTALL:f:root:-:644
278
+$readme_directory/IPV6_README:f:root:-:644
279
+$readme_directory/LDAP_README:f:root:-:644
280
+$readme_directory/LINUX_README:f:root:-:644
281
+$readme_directory/LMDB_README:f:root:-:644
282
+$readme_directory/LOCAL_RECIPIENT_README:f:root:-:644
283
+$readme_directory/MACOSX_README:f:root:-:644:o
284
+$readme_directory/MAILDROP_README:f:root:-:644
285
+$readme_directory/MEMCACHE_README:f:root:-:644
286
+$readme_directory/MILTER_README:f:root:-:644
287
+$readme_directory/MULTI_INSTANCE_README:f:root:-:644
288
+$readme_directory/MYSQL_README:f:root:-:644
289
+$readme_directory/SQLITE_README:f:root:-:644
290
+$readme_directory/NFS_README:f:root:-:644
291
+$readme_directory/OVERVIEW:f:root:-:644
292
+$readme_directory/PACKAGE_README:f:root:-:644
293
+$readme_directory/PCRE_README:f:root:-:644
294
+$readme_directory/PGSQL_README:f:root:-:644
295
+$readme_directory/POSTSCREEN_README:f:root:-:644
296
+$readme_directory/QMQP_README:f:root:-:644:o
297
+$readme_directory/QSHAPE_README:f:root:-:644
298
+$readme_directory/RELEASE_NOTES:f:root:-:644
299
+$readme_directory/RESTRICTION_CLASS_README:f:root:-:644
300
+$readme_directory/SASL_README:f:root:-:644
301
+$readme_directory/SCHEDULER_README:f:root:-:644
302
+$readme_directory/SMTPD_ACCESS_README:f:root:-:644
303
+$readme_directory/SMTPD_POLICY_README:f:root:-:644
304
+$readme_directory/SMTPD_PROXY_README:f:root:-:644
305
+$readme_directory/SOHO_README:f:root:-:644
306
+$readme_directory/STANDARD_CONFIGURATION_README:f:root:-:644
307
+$readme_directory/STRESS_README:f:root:-:644
308
+$readme_directory/TLS_LEGACY_README:f:root:-:644
309
+$readme_directory/TLS_README:f:root:-:644
310
+$readme_directory/TUNING_README:f:root:-:644
311
+$readme_directory/ULTRIX_README:f:root:-:644
312
+$readme_directory/UUCP_README:f:root:-:644
313
+$readme_directory/VERP_README:f:root:-:644
314
+$readme_directory/VIRTUAL_README:f:root:-:644
315
+$readme_directory/XCLIENT_README:f:root:-:644
316
+$readme_directory/XFORWARD_README:f:root:-:644
317
+$html_directory/ADDRESS_CLASS_README.html:f:root:-:644
318
+$html_directory/ADDRESS_REWRITING_README.html:f:root:-:644
319
+$html_directory/ADDRESS_VERIFICATION_README.html:f:root:-:644
320
+$html_directory/BACKSCATTER_README.html:f:root:-:644
321
+$html_directory/BASIC_CONFIGURATION_README.html:f:root:-:644
322
+$html_directory/BUILTIN_FILTER_README.html:f:root:-:644
323
+$html_directory/CDB_README.html:f:root:-:644
324
+$html_directory/CONNECTION_CACHE_README.html:f:root:-:644
325
+$html_directory/CONTENT_INSPECTION_README.html:f:root:-:644
326
+$html_directory/CYRUS_README.html:f:root:-:644:o
327
+$html_directory/DATABASE_README.html:f:root:-:644
328
+$html_directory/DB_README.html:f:root:-:644
329
+$html_directory/DEBUG_README.html:f:root:-:644
330
+$html_directory/DSN_README.html:f:root:-:644
331
+$html_directory/ETRN_README.html:f:root:-:644
332
+$html_directory/FILTER_README.html:f:root:-:644
333
+$html_directory/FORWARD_SECRECY_README.html:f:root:-:644
334
+$html_directory/INSTALL.html:f:root:-:644
335
+$html_directory/IPV6_README.html:f:root:-:644
336
+$html_directory/LDAP_README.html:f:root:-:644
337
+$html_directory/LINUX_README.html:f:root:-:644
338
+$html_directory/LMDB_README.html:f:root:-:644
339
+$html_directory/LOCAL_RECIPIENT_README.html:f:root:-:644
340
+$html_directory/MAILDROP_README.html:f:root:-:644
341
+$html_directory/MILTER_README.html:f:root:-:644
342
+$html_directory/MULTI_INSTANCE_README.html:f:root:-:644
343
+$html_directory/MYSQL_README.html:f:root:-:644
344
+$html_directory/SQLITE_README.html:f:root:-:644
345
+$html_directory/NFS_README.html:f:root:-:644
346
+$html_directory/OVERVIEW.html:f:root:-:644
347
+$html_directory/PACKAGE_README.html:f:root:-:644
348
+$html_directory/PCRE_README.html:f:root:-:644
349
+$html_directory/PGSQL_README.html:f:root:-:644
350
+$html_directory/POSTSCREEN_README.html:f:root:-:644
351
+$html_directory/QMQP_README.html:f:root:-:644:o
352
+$html_directory/QSHAPE_README.html:f:root:-:644
353
+$html_directory/RESTRICTION_CLASS_README.html:f:root:-:644
354
+$html_directory/SASL_README.html:f:root:-:644
355
+$html_directory/SCHEDULER_README.html:f:root:-:644
356
+$html_directory/SMTPD_ACCESS_README.html:f:root:-:644
357
+$html_directory/SMTPD_POLICY_README.html:f:root:-:644
358
+$html_directory/SMTPD_PROXY_README.html:f:root:-:644
359
+$html_directory/SOHO_README.html:f:root:-:644
360
+$html_directory/STANDARD_CONFIGURATION_README.html:f:root:-:644
361
+$html_directory/STRESS_README.html:f:root:-:644
362
+$html_directory/TLS_LEGACY_README.html:f:root:-:644
363
+$html_directory/TLS_README.html:f:root:-:644
364
+$html_directory/TUNING_README.html:f:root:-:644
365
+$html_directory/ULTRIX_README.html:f:root:-:644:o
366
+$html_directory/UUCP_README.html:f:root:-:644
367
+$html_directory/VERP_README.html:f:root:-:644
368
+$html_directory/VIRTUAL_README.html:f:root:-:644
369
+$html_directory/XCLIENT_README.html:f:root:-:644
370
+$html_directory/XFORWARD_README.html:f:root:-:644
371
+$html_directory/access.5.html:f:root:-:644
372
+$html_directory/aliases.5.html:f:root:-:644
373
+$html_directory/anvil.8.html:f:root:-:644
374
+$html_directory/bounce.8.html:f:root:-:644
375
+$html_directory/canonical.5.html:f:root:-:644
376
+$html_directory/cidr_table.5.html:f:root:-:644
377
+$html_directory/cleanup.8.html:f:root:-:644
378
+$html_directory/defer.8.html:h:$html_directory/bounce.8.html:-:644
379
+$html_directory/discard.8.html:f:root:-:644
380
+$html_directory/dnsblog.8.html:f:root:-:644
381
+$html_directory/error.8.html:f:root:-:644
382
+$html_directory/flush.8.html:f:root:-:644
383
+$html_directory/generics.5.html:f:root:-:644:o
384
+$html_directory/generic.5.html:f:root:-:644
385
+$html_directory/header_checks.5.html:f:root:-:644
386
+$html_directory/index.html:f:root:-:644
387
+$html_directory/ldap_table.5.html:f:root:-:644
388
+$html_directory/lmtp.8.html:f:root:-:644
389
+$html_directory/local.8.html:f:root:-:644
390
+$html_directory/mailq.1.html:f:root:-:644
391
+$html_directory/master.5.html:f:root:-:644
392
+$html_directory/master.8.html:f:root:-:644
393
+$html_directory/memcache_table.5.html:f:root:-:644
394
+$html_directory/mysql_table.5.html:f:root:-:644
395
+$html_directory/sqlite_table.5.html:f:root:-:644
396
+$html_directory/nisplus_table.5.html:f:root:-:644
397
+$html_directory/newaliases.1.html:h:$html_directory/mailq.1.html:-:644
398
+$html_directory/oqmgr.8.html:f:root:-:644
399
+$html_directory/pcre_table.5.html:f:root:-:644
400
+$html_directory/pgsql_table.5.html:f:root:-:644
401
+$html_directory/pickup.8.html:f:root:-:644
402
+$html_directory/pipe.8.html:f:root:-:644
403
+$html_directory/postalias.1.html:f:root:-:644
404
+$html_directory/postcat.1.html:f:root:-:644
405
+$html_directory/postconf.1.html:f:root:-:644
406
+$html_directory/postconf.5.html:f:root:-:644
407
+$html_directory/postdrop.1.html:f:root:-:644
408
+$html_directory/postfix-logo.jpg:f:root:-:644
409
+$html_directory/postfix-manuals.html:f:root:-:644
410
+$html_directory/postfix-wrapper.5.html:f:root:-:644
411
+$html_directory/postfix.1.html:f:root:-:644
412
+$html_directory/postkick.1.html:f:root:-:644
413
+$html_directory/postlock.1.html:f:root:-:644
414
+$html_directory/postlog.1.html:f:root:-:644
415
+$html_directory/postmap.1.html:f:root:-:644
416
+$html_directory/postmulti.1.html:f:root:-:644
417
+$html_directory/postqueue.1.html:f:root:-:644
418
+$html_directory/postscreen.8.html:f:root:-:644
419
+$html_directory/postsuper.1.html:f:root:-:644
420
+$html_directory/qshape.1.html:f:root:-:644
421
+$html_directory/proxymap.8.html:f:root:-:644
422
+$html_directory/qmgr.8.html:f:root:-:644
423
+$html_directory/qmqp-sink.1.html:f:root:-:644
424
+$html_directory/qmqp-source.1.html:f:root:-:644
425
+$html_directory/qmqpd.8.html:f:root:-:644
426
+$html_directory/regexp_table.5.html:f:root:-:644
427
+$html_directory/relocated.5.html:f:root:-:644
428
+$html_directory/sendmail.1.html:h:$html_directory/mailq.1.html:-:644
429
+$html_directory/showq.8.html:f:root:-:644
430
+$html_directory/smtp-sink.1.html:f:root:-:644
431
+$html_directory/smtp-source.1.html:f:root:-:644
432
+$html_directory/smtp.8.html:h:$html_directory/lmtp.8.html:-:644
433
+$html_directory/smtpd.8.html:f:root:-:644
434
+$html_directory/spawn.8.html:f:root:-:644
435
+$html_directory/tlsproxy.8.html:f:root:-:644
436
+$html_directory/tcp_table.5.html:f:root:-:644
437
+$html_directory/trace.8.html:h:$html_directory/bounce.8.html:-:644
438
+$html_directory/transport.5.html:f:root:-:644
439
+$html_directory/trivial-rewrite.8.html:f:root:-:644
440
+$html_directory/verify.8.html:f:root:-:644
441
+$html_directory/virtual.5.html:f:root:-:644
442
+$html_directory/virtual.8.html:f:root:-:644

+ 380
- 0
postfix/config/postfix-script Datei anzeigen

@@ -0,0 +1,380 @@
1
+#!/bin/sh
2
+
3
+#++
4
+# NAME
5
+#	postfix-script 1
6
+# SUMMARY
7
+#	execute Postfix administrative commands
8
+# SYNOPSIS
9
+#	\fBpostfix-script\fR \fIcommand\fR
10
+# DESCRIPTION
11
+#	The \fBpostfix-script\fR script executes Postfix administrative
12
+#	commands in an environment that is set up by the \fBpostfix\fR(1)
13
+#	command.
14
+# SEE ALSO
15
+#	master(8) Postfix master program
16
+#	postfix(1) Postfix administrative interface
17
+# LICENSE
18
+# .ad
19
+# .fi
20
+#	The Secure Mailer license must be distributed with this software.
21
+# AUTHOR(S)
22
+#	Wietse Venema
23
+#	IBM T.J. Watson Research
24
+#	P.O. Box 704
25
+#	Yorktown Heights, NY 10598, USA
26
+#--
27
+
28
+# Avoid POSIX death due to SIGHUP when some parent process exits.
29
+
30
+trap '' 1
31
+
32
+case $daemon_directory in
33
+"") echo This script must be run by the postfix command. 1>&2
34
+    echo Do not run directly. 1>&2
35
+    exit 1
36
+esac
37
+
38
+LOGGER="$command_directory/postlog -t $MAIL_LOGTAG/postfix-script"
39
+INFO="$LOGGER -p info"
40
+WARN="$LOGGER -p warn"
41
+ERROR="$LOGGER -p error"
42
+FATAL="$LOGGER -p fatal"
43
+PANIC="$LOGGER -p panic"
44
+
45
+if [ "X${1#quiet-}" != "X${1}" ]; then
46
+    INFO=:
47
+    x=${1#quiet-}
48
+    shift
49
+    set -- $x "$@"
50
+fi
51
+
52
+umask 022
53
+SHELL=/bin/sh
54
+
55
+#
56
+# Can't do much without these in place.
57
+#
58
+cd $command_directory || {
59
+	$FATAL no Postfix command directory $command_directory!
60
+	exit 1
61
+}
62
+cd $daemon_directory || {
63
+	$FATAL no Postfix daemon directory $daemon_directory!
64
+	exit 1
65
+}
66
+test -f master || {
67
+	$FATAL no Postfix master program $daemon_directory/master!
68
+	exit 1
69
+}
70
+cd $config_directory || {
71
+	$FATAL no Postfix configuration directory $config_directory!
72
+	exit 1
73
+}
74
+cd $queue_directory || {
75
+	$FATAL no Postfix queue directory $queue_directory!
76
+	exit 1
77
+}
78
+def_config_directory=`$command_directory/postconf -dh config_directory` || {
79
+	$FATAL cannot execute $command_directory/postconf!
80
+	exit 1
81
+}
82
+
83
+# If this is a secondary instance, don't touch shared files.
84
+
85
+instances=`test ! -f $def_config_directory/main.cf ||
86
+    $command_directory/postconf -c $def_config_directory \
87
+    -h multi_instance_directories | sed 's/,/ /'` || {
88
+	$FATAL cannot execute $command_directory/postconf!
89
+	exit 1
90
+}
91
+
92
+check_shared_files=1
93
+for name in $instances
94
+do
95
+    case "$name" in
96
+    "$def_config_directory") ;;
97
+    "$config_directory") check_shared_files=; break;;
98
+    esac
99
+done
100
+
101
+#
102
+# Parse JCL
103
+#
104
+case $1 in
105
+
106
+start_msg)
107
+
108
+	echo "Start postfix"
109
+	;;
110
+
111
+stop_msg)
112
+
113
+	echo "Stop postfix"
114
+	;;
115
+
116
+quick-start)
117
+
118
+	$daemon_directory/master -t 2>/dev/null || {
119
+		$FATAL the Postfix mail system is already running
120
+		exit 1
121
+	}
122
+	$daemon_directory/postfix-script quick-check || {
123
+		$FATAL Postfix integrity check failed!
124
+		exit 1
125
+	}
126
+	$INFO starting the Postfix mail system
127
+	$daemon_directory/master &
128
+	;;
129
+
130
+start)
131
+
132
+	$daemon_directory/master -t 2>/dev/null || {
133
+		$FATAL the Postfix mail system is already running
134
+		exit 1
135
+	}
136
+	if [ -f $queue_directory/quick-start ]
137
+	then
138
+		rm -f $queue_directory/quick-start
139
+	else
140
+		$daemon_directory/postfix-script check-fatal || {
141
+			$FATAL Postfix integrity check failed!
142
+			exit 1
143
+		}
144
+		# Foreground this so it can be stopped. All inodes are cached.
145
+		$daemon_directory/postfix-script check-warn
146
+	fi
147
+	$INFO starting the Postfix mail system
148
+	# NOTE: wait in foreground process to get the initialization status.
149
+	$daemon_directory/master -w || {
150
+	    $FATAL "mail system startup failed"
151
+	    exit 1
152
+	}
153
+	;;
154
+
155
+drain)
156
+
157
+	$daemon_directory/master -t 2>/dev/null && {
158
+		$FATAL the Postfix mail system is not running
159
+		exit 1
160
+	}
161
+	$INFO stopping the Postfix mail system
162
+	kill -9 `sed 1q pid/master.pid`
163
+	;;
164
+
165
+quick-stop)
166
+
167
+	$daemon_directory/postfix-script stop
168
+	touch $queue_directory/quick-start
169
+	;;
170
+
171
+stop)
172
+
173
+	$daemon_directory/master -t 2>/dev/null && {
174
+		$FATAL the Postfix mail system is not running
175
+		exit 0
176
+	}
177
+	$INFO stopping the Postfix mail system
178
+	kill `sed 1q pid/master.pid`
179
+	for i in 5 4 3 2 1
180
+	do
181
+	    $daemon_directory/master -t && exit 0
182
+	    $INFO waiting for the Postfix mail system to terminate
183
+	    sleep 1
184
+	done
185
+	$WARN stopping the Postfix mail system with force
186
+	pid=`awk '{ print $1; exit 0 } END { exit 1 }' pid/master.pid` && 
187
+		kill -9 -$pid
188
+	;;
189
+
190
+abort)
191
+
192
+	$daemon_directory/master -t 2>/dev/null && {
193
+		$FATAL the Postfix mail system is not running
194
+		exit 0
195
+	}
196
+	$INFO aborting the Postfix mail system
197
+	kill `sed 1q pid/master.pid`
198
+	;;
199
+
200
+reload)
201
+
202
+	$daemon_directory/master -t 2>/dev/null && {
203
+		$FATAL the Postfix mail system is not running
204
+		exit 1
205
+	}
206
+	$INFO refreshing the Postfix mail system
207
+	$command_directory/postsuper active || exit 1
208
+	kill -HUP `sed 1q pid/master.pid`
209
+	$command_directory/postsuper &
210
+	;;
211
+
212
+flush)
213
+
214
+	cd $queue_directory || {
215
+		$FATAL no Postfix queue directory $queue_directory!
216
+		exit 1
217
+	}
218
+	$command_directory/postqueue -f
219
+	;;
220
+
221
+check)
222
+
223
+	$daemon_directory/postfix-script check-fatal || exit 1
224
+	$daemon_directory/postfix-script check-warn
225
+	exit 0
226
+	;;
227
+
228
+status)
229
+
230
+	$daemon_directory/master -t 2>/dev/null && {
231
+		$INFO the Postfix mail system is not running
232
+		exit 1
233
+	}
234
+	$INFO the Postfix mail system is running: PID: `sed 1q pid/master.pid`
235
+	exit 0
236
+	;;
237
+
238
+quick-check)
239
+	# This command is NOT part of the public interface.
240
+
241
+	$SHELL $daemon_directory/post-install create-missing || {
242
+		$WARN unable to create missing queue directories
243
+		exit 1
244
+	}
245
+
246
+	# Look for incomplete installations.
247
+
248
+	test -f $config_directory/master.cf || {
249
+		$FATAL no $config_directory/master.cf file found
250
+		exit 1
251
+	}
252
+	exit 0
253
+	;;
254
+
255
+check-fatal)
256
+	# This command is NOT part of the public interface.
257
+
258
+	$daemon_directory/postfix-script quick-check
259
+
260
+	# See if all queue files are in the right place. This is slow.
261
+	# We must scan all queues for mis-named queue files before the
262
+	# mail system can run.
263
+
264
+	$command_directory/postsuper || exit 1
265
+	exit 0
266
+	;;
267
+
268
+check-warn)
269
+	# This command is NOT part of the public interface.
270
+
271
+	todo="$config_directory $queue_directory $queue_directory/pid"
272
+	test -n "$check_shared_files" && todo="$daemon_directory $todo"
273
+
274
+	for dir in $todo
275
+	do
276
+		ls -lLd $dir | (grep " root " >/dev/null ||
277
+		    $WARN not owned by root: $dir)
278
+	done
279
+
280
+	# Some people break Postfix's security model.
281
+	ls -lLd $queue_directory | egrep '^.....(w|...w)' >/dev/null && \
282
+		$WARN group or other writable: $queue_directory
283
+
284
+	todo="$config_directory/*"
285
+	test -n "$check_shared_files" && todo="$daemon_directory/* $todo"
286
+
287
+	find $todo ! -user root \
288
+		-exec $WARN not owned by root: {} \;
289
+
290
+	todo="$config_directory/."
291
+	test -n "$check_shared_files" && todo="$daemon_directory/. $todo"
292
+
293
+	find $todo \
294
+		\( -perm -020 -o -perm -002 \) -type f \
295
+		-exec $WARN group or other writable: {} \;
296
+
297
+	find $data_directory/. ! -user $mail_owner \
298
+	    -exec $WARN not owned by $mail_owner: {} \;
299
+
300
+	ls -lLd $data_directory | egrep '^.....(w|...w)' >/dev/null && \
301
+		$WARN group or other writable: $data_directory
302
+
303
+	find `ls -d $queue_directory/* | \
304
+	    egrep '/(saved|incoming|active|defer|deferred|bounce|hold|trace|corrupt|public|private|flush)$'` \
305
+	    ! \( -type p -o -type s \) ! -user $mail_owner \
306
+		-exec $WARN not owned by $mail_owner: {} \;
307
+
308
+	todo="$queue_directory/public $queue_directory/maildrop"
309
+	test -n "$check_shared_files" && 
310
+	   todo="$command_directory/postqueue $command_directory/postdrop $todo"
311
+
312
+	find $todo \
313
+	    -prune ! -group $setgid_group \
314
+	    -exec $WARN not owned by group $setgid_group: {} \;
315
+
316
+	test -n "$check_shared_files" &&
317
+	find $command_directory/postqueue $command_directory/postdrop \
318
+	    -prune ! -perm -02111 \
319
+	    -exec $WARN not set-gid or not owner+group+world executable: {} \;
320
+
321
+	for name in `ls -d $queue_directory/* | \
322
+	    egrep '/(bin|etc|lib|usr)$'` ; \
323
+	do \
324
+	    find $name ! -user root \
325
+		-exec $WARN not owned by root: {} \; ; \
326
+	done
327
+
328
+	# WARNING: this should not descend into the maildrop directory.
329
+	# maildrop is the least trusted Postfix directory.
330
+
331
+	find $queue_directory/maildrop/. -prune ! -user $mail_owner \
332
+	    -exec $WARN not owned by $mail_owner: $queue_directory/maildrop \;
333
+
334
+	for dir in bin etc lib sbin usr
335
+	do
336
+		test -d $dir && find $dir -type f -print | while read path
337
+		do
338
+			test -f /$path && {
339
+			    cmp -s $path /$path || 
340
+				$WARN $queue_directory/$path and /$path differ
341
+			}
342
+		done
343
+	done
344
+
345
+	find corrupt -type f -exec $WARN damaged message: {} \;
346
+
347
+	# XXX also: look for weird stuff, weird permissions, etc.
348
+
349
+	test -n "$check_shared_files" -a -f /usr/sbin/sendmail -a \
350
+		-f /usr/lib/sendmail && {
351
+	    cmp -s /usr/sbin/sendmail /usr/lib/sendmail || {
352
+		$WARN /usr/lib/sendmail and /usr/sbin/sendmail differ
353
+		$WARN Replace one by a symbolic link to the other
354
+	    }
355
+	}
356
+	exit 0
357
+	;;
358
+
359
+set-permissions|upgrade-configuration)
360
+	$daemon_directory/post-install create-missing "$@"
361
+	;;
362
+
363
+post-install)
364
+	# Currently not part of the public interface.
365
+	shift
366
+	$daemon_directory/post-install "$@"
367
+	;;
368
+
369
+/*)
370
+	# Currently not part of the public interface.
371
+	"$@"
372
+	;;
373
+
374
+*)
375
+	$ERROR "unknown command: '$1'"
376
+	$FATAL "usage: postfix start (or stop, reload, abort, flush, check, status, set-permissions, upgrade-configuration)"
377
+	exit 1
378
+	;;
379
+
380
+esac

+ 2
- 0
postfix/config/sasl/smtpd.conf Datei anzeigen

@@ -0,0 +1,2 @@
1
+pwcheck_method: saslauthd
2
+mech_list: plain login cram-md5 digest-md5

+ 16
- 0
postfix/run.sh Datei anzeigen

@@ -0,0 +1,16 @@
1
+#! /usr/bin/env sh
2
+
3
+sed -e "s/hosts *=.*/hosts = ${POSTGRES_HOST}/g" -i /etc/postfix/pgsql_*
4
+sed -e "s/user *=.*/user = ${POSTGRES_USER}/g" -i /etc/postfix/pgsql_*
5
+sed -e "s/password *=.*/password = ${POSTGRES_PASSWORD}/g" -i /etc/postfix/pgsql_*
6
+sed -e "s/dbname *=.*/dbname = ${POSTGRES_DB}/g" -i /etc/postfix/pgsql_*
7
+
8
+postconf -e mydomain="${MAIL_DOMAIN}"
9
+postconf -e myhostname="${MAIL_HOSTNAME}"
10
+
11
+service rsyslog start
12
+service postfix start
13
+
14
+sleep 3
15
+
16
+tail -f /var/log/mail.info

+ 1
- 1
postfixadmin/Dockerfile Datei anzeigen

@@ -15,7 +15,7 @@ RUN apt-get update && apt-get -y install\
15 15
         php5-gd\
16 16
         php5-curl\
17 17
         php5-imap &&\
18
-        apt-get clean &&\
18
+        apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* &&\
19 19
         /usr/sbin/a2enmod rewrite &&\
20 20
         rm -rf /var/www/html &&\
21 21
         mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html &&\

+ 4
- 4
postfixadmin/postfixadmin-3.0/config.inc.php Datei anzeigen

@@ -82,10 +82,10 @@ function language_hook($PALANG, $language) {
82 82
 // pgsql = PostgreSQL
83 83
 // sqlite = SQLite 3
84 84
 $CONF['database_type'] = 'pgsql';
85
-$CONF['database_host'] = getenv('DB_HOST');
86
-$CONF['database_user'] = getenv('DB_USER');
87
-$CONF['database_password'] = getenv('DB_PASSWORD');
88
-$CONF['database_name'] = getenv('DB_DB');
85
+$CONF['database_host'] = getenv('POSTGRES_HOST');
86
+$CONF['database_user'] = getenv('POSTGRES_USER');
87
+$CONF['database_password'] = getenv('POSTGRES_PASSWORD');
88
+$CONF['database_name'] = getenv('POSTGRES_DB');
89 89
 // If you need to specify a different port for a MYSQL database connection, use e.g.
90 90
 //   $CONF['database_host'] = '172.30.33.66:3308';
91 91
 // If you need to specify a different port for POSTGRESQL database connection

+ 45
- 0
postgresql/docker-entrypoint-initdb.d/01_init.sql Datei anzeigen

@@ -771,6 +771,51 @@ ALTER TABLE ONLY vacation
771 771
 ALTER TABLE ONLY vacation_notification
772 772
     ADD CONSTRAINT vacation_notification_on_vacation_fkey FOREIGN KEY (on_vacation) REFERENCES vacation(email) ON DELETE CASCADE;
773 773
 
774
+--
775
+-- Name: transport; Type: TABLE; Schema: public; Owner: postfixadmin; Tablespace: 
776
+--
777
+
778
+CREATE TABLE transport (
779
+    domain character varying(128) NOT NULL,
780
+    transport character varying(128) NOT NULL
781
+);
782
+
783
+
784
+ALTER TABLE transport OWNER TO postfixadmin;
785
+
786
+--
787
+-- Name: transport_pkey; Type: CONSTRAINT; Schema: public; Owner: postfixadmin; Tablespace: 
788
+--
789
+
790
+ALTER TABLE ONLY transport
791
+    ADD CONSTRAINT transport_pkey PRIMARY KEY (domain);
792
+
793
+
794
+
795
+
796
+
797
+
798
+--
799
+-- Name: recipient_bcc; Type: TABLE; Schema: public; Owner: postfixadmin; Tablespace: 
800
+--
801
+
802
+CREATE TABLE recipient_bcc (
803
+    recipient character varying(128) NOT NULL,
804
+    bcc character varying(128) NOT NULL
805
+);
806
+
807
+
808
+ALTER TABLE recipient_bcc OWNER TO postfixadmin;
809
+
810
+--
811
+-- Name: recipient_bcc_pkey; Type: CONSTRAINT; Schema: public; Owner: postfixadmin; Tablespace: 
812
+--
813
+
814
+ALTER TABLE ONLY recipient_bcc
815
+    ADD CONSTRAINT recipient_bcc_pkey PRIMARY KEY (recipient);
816
+
817
+
818
+
774 819
 
775 820
 --
776 821
 -- PostgreSQL database dump complete

Laden…
Abbrechen
Speichern