forked from postfixadmin/postfixadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBACKUP_MX.txt
39 lines (30 loc) · 1.21 KB
/
BACKUP_MX.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#
# Postfix Admin
# by Mischa Peters <mischa at high5 dot net>
# Copyright (c) 2002 - 2005 High5!
# Licensed under GPL for more info check GPL-LICENSE.TXT
#
Please follow these steps if your mailserver is used as a backup MX for some
(or all) of your domains.
Note: The setup described in this file only checks the domain, not the full
mail address.
You should use "reject_unverified_recipient" in your postfix config or setup
"relay_recipient_maps" with a list of valid mail adresses on the primary mx
to avoid that your backup MX accepts mails for non-existing recipient adresses.
Without this, your backup MX might become a backscatter source.
1. Modify main.cf
-----------------
In order for Postfix to use MySQL for relay_domains add the following
to your main.cf
relay_domains = proxy:mysql:/usr/local/etc/postfix/mysql_relay_domains_maps.cf
2. mysql_relay_domains_maps.cf
------------------------------
You will need to put this into a text file for postfix to pickup.
user = postfix
password = password
hosts = localhost
dbname = postfix
query = SELECT domain FROM domain WHERE domain = '%s' AND backupmx = '1'
3. Restart Postfix
-------------------
When you are done make sure to restart Postfix so the changes take effect.