From: Mark Wooding Date: Sun, 16 Mar 2014 12:54:46 +0000 (+0000) Subject: sat-rewrite.m4: On satellite hosts, rewrite ADDR@HOST.distorted.org.uk. X-Git-Url: https://git.distorted.org.uk/~mdw/exim-config/commitdiff_plain/8fca6182bd0b3b877ccca2e90b75c99e75f1008e sat-rewrite.m4: On satellite hosts, rewrite ADDR@HOST.distorted.org.uk. These addresses are simply wrong, but stamping out programs which try to issue them one by one is too difficult. --- diff --git a/Makefile b/Makefile index 341208e..5178728 100644 --- 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 index 0000000..8dceb5a --- /dev/null +++ b/sat-rewrite.m4 @@ -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 --------------------------------------------------