6 and later
V8 sendmail can remove quotation marks from around tokens by using the special dequote
database-map type. Because dequote is a type, not a database map, you need to declare it
with a K configuration command before you can use it:
Kunquote dequote
This declares a database map named unquote of the type dequote. Once a database-map
name has been declared, the dequote type can be used in the RHS of rules to remove quotation
marks. It is used with $( and $) just like all database-map lookups:
$(unquote tokens $)
Here, arbitrary tokens are looked up in the database map named unquote. That database
map is special because it is of the type dequote. Instead of being looked up in an external
database file, tokens will just have any surrounding quotation marks removed:
"A.B.C" becomes A.B.C
"A"."B"."C" becomes A.B.C
"A B" becomes "A B"
"A,B" becomes "A,B"
"A>B" becomes "A>B"
The first example shows that surrounding quotation marks are removed. The second shows
that multiple quoted tokens are all dequoted. The last three show that sendmail refuses to
dequote any tokens that will form an illegal or ambiguous address when dequoted.
As an aid to understanding this dequoting process, run the following two-line configuration
file in rule-testing mode:
V10
Kdequote dequote
You can then use the -bt /map command to try various dequoting possibilities:
> /map dequote "A.
Pages:
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595