[vhffs-dev] [1250] Added files for splitted exim mx2 conf |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 1250
Author: beuss
Date: 2008-09-08 16:49:29 +0200 (Mon, 08 Sep 2008)
Log Message:
-----------
Added files for splitted exim mx2 conf
Added Paths:
-----------
trunk/vhffs-doc/config/exim4-mx2/00_vhffs
trunk/vhffs-doc/config/exim4-mx2/splitted-conf.patch
Added: trunk/vhffs-doc/config/exim4-mx2/00_vhffs
===================================================================
--- trunk/vhffs-doc/config/exim4-mx2/00_vhffs (rev 0)
+++ trunk/vhffs-doc/config/exim4-mx2/00_vhffs 2008-09-08 14:49:29 UTC (rev 1250)
@@ -0,0 +1,12 @@
+hide pgsql_servers = 127.0.0.1/vhffs/exim/astrongpass
+
+# Domains to be relayed
+VHFFS_RELAY_DOMAINS = ${lookup pgsql{SELECT domain FROM vhffs_mxdomain WHERE domain = '${quote_pgsql:$domain}'}}
+
+# Checks localparts (to avoid forwarding mail to non-existent boxes).
+VHFFS_VALID_LOCALPARTS = ${lookup pgsql{SELECT d.domain FROM vhffs_mxdomain d WHERE d.domain = '${quote_pgsql:$domain}' AND (d.catchall != '' OR EXISTS (SELECT domain FROM vhffs_boxes WHERE domain = '${quote_pgsql:$domain}' AND local_part = '${quote_pgsql:$local_part}' AND state = 6) OR EXISTS (SELECT domain FROM vhffs_forward WHERE domain = '${quote_pgsql:$domain}' AND local_part = '${quote_pgsql:$local_part}') OR EXISTS (SELECT domain FROM vhffs_ml WHERE domain = '${quote_pgsql:$domain}' AND (local_part = '${quote_pgsql:$local_part}' OR local_part || '-request' = '${quote_pgsql:$local_part}')))}}
+
+# Self explanatory. We only accept to relay on this address.
+MX1_IP_ADDRESS=123.45.67.89
+
+domainlist vhffs_domains=VHFFS_RELAY_DOMAINS
Added: trunk/vhffs-doc/config/exim4-mx2/splitted-conf.patch
===================================================================
--- trunk/vhffs-doc/config/exim4-mx2/splitted-conf.patch (rev 0)
+++ trunk/vhffs-doc/config/exim4-mx2/splitted-conf.patch 2008-09-08 14:49:29 UTC (rev 1250)
@@ -0,0 +1,40 @@
+--- 200_exim4-config_primary 2008-09-08 15:31:40.000000000 +0200
++++ 200_exim4-config_primary 2008-09-08 16:04:40.000000000 +0200
+@@ -29,7 +25,7 @@
+ dnslookup:
+ debug_print = "R: dnslookup for $local_part@$domain"
+ driver = dnslookup
+- domains = ! +local_domains
++ domains = ! +local_domains : !+vhffs_domains
+ transport = remote_smtp
+ same_domain_copy_routing = yes
+ # ignore private rfc1918 and APIPA addresses
+@@ -38,6 +34,17 @@
+ 255.255.255.255
+ no_more
+
++# VHFFS boxes routers. We only accept to relay on our MX1.
++dnslookup_relay_vhffs_domains:
++ debug_print = "R: dns_lookup_relay_vhffs_domains for $local_part@$domain"
++ driver = dnslookup
++ domains = VHFFS_VALID_LOCALPARTS
++ ignore_target_hosts = !MX1_IP_ADDRESS : *
++ transport = remote_smtp
++ same_domain_copy_routing = yes
++ no_more
++
++
+ .endif
+
+
+--- 30_exim4-config_check_rcpt 2008-09-08 16:05:37.000000000 +0200
++++ 30_exim4-config_check_rcpt 2008-09-08 16:07:12.000000000 +0200
+@@ -162,7 +162,7 @@
+ # relaying. Any other domain is rejected as being unacceptable for relaying.
+ require
+ message = relay not permitted
+- domains = +local_domains : +relay_to_domains
++ domains = +local_domains : +relay_to_domains : +vhffs_domains
+
+
+ # We also require all accepted addresses to be verifiable. This check will