Import sendmail 8.13.6
[dragonfly.git] / contrib / sendmail-8.13.6 / cf / mailer / mail11.m4
1 PUSHDIVERT(-1)
2 #
3 # Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
4 #       All rights reserved.
5 #
6 # By using this file, you agree to the terms and conditions set
7 # forth in the LICENSE file which can be found at the top level of
8 # the sendmail distribution.
9 #
10 #
11 # Not exciting enough to bother with copyrights and most of the
12 # rulesets are based from those provided by DEC.
13 # Barb Dijker, Labyrinth Computer Services, barb@labyrinth.com
14 #
15 # This mailer is only useful if you have DECNET and the
16 # mail11 program - gatekeeper.dec.com:/pub/DEC/gwtools.
17 #
18 # For local delivery of DECNET style addresses to the local
19 # DECNET node, you will need feature(use_cw_file) and put
20 # your DECNET nodename in in the cw file.
21 #
22 ifdef(`MAIL11_MAILER_PATH',, `define(`MAIL11_MAILER_PATH', /usr/etc/mail11)')
23 _DEFIFNOT(`MAIL11_MAILER_FLAGS', `nsFx')
24 ifdef(`MAIL11_MAILER_ARGS',, `define(`MAIL11_MAILER_ARGS', mail11 $g $x $h $u)')
25 define(`_USE_DECNET_SYNTAX_')
26 define(`_LOCAL_', ifdef(`confLOCAL_MAILER', confLOCAL_MAILER, `local'))
27 define(`_MAIL11_QGRP', `ifelse(defn(`MAIL11_MAILER_QGRP'),`',`', ` Q=MAIL11_MAILER_QGRP,')')dnl
28
29 POPDIVERT
30
31 PUSHDIVERT(3)
32 # DECNET delivery
33 R$* < @ $=w .DECNET. >          $#_LOCAL_ $: $1                 local DECnet
34 R$+ < @ $+ .DECNET. >           $#mail11 $@ $2 $: $1            DECnet user
35 POPDIVERT
36
37 PUSHDIVERT(6)
38 CPDECNET
39 POPDIVERT
40
41 ###########################################
42 ###   UTK-MAIL11 Mailer specification   ###
43 ###########################################
44
45 VERSIONID(`$Id: mail11.m4,v 8.22 2001/11/12 23:11:34 ca Exp $')
46
47 SMail11To
48 R$+ < @ $- .UUCP >      $: $2 ! $1              back to old style
49 R$+ < @ $- .DECNET >    $: $2 :: $1             convert to DECnet style
50 R$+ < @ $- .LOCAL >     $: $2 :: $1             convert to DECnet style
51 R$+ < @ $=w. >          $: $2 :: $1             convert to DECnet style
52 R$=w :: $+              $2                      strip local names
53 R$+ :: $+               $@ $1 :: $2             already qualified
54
55 SMail11From
56 R$+                     $: $>Mail11To $1        preprocess
57 R$w :: $+               $@ $w :: $1             ready to go
58
59 Mmail11, P=MAIL11_MAILER_PATH, F=_MODMF_(MAIL11_MAILER_FLAGS, `MAIL11'), S=Mail11From, R=Mail11To,
60         T=DNS/X-DECnet/X-Unix,_MAIL11_QGRP
61         A=MAIL11_MAILER_ARGS