From cdc4389f1aae25de1a90a420bf0cecf15aa3e24e Mon Sep 17 00:00:00 2001 From: root Date: Thu, 21 Jun 2007 10:46:33 -0400 Subject: [PATCH] Get mail delivery to logs@mire.hcoop.net and logs@deleuze.hcoop.net working * crontab (MAILTO): Send mail to logs@deleuze.hcoop.net rather than logs@localhost, for easier sorting. * denyhosts.conf (ADMIN_EMAIL): Ditto. * exim4/conf.d/main/01_exim4-config_listmacrosdefs (unix_domains): Add mire.hcoop.net so that mire relay to local aliases can work. * exim4/conf.d/router/400_exim4-config_system_aliases (system_aliases): Make this just look up local_part. Use /etc/aliases.local, temporarily. * exim4/conf.d/router/420_exim4-config_hosted_aliases: New file that implements delivery to hosted domains. This does a full local_name and domain lookup. * exim4/conf.d/router/450_exim4-config_default_aliases: Write better description of what this does. --- conf.d/main/01_exim4-config_listmacrosdefs | 2 +- conf.d/router/400_exim4-config_system_aliases | 8 ++--- conf.d/router/420_exim4-config_hosted_aliases | 34 +++++++++++++++++++ .../router/450_exim4-config_default_aliases | 5 +-- 4 files changed, 42 insertions(+), 7 deletions(-) create mode 100644 conf.d/router/420_exim4-config_hosted_aliases diff --git a/conf.d/main/01_exim4-config_listmacrosdefs b/conf.d/main/01_exim4-config_listmacrosdefs index 5693c98..3c34794 100644 --- a/conf.d/main/01_exim4-config_listmacrosdefs +++ b/conf.d/main/01_exim4-config_listmacrosdefs @@ -66,7 +66,7 @@ DC_visiblename=DEBCONFvisiblenameDEBCONF # hcoop-change: List of domains that accept mail from local users. # Mail sent to other domains we manage will be transformed into a # local address by /etc/aliases. -domainlist unix_domains = deleuze.hcoop.net:localhost +domainlist unix_domains = deleuze.hcoop.net:mire.hcoop.net:localhost # List of sender networks (IP addresses) to _unconditionally_ relay # _for_. If you intend to be SMTP AUTH server, you do not need to enter diff --git a/conf.d/router/400_exim4-config_system_aliases b/conf.d/router/400_exim4-config_system_aliases index 2b9afc5..1976601 100644 --- a/conf.d/router/400_exim4-config_system_aliases +++ b/conf.d/router/400_exim4-config_system_aliases @@ -20,16 +20,16 @@ # /usr/share/doc/exim4-base/README.Debian.gz # for explanation and some workarounds. -# hcoop-change: Look up the local_part and domain, not just the -# local_part. +# hcoop-change: Look up this stuff in /etc/aliases.local for now, +# until Adam gets back to me. system_aliases: debug_print = "R: system_aliases for $local_part@$domain" driver = redirect - domains = +local_domains + domains = +unix_domains allow_fail allow_defer - data = ${lookup{$local_part@$domain}lsearch{/etc/aliases}} + data = ${lookup{$local_part}lsearch{/etc/aliases.local}} .ifdef SYSTEM_ALIASES_USER user = SYSTEM_ALIASES_USER .endif diff --git a/conf.d/router/420_exim4-config_hosted_aliases b/conf.d/router/420_exim4-config_hosted_aliases new file mode 100644 index 0000000..42c8b07 --- /dev/null +++ b/conf.d/router/420_exim4-config_hosted_aliases @@ -0,0 +1,34 @@ + +### router/420_exim4-config_hosted_aliases +################################# + +# This router handles the local part in a case-insensitive way which +# satisfies the RFCs requirement that postmaster be reachable regardless +# of case. If you decide to handle /etc/aliases in a caseful way, you +# need to make arrangements for a caseless postmaster. + +# hcoop-change: Custom rule that looks up the local_part and domain +# in /etc/aliases.hosted. + +hosted_aliases: + debug_print = "R: hosted_aliases for $local_part@$domain" + driver = redirect + domains = +local_domains + allow_fail + allow_defer + data = ${lookup{$local_part@$domain}lsearch{/etc/aliases.hosted}} + .ifdef SYSTEM_ALIASES_USER + user = SYSTEM_ALIASES_USER + .endif + .ifdef SYSTEM_ALIASES_GROUP + group = SYSTEM_ALIASES_GROUP + .endif + .ifdef SYSTEM_ALIASES_FILE_TRANSPORT + file_transport = SYSTEM_ALIASES_FILE_TRANSPORT + .endif + .ifdef SYSTEM_ALIASES_PIPE_TRANSPORT + pipe_transport = SYSTEM_ALIASES_PIPE_TRANSPORT + .endif + .ifdef SYSTEM_ALIASES_DIRECTORY_TRANSPORT + directory_transport = SYSTEM_ALIASES_DIRECTORY_TRANSPORT + .endif diff --git a/conf.d/router/450_exim4-config_default_aliases b/conf.d/router/450_exim4-config_default_aliases index cbcd515..8050d5f 100644 --- a/conf.d/router/450_exim4-config_default_aliases +++ b/conf.d/router/450_exim4-config_default_aliases @@ -1,5 +1,6 @@ -# hcoop-change: default_aliases rule for various domains; mostly seems -# to be used by Adam +# hcoop-change: New rule which specifies the fallback person to send +# mail to for a domain. + default_aliases: debug_print = "R: default_aliases for $local_part@$domain" driver = redirect -- 2.20.1