home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March B / SCO_CASTOR4RRT.iso / base / root.15 / etc / mail / cf / mailer / uucp.m4 / uucp
Text File  |  1998-08-19  |  6KB  |  175 lines

  1. PUSHDIVERT(-1)
  2. #
  3. # Copyright (c) 1983 Eric P. Allman
  4. # Copyright (c) 1988, 1993
  5. #    The Regents of the University of California.  All rights reserved.
  6. #
  7. # Redistribution and use in source and binary forms, with or without
  8. # modification, are permitted provided that the following conditions
  9. # are met:
  10. # 1. Redistributions of source code must retain the above copyright
  11. #    notice, this list of conditions and the following disclaimer.
  12. # 2. Redistributions in binary form must reproduce the above copyright
  13. #    notice, this list of conditions and the following disclaimer in the
  14. #    documentation and/or other materials provided with the distribution.
  15. # 3. All advertising materials mentioning features or use of this software
  16. #    must display the following acknowledgement:
  17. #    This product includes software developed by the University of
  18. #    California, Berkeley and its contributors.
  19. # 4. Neither the name of the University nor the names of its contributors
  20. #    may be used to endorse or promote products derived from this software
  21. #    without specific prior written permission.
  22. #
  23. # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  24. # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  25. # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  26. # ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  27. # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  28. # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  29. # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  30. # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  31. # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  32. # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  33. # SUCH DAMAGE.
  34. #
  35.  
  36. ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')
  37. ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gC $h!rmail ($u)')')
  38. ifdef(`UUCP_MAILER_FLAGS',, `define(`UUCP_MAILER_FLAGS', `')')
  39. ifdef(`UUCP_MAILER_MAX',,
  40.     `define(`UUCP_MAILER_MAX',
  41.         `ifdef(`UUCP_MAX_SIZE', `UUCP_MAX_SIZE', 100000)')')
  42. POPDIVERT
  43. #####################################
  44. ###   UUCP Mailer specification   ###
  45. #####################################
  46.  
  47. VERSIONID(`@(#)uucp.m4    8.25 (Berkeley) 3/16/97')
  48.  
  49. #
  50. #  There are innumerable variations on the UUCP mailer.  It really
  51. #  is rather absurd.
  52. #
  53.  
  54. # old UUCP mailer (two names)
  55. Muucp,        P=UUCP_MAILER_PATH, F=CONCAT(DFMhuUd, UUCP_MAILER_FLAGS), S=12, R=22/42, M=UUCP_MAILER_MAX,
  56.         _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,
  57.         A=UUCP_MAILER_ARGS
  58. Muucp-old,    P=UUCP_MAILER_PATH, F=CONCAT(DFMhuUd, UUCP_MAILER_FLAGS), S=12, R=22/42, M=UUCP_MAILER_MAX,
  59.         _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,
  60.         A=UUCP_MAILER_ARGS
  61.  
  62. # smart UUCP mailer (handles multiple addresses) (two names)
  63. Msuucp,        P=UUCP_MAILER_PATH, F=CONCAT(mDFMhuUd, UUCP_MAILER_FLAGS), S=12, R=22/42, M=UUCP_MAILER_MAX,
  64.         _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,
  65.         A=UUCP_MAILER_ARGS
  66. Muucp-new,    P=UUCP_MAILER_PATH, F=CONCAT(mDFMhuUd, UUCP_MAILER_FLAGS), S=12, R=22/42, M=UUCP_MAILER_MAX,
  67.         _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,
  68.         A=UUCP_MAILER_ARGS
  69.  
  70. ifdef(`_MAILER_smtp_',
  71. `# domain-ized UUCP mailer
  72. Muucp-dom,    P=UUCP_MAILER_PATH, F=CONCAT(mDFMhud, UUCP_MAILER_FLAGS), S=52/31, R=ifdef(`_ALL_MASQUERADE_', `21/31', `21'), M=UUCP_MAILER_MAX,
  73.         _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,
  74.         A=UUCP_MAILER_ARGS
  75.  
  76. # domain-ized UUCP mailer with UUCP-style sender envelope
  77. Muucp-uudom,    P=UUCP_MAILER_PATH, F=CONCAT(mDFMhud, UUCP_MAILER_FLAGS), S=72/31, R=ifdef(`_ALL_MASQUERADE_', `21/31', `21'), M=UUCP_MAILER_MAX,
  78.         _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,
  79.         A=UUCP_MAILER_ARGS')
  80.  
  81.  
  82. #
  83. #  envelope and header sender rewriting
  84. #
  85. S12
  86.  
  87. # handle error address as a special case
  88. R<@>                $n            errors to mailer-daemon
  89.  
  90. # list:; syntax should disappear
  91. R:; <@>                $@
  92.  
  93. R$* < @ $* . > $*        $1 < @ $2 > $3        strip trailing dots
  94. R$* < @ $=w >            $1            strip local name
  95. R<@ $- . UUCP > : $+        $1 ! $2            convert to UUCP format
  96. R<@ $+ > : $+            $1 ! $2            convert to UUCP format
  97. R$* < @ $- . UUCP >        $2 ! $1            convert to UUCP format
  98. R$* < @ $+ >            $2 ! $1            convert to UUCP format
  99. R$&h ! $+ ! $+            $@ $1 ! $2        $h!...!user => ...!user
  100. R$&h ! $+            $@ $&h ! $1        $h!user => $h!user
  101. R$+                $: $U ! $1        prepend our name
  102. R! $+                $: $k ! $1        in case $U undefined
  103.  
  104. #
  105. #  envelope recipient rewriting
  106. #
  107. S22
  108.  
  109. # list:; should disappear
  110. R:; <@>                $@
  111.  
  112. R$* < @ $* . > $*        $1 < @ $2 > $3        strip trailing dots
  113. R$* < @ $=w >            $1            strip local name
  114. R<@ $- . UUCP > : $+        $1 ! $2            convert to UUCP format
  115. R<@ $+ > : $+            $1 ! $2            convert to UUCP format
  116. R$* < @ $- . UUCP >        $2 ! $1            convert to UUCP format
  117. R$* < @ $+ >            $2 ! $1            convert to UUCP format
  118.  
  119. #
  120. #  header recipient rewriting
  121. #
  122. S42
  123.  
  124. # list:; syntax should disappear
  125. R:; <@>                $@
  126.  
  127. R$* < @ $* . > $*        $1 < @ $2 > $3        strip trailing dots
  128. R$* < @ $=w >            $1            strip local name
  129. R<@ $- . UUCP > : $+        $1 ! $2            convert to UUCP format
  130. R<@ $+ > : $+            $1 ! $2            convert to UUCP format
  131. R$* < @ $- . UUCP >        $2 ! $1            convert to UUCP format
  132. R$* < @ $+ >            $2 ! $1            convert to UUCP format
  133. R$&h ! $+ ! $+            $@ $1 ! $2        $h!...!user => ...!user
  134. R$&h ! $+            $@ $&h ! $1        $h!user => $h!user
  135. R$+                $: $U ! $1        prepend our name
  136. R! $+                $: $k ! $1        in case $U undefined
  137.  
  138.  
  139. ifdef(`_MAILER_smtp_',
  140. `#
  141. #  envelope sender rewriting for uucp-dom mailer
  142. #
  143. S52
  144.  
  145. # handle error address as a special case
  146. R<@>                $n            errors to mailer-daemon
  147.  
  148. # pass everything to standard SMTP mailer rewriting
  149. R$*                $@ $>11 $1
  150.  
  151. #
  152. #  envelope sender rewriting for uucp-uudom mailer
  153. #
  154. S72
  155.  
  156. # handle error address as a special case
  157. R<@>                $n            errors to mailer-daemon
  158.  
  159. # do standard SMTP mailer rewriting
  160. R$*                $: $>11 $1
  161.  
  162. R$* < @ $* . > $*        $1 < @ $2 > $3        strip trailing dots
  163. R<@ $- . UUCP > : $+        $@ $1 ! $2        convert to UUCP format
  164. R<@ $+ > : $+            $@ $1 ! $2        convert to UUCP format
  165. R$* < @ $- . UUCP >        $@ $2 ! $1        convert to UUCP format
  166. R$* < @ $+ >            $@ $2 ! $1        convert to UUCP format')
  167.  
  168.  
  169. PUSHDIVERT(4)
  170. # resolve locally connected UUCP links
  171. R$* < @ $=Z . UUCP. > $*    $#uucp-uudom $@ $2 $: $1 < @ $2 .UUCP. > $3
  172. R$* < @ $=Y . UUCP. > $*    $#uucp-new $@ $2 $: $1 < @ $2 .UUCP. > $3
  173. R$* < @ $=U . UUCP. > $*    $#uucp-old $@ $2 $: $1 < @ $2 .UUCP. > $3
  174. POPDIVERT
  175.