-T

-T

Suffix to append on temporary failure V8.10 and above

When a resource is temporarily unavailable, it would be handy if sendmail indicated that unavailability when the database lookup fails. Consider NFS, for example. It can time out when a server is down briefly , but a failed lookup of a user 's login name need not cause a permanent failure under such a circumstance. Instead, something should be returned to show that it is only a temporary failure.

The -T database switch was added with V8.10 sendmail to solve this problem. You use it to define a suffix to add to the key for the returned failure value when the problem is temporary. You might use it like this:

 Kmailservers nis -T.Defer -o mailservers ... R $* <@ $+ > $*                 $: <@> <$(mailservers  $: Fail $)> R $* <@ $+ > $* <$* . Defer>    $# error $@ 4.2.2 $: "450 defer"   handle failure here  R $* <@ $+ > $* <Fail>          $# error $@ 5.7.1 $: "550 reject"   handle failure here  R $* <@ $+ > $* <$+>            $# smtp $@  $:  < @  >   OK, so send it   ...  

Note that a permanent failure returns the failure alternative indicated by the $ : operator (the Fail ). But a temporary failure returns the suffix defined by the -T , appended to the original key (the $2 ), to form $2.Defer .

Note that this definition of temporary failure is different from that defined by the -D database switch. With -D , database lookups are not done at all if the DeliveryMode option (DeliveryMode) is set to defer . Also note that this -T database switch affects only the return value. It does not affect the outcome of mail delivery. To affect the outcome on temporary failures, use the -t switch (-t).



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