chiark / gitweb /
sat-rewrite.m4: On satellite hosts, rewrite ADDR@HOST.distorted.org.uk.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 16 Mar 2014 12:54:46 +0000 (12:54 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 16 Mar 2014 12:54:46 +0000 (12:54 +0000)
These addresses are simply wrong, but stamping out programs which try to
issue them one by one is too difficult.

Makefile
sat-rewrite.m4 [new file with mode: 0644]

index 341208e47874a8b5b0fba99e5b4e73a47d06109d..51787286f1180090c49c35c781aabef98a20a3ed 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -57,7 +57,7 @@ MAIN                   = lists.m4 base.m4
 MODES                   =
 
 MODES                  += satellite
-OPTIONS_satellite       = satellite.m4
+OPTIONS_satellite       = satellite.m4 sat-rewrite.m4
 
 MODES                  += hub
 OPTIONS_hub             = auth.m4 exchange.m4 local.m4 spam.m4 vhost.m4
diff --git a/sat-rewrite.m4 b/sat-rewrite.m4
new file mode 100644 (file)
index 0000000..8dceb5a
--- /dev/null
@@ -0,0 +1,34 @@
+### -*-m4-*-
+###
+### Satellite host rewrite rules for distorted.org.uk Exim configuration
+###
+### (c) 2012 Mark Wooding
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This program is free software; you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published by
+### the Free Software Foundation; either version 2 of the License, or
+### (at your option) any later version.
+###
+### This program is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with this program; if not, write to the Free Software Foundation,
+### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+SECTION(rewrite)m4_dnl
+## If our fully-qualified host name appears in an address then remove it.  It
+## won't work, but some programs are too stupid to send mail properly.  This
+## only gets done on true satellite hosts, because there's a plausible reason
+## for naming an explicit host if it can actually receive mail.  We apply
+## this rewrite to both source and destination addresses, because programs
+## screw up both.  This all makes me feel very sad.
+*@+thishost            $1@$qualify_domain              Eh
+
+DIVERT(null)
+###----- That's all, folks --------------------------------------------------