sendmail, 4th Edition

$#

Match a literal $# LHS operator

Because the RHS can return a delivery-agent specification, it is sometimes desirable to check for the $# operator on the LHS of a rule. Consider, for example, the following rule:

 R $+ $  $# OK              $@ 

The LHS looks for anything (the $+ ) followed by a $ operator, and then a $# OK . This might match a workspace that was set up by a database-map lookup or a call to another rule set. The $# OK means the address was OK as is, and so should be placed back into the workspace. The RHS does just that by returning (the $@ prefix) the original address (the $1 references the LHS $+ , which contained the original address).

Note that the $# operator has no special meaning in the LHS. It is used only to detect a delivery- agent-like specification made by an earlier rule on the RHS. The next two sections reveal how this is done.



Sendmail
sendmail, 4th Edition
ISBN: 0596510292
EAN: 2147483647
Year: 2002
Pages: 1174

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net