diff options
author | clarkzjw <[email protected]> | 2023-02-08 00:40:09 -0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2023-02-08 00:40:09 -0800 |
commit | 1204730924436ef9e1c7c49c9557837f9a5ed0e8 (patch) | |
tree | 129d79dfd11245751cee6d4082ff5d2f6e941610 /ansible/roles/postfix/files | |
parent | 9635ac4dedf69de5bff65785bcc16bef80b52d75 (diff) | |
download | mail-master.tar.gz |
Diffstat (limited to 'ansible/roles/postfix/files')
-rw-r--r-- | ansible/roles/postfix/files/postfix/master.cf | 113 | ||||
-rwxr-xr-x | ansible/roles/postfix/files/postfix/remap.sh | 9 |
2 files changed, 122 insertions, 0 deletions
diff --git a/ansible/roles/postfix/files/postfix/master.cf b/ansible/roles/postfix/files/postfix/master.cf new file mode 100644 index 0000000..d428c18 --- /dev/null +++ b/ansible/roles/postfix/files/postfix/master.cf | |||
@@ -0,0 +1,113 @@ | |||
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" or | ||
4 | # on-line: http://www.postfix.org/master.5.html). | ||
5 | # | ||
6 | # Do not forget to execute "postfix reload" after editing this file. | ||
7 | # | ||
8 | # ========================================================================== | ||
9 | # service type private unpriv chroot wakeup maxproc command + args | ||
10 | # (yes) (yes) (no) (never) (100) | ||
11 | # ========================================================================== | ||
12 | smtp inet n - y - - smtpd | ||
13 | -o smtpd_sasl_auth_enable=no | ||
14 | # for verbose connection debugging, append -v to the above args | ||
15 | #smtp inet n - y - 1 postscreen | ||
16 | #smtpd pass - - y - - smtpd | ||
17 | #dnsblog unix - - y - 0 dnsblog | ||
18 | #tlsproxy unix - - y - 0 tlsproxy | ||
19 | submission inet n - n - - smtpd | ||
20 | -o smtpd_tls_security_level=encrypt | ||
21 | -o tls_preempt_cipherlist=yes | ||
22 | #submission inet n - y - - smtpd | ||
23 | # -o syslog_name=postfix/submission | ||
24 | # -o smtpd_tls_security_level=encrypt | ||
25 | # -o smtpd_sasl_auth_enable=yes | ||
26 | # -o smtpd_tls_auth_only=yes | ||
27 | # -o smtpd_reject_unlisted_recipient=no | ||
28 | # -o smtpd_client_restrictions=$mua_client_restrictions | ||
29 | # -o smtpd_helo_restrictions=$mua_helo_restrictions | ||
30 | # -o smtpd_sender_restrictions=$mua_sender_restrictions | ||
31 | # -o smtpd_recipient_restrictions= | ||
32 | # -o smtpd_relay_restrictions=permit_sasl_authenticated,reject | ||
33 | # -o milter_macro_daemon_name=ORIGINATING | ||
34 | #smtps inet n - y - - smtpd | ||
35 | # -o syslog_name=postfix/smtps | ||
36 | # -o smtpd_tls_wrappermode=yes | ||
37 | # -o smtpd_sasl_auth_enable=yes | ||
38 | # -o smtpd_reject_unlisted_recipient=no | ||
39 | # -o smtpd_client_restrictions=$mua_client_restrictions | ||
40 | # -o smtpd_helo_restrictions=$mua_helo_restrictions | ||
41 | # -o smtpd_sender_restrictions=$mua_sender_restrictions | ||
42 | # -o smtpd_recipient_restrictions= | ||
43 | # -o smtpd_relay_restrictions=permit_sasl_authenticated,reject | ||
44 | # -o milter_macro_daemon_name=ORIGINATING | ||
45 | #628 inet n - y - - qmqpd | ||
46 | pickup unix n - y 60 1 pickup | ||
47 | cleanup unix n - y - 0 cleanup | ||
48 | qmgr unix n - n 300 1 qmgr | ||
49 | #qmgr unix n - n 300 1 oqmgr | ||
50 | tlsmgr unix - - y 1000? 1 tlsmgr | ||
51 | rewrite unix - - y - - trivial-rewrite | ||
52 | bounce unix - - y - 0 bounce | ||
53 | defer unix - - y - 0 bounce | ||
54 | trace unix - - y - 0 bounce | ||
55 | verify unix - - y - 1 verify | ||
56 | flush unix n - y 1000? 0 flush | ||
57 | proxymap unix - - n - - proxymap | ||
58 | proxywrite unix - - n - 1 proxymap | ||
59 | smtp unix - - y - - smtp | ||
60 | relay unix - - y - - smtp | ||
61 | -o syslog_name=postfix/$service_name | ||
62 | # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 | ||
63 | showq unix n - y - - showq | ||
64 | error unix - - y - - error | ||
65 | retry unix - - y - - error | ||
66 | discard unix - - y - - discard | ||
67 | local unix - n n - - local | ||
68 | virtual unix - n n - - virtual | ||
69 | lmtp unix - - y - - lmtp | ||
70 | anvil unix - - y - 1 anvil | ||
71 | scache unix - - y - 1 scache | ||
72 | # | ||
73 | # ==================================================================== | ||
74 | # Interfaces to non-Postfix software. Be sure to examine the manual | ||
75 | # pages of the non-Postfix software to find out what options it wants. | ||
76 | # | ||
77 | # Many of the following services use the Postfix pipe(8) delivery | ||
78 | # agent. See the pipe(8) man page for information about ${recipient} | ||
79 | # and other message envelope options. | ||
80 | # ==================================================================== | ||
81 | # | ||
82 | # maildrop. See the Postfix MAILDROP_README file for details. | ||
83 | # Also specify in main.cf: maildrop_destination_recipient_limit=1 | ||
84 | # | ||
85 | maildrop unix - n n - - pipe | ||
86 | flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient} | ||
87 | # | ||
88 | # ==================================================================== | ||
89 | # | ||
90 | # Recent Cyrus versions can use the existing "lmtp" master.cf entry. | ||
91 | # | ||
92 | # Specify in cyrus.conf: | ||
93 | # lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4 | ||
94 | # | ||
95 | # Specify in main.cf one or more of the following: | ||
96 | # mailbox_transport = lmtp:inet:localhost | ||
97 | # virtual_transport = lmtp:inet:localhost | ||
98 | # | ||
99 | # ==================================================================== | ||
100 | # | ||
101 | # Cyrus 2.1.5 (Amos Gouaux) | ||
102 | # Also specify in main.cf: cyrus_destination_recipient_limit=1 | ||
103 | # | ||
104 | #cyrus unix - n n - - pipe | ||
105 | # user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user} | ||
106 | # | ||
107 | # ==================================================================== | ||
108 | # Old example of delivery via Cyrus. | ||
109 | # | ||
110 | #old-cyrus unix - n n - - pipe | ||
111 | # flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user} | ||
112 | # | ||
113 | # ==================================================================== | ||
diff --git a/ansible/roles/postfix/files/postfix/remap.sh b/ansible/roles/postfix/files/postfix/remap.sh new file mode 100755 index 0000000..86e8d73 --- /dev/null +++ b/ansible/roles/postfix/files/postfix/remap.sh | |||
@@ -0,0 +1,9 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
3 | here=$(dirname $0) | ||
4 | |||
5 | MAPS="virtual" | ||
6 | |||
7 | for map in $MAPS; do | ||
8 | postmap $here/$map | ||
9 | done | ||