home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March B / SCO_CASTOR4RRT.iso / base / root.15 / etc / mail / cf / mailer / smtp.m4 / smtp
Text File  |  1998-08-19  |  5KB  |  138 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. ifdef(`SMTP_MAILER_FLAGS',, `define(`SMTP_MAILER_FLAGS', `')')
  36. ifdef(`SMTP_MAILER_ARGS',, `define(`SMTP_MAILER_ARGS', `IPC $h')')
  37. ifdef(`ESMTP_MAILER_ARGS',, `define(`ESMTP_MAILER_ARGS', `IPC $h')')
  38. ifdef(`SMTP8_MAILER_ARGS',, `define(`SMTP8_MAILER_ARGS', `IPC $h')')
  39. ifdef(`RELAY_MAILER_ARGS',, `define(`RELAY_MAILER_ARGS', `IPC $h')')
  40. ifdef(`_MAILER_uucp_',
  41.     `errprint(`*** MAILER(smtp) must appear before MAILER(uucp)')')dnl
  42. POPDIVERT
  43. #####################################
  44. ###   SMTP Mailer specification   ###
  45. #####################################
  46.  
  47. VERSIONID(`@(#)smtp.m4    8.33 (Berkeley) 7/9/96')
  48.  
  49. Msmtp,        P=[IPC], F=CONCAT(mDFMuX, SMTP_MAILER_FLAGS), S=11/31, R=ifdef(`_ALL_MASQUERADE_', `21/31', `21'), E=\r\n, L=990,
  50.         _OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,
  51.         A=SMTP_MAILER_ARGS
  52. Mesmtp,        P=[IPC], F=CONCAT(mDFMuXa, SMTP_MAILER_FLAGS), S=11/31, R=ifdef(`_ALL_MASQUERADE_', `21/31', `21'), E=\r\n, L=990,
  53.         _OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,
  54.         A=ESMTP_MAILER_ARGS
  55. Msmtp8,        P=[IPC], F=CONCAT(mDFMuX8, SMTP_MAILER_FLAGS), S=11/31, R=ifdef(`_ALL_MASQUERADE_', `21/31', `21'), E=\r\n, L=990,
  56.         _OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,
  57.         A=SMTP8_MAILER_ARGS
  58. Mrelay,        P=[IPC], F=CONCAT(mDFMuXa8, SMTP_MAILER_FLAGS), S=11/31, R=ifdef(`_ALL_MASQUERADE_', `61/71', `61'), E=\r\n, L=2040,
  59.         _OPTINS(`RELAY_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,
  60.         A=RELAY_MAILER_ARGS
  61.  
  62. #
  63. #  envelope sender rewriting
  64. #
  65. S11
  66. R$+            $: $>51 $1            sender/recipient common
  67. R$* :; <@>        $@                list:; special case
  68. R$*            $: $>61 $1            qualify unqual'ed names
  69. R$+            $: $>94 $1            do masquerading
  70.  
  71.  
  72. #
  73. #  envelope recipient rewriting --
  74. #  also header recipient if not masquerading recipients
  75. #
  76. S21
  77. R$+            $: $>51 $1            sender/recipient common
  78. R$+            $: $>61 $1            qualify unqual'ed names
  79.  
  80.  
  81. #
  82. #  header sender and masquerading header recipient rewriting
  83. #
  84. S31
  85. R$+            $: $>51 $1            sender/recipient common
  86. R:; <@>            $@                list:; special case
  87.  
  88. # do special header rewriting
  89. R$* <@> $*        $@ $1 <@> $2            pass null host through
  90. R< @ $* > $*        $@ < @ $1 > $2            pass route-addr through
  91. R$*            $: $>61 $1            qualify unqual'ed names
  92. R$+            $: $>93 $1            do masquerading
  93.  
  94.  
  95. #
  96. #  convert pseudo-domain addresses to real domain addresses
  97. #
  98. S51
  99.  
  100. # pass <route-addr>s through
  101. R< @ $+ > $*        $@ < @ $1 > $2            resolve <route-addr>
  102.  
  103. # output fake domains as user%fake@relay
  104. ifdef(`BITNET_RELAY',
  105. `R$+ <@ $+ .BITNET. >    $: $1 % $2 .BITNET < @ $B >    user@host.BITNET
  106. R$+.BITNET <@ $+:$+ >    $: $1 .BITNET < @ $3 >        strip mailer: part',
  107.     `dnl')
  108. ifdef(`_NO_UUCP_', `dnl', `
  109. # do UUCP heuristics; note that these are shared with UUCP mailers
  110. R$+ < @ $+ .UUCP. >    $: < $2 ! > $1            convert to UUCP form
  111. R$+ < @ $* > $*        $@ $1 < @ $2 > $3        not UUCP form
  112.  
  113. # leave these in .UUCP form to avoid further tampering
  114. R< $&h ! > $- ! $+    $@ $2 < @ $1 .UUCP. >
  115. R< $&h ! > $-.$+ ! $+    $@ $3 < @ $1.$2 >
  116. R< $&h ! > $+        $@ $1 < @ $&h .UUCP. >
  117. R< $+ ! > $+        $: $1 ! $2 < @ $Y >        use UUCP_RELAY
  118. R$+ < @ $+ : $+ >    $@ $1 < @ $3 >            strip mailer: part
  119. R$+ < @ >        $: $1 < @ *LOCAL* >        if no UUCP_RELAY')
  120.  
  121.  
  122. #
  123. #  common sender and masquerading recipient rewriting
  124. #
  125. S61
  126.  
  127. R$* < @ $* > $*        $@ $1 < @ $2 > $3        already fully qualified
  128. R$+            $@ $1 < @ *LOCAL* >        add local qualification
  129.  
  130.  
  131. #
  132. #  relay mailer header masquerading recipient rewriting
  133. #
  134. S71
  135.  
  136. R$+            $: $>61 $1
  137. R$+            $: $>93 $1
  138.