diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-03-16 23:21:28 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-03-16 23:21:28 -0700 |
commit | 991794de857fabb42c97964c6b6a4677805d721b (patch) | |
tree | 16d05589832d950495989aa3002653bce40c94f1 | |
parent | 6ced95fb32cc22ca55d169944c8cb3f31f01dd4c (diff) | |
download | tamarind-991794de857fabb42c97964c6b6a4677805d721b.tar.gz tamarind-991794de857fabb42c97964c6b6a4677805d721b.tar.bz2 tamarind-991794de857fabb42c97964c6b6a4677805d721b.zip |
Create two alternative spellings for each alias.
I ran into a problem using a Tamarind alias, in
a situation when I was not able to specify an e-mail
address containing dashes. Let's have it so that
dots or underscores work as separators between
the digit groups.
-rw-r--r-- | README | 7 | ||||
-rw-r--r-- | aliases.txr | 6 |
2 files changed, 12 insertions, 1 deletions
@@ -45,6 +45,11 @@ Once removed, an alias stops working; mail received by the mail server for that alias is simply undeliverable at the SMTP level, and "bounces" back to the originator. +For each alias, two supplementary aliases are also created in which +the dashes are replaced, respectively with underscores and periods. +That is to say, if Tamarind creates the alias 123-456-7890, +it also creates 123_456_7890 as well as 123.456.7890. + 2. ARCHITECTURE Tamarind is a CGI program written in the TXR language, running under @@ -233,7 +238,7 @@ filtering. Under the acl_check_rcpt: section in your Exim configuration, add the following. accept - recipients = ^\\d\\d\\d-\\d\\d\\d-\\d\\d\\d\\d@YOUR_DOMAIN\$ + recipients = ^\\d\\d\\d[-._]\\d\\d\\d[-._]\\d\\d\\d\\d@YOUR_DOMAIN\$ Substitute the mail domain for YOUR_DOMAIN! diff --git a/aliases.txr b/aliases.txr index 43aa715..0cb49ad 100644 --- a/aliases.txr +++ b/aliases.txr @@ -5,6 +5,9 @@ (ifa (stringp alias.creation-time) (set it (int-str it)))) (:method equal (alias) alias.address) + (:method alt-addresses (alias) + (list (regsub #/-/ "." alias.address) + (regsub #/-/ "_" alias.address))) (:method get-decoded-memo (alias) (url-decode alias.memo)) (:method get-html-memo (alias) @@ -68,6 +71,9 @@ # memo @{aliases.memo} # created @{aliases.creation-time} @{aliases.address}: @user +@ (repeat :vars ((alt-ali aliases.(alt-addresses)))) +@{alt-ali}: @user +@ (end) @ (end) # end @ (repeat) |