summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2000-04-02 21:15:54 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2000-04-02 21:15:54 +0000
commit6c66d6ede499d17c1a174dc2068b8af12dc84680 (patch)
treeac415df58dbc2a14359cd83aa2682d09dc78990f /gnu
parentd68be9901ca4ece6cd84e7eb0d4e66e3db6638b9 (diff)
Homegrown feature to do local mail address rewrites. Needed to build
courtesan.mc and generally useful.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.sbin/sendmail/cf/feature/mailnametable.m419
1 files changed, 19 insertions, 0 deletions
diff --git a/gnu/usr.sbin/sendmail/cf/feature/mailnametable.m4 b/gnu/usr.sbin/sendmail/cf/feature/mailnametable.m4
new file mode 100644
index 00000000000..0fe5497dbed
--- /dev/null
+++ b/gnu/usr.sbin/sendmail/cf/feature/mailnametable.m4
@@ -0,0 +1,19 @@
+divert(-1)
+#
+# Simple feature to do username rewriting (converse of an alias)
+#
+
+divert(0)
+VERSIONID(`$Id: mailnametable.m4,v 1.1 2000/04/02 21:15:53 millert Exp $')
+divert(-1)
+
+define(`MAILNAME_TABLE', ifelse(_ARG_, `', DATABASE_MAP_TYPE `-o' MAIL_SETTINGS_DIR`mailnames', `_ARG_'))
+LOCAL_CONFIG
+ifdef(`MAILNAME_TABLE', `Kmailnames' MAILNAME_TABLE)
+PUSHDIVERT(1)
+LOCAL_RULE_1
+ifdef(`MAILNAME_TABLE',
+R$- $: $>3 $(mailnames $1 $)
+R$- < @ $=w . > $: $>3 $(mailnames $1 $)
+)
+POPDIVERT