Skip to content

Commit bb19543

Browse files
committed
Merge branch 'feature/custom-domains-dms' into staging
2 parents 4c3a3ec + d6ed788 commit bb19543

3 files changed

Lines changed: 15 additions & 13 deletions

File tree

mailserver/config/postfix-main.cf.sample

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ milter_protocol = 6
1010
smtpd_milters = $rspamd_milter
1111
non_smtpd_milters = $rspamd_milter
1212

13+
mydestination = $myhostname, localhost
14+
local_recipient_maps =
15+
receive_override_options = no_address_mappings
16+
smtpd_policy_service_timeout = 10s
17+
18+
smtpd_recipient_restrictions =
19+
permit_mynetworks,
20+
permit_sasl_authenticated,
21+
check_policy_service inet:daemon:10025,
22+
reject_unauth_destination
23+
1324
smtpd_sender_restrictions =
1425
permit_mynetworks,
1526
permit_sasl_authenticated,
@@ -22,7 +33,7 @@ smtpd_sender_restrictions =
2233
reject_unauth_pipelining
2334

2435
smtpd_relay_restrictions =
25-
permit_mynetworks,
36+
permit_mynetworks,
2637
permit_sasl_authenticated,
2738
reject_unauth_destination
2839

@@ -32,11 +43,3 @@ smtpd_helo_restrictions =
3243
reject_invalid_helo_hostname
3344
reject_non_fqdn_helo_hostname
3445
reject_unknown_helo_hostname
35-
36-
mydestination = $myhostname, localhost
37-
transport_maps = regexp:/tmp/docker-mailserver/postfix-transport.cf
38-
smtpd_recipient_restrictions =
39-
permit_mynetworks,
40-
permit_sasl_authenticated,
41-
check_policy_service inet:daemon:10025,
42-
reject_unauth_destination

mailserver/config/postfix-transport.cf.sample

Lines changed: 0 additions & 1 deletion
This file was deleted.

mailserver/daemon/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,14 @@ func handle(conn net.Conn) {
121121

122122
// Skip check for local domains
123123
if localDomains[domain] {
124-
fmt.Fprintf(conn, "action=FILTER curl_email:\n\n")
124+
fmt.Fprintf(conn, "action=OK FILTER curl_email\n\n")
125125
return
126126
}
127127

128128
// Check cache
129129
if valid, found := checkCache(domain); found {
130130
if valid {
131-
fmt.Fprintf(conn, "action=FILTER curl_email:\n\n")
131+
fmt.Fprintf(conn, "action=OK FILTER curl_email\n\n")
132132
} else {
133133
fmt.Fprintf(conn, "action=REJECT domain not configured\n\n")
134134
}
@@ -140,7 +140,7 @@ func handle(conn net.Conn) {
140140
storeCache(domain, valid)
141141

142142
if valid {
143-
fmt.Fprintf(conn, "action=FILTER curl_email:\n\n")
143+
fmt.Fprintf(conn, "action=OK FILTER curl_email\n\n")
144144
} else {
145145
fmt.Fprintf(conn, "action=REJECT domain not configured\n\n")
146146
}

0 commit comments

Comments
 (0)