home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / mail / misc / 4487 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  3.2 KB

  1. Path: sparky!uunet!ogicse!psgrain!hippo!ee.und.ac.za!tplinfm
  2. From: barrett@daisy.ee.und.ac.za (Alan P Barrett)
  3. Newsgroups: comp.mail.misc
  4. Subject: Re: Directing a Domain's Mail to a file
  5. Message-ID: <1jut33INNrt4@daisy.ee.und.ac.za>
  6. Date: 25 Jan 93 00:10:11 GMT
  7. Article-I.D.: daisy.1jut33INNrt4
  8. References: <1993Jan24.163250.7707@news.csuohio.edu>
  9. Organization: Dept. Elec. Eng., Univ. Natal, Durban, S. Africa
  10. Lines: 65
  11. NNTP-Posting-Host: daisy.ee.und.ac.za
  12.  
  13. In article <1993Jan24.163250.7707@news.csuohio.edu>,
  14. damin@randell.cba.csuohio.edu (Greg Boehnlein) writes:
  15. > In other words, ALL incoming mail for xxx@xxx.xxx.fvnet.org needs to
  16. > be routed to a sperate file where it can be parsed and distributed.
  17.  
  18. You forgot to say what mail system you use.  The following answer applies
  19. to smail3, and includes extracts from config files that are in use here.
  20. (Only names and places have been changed.)  I also assume that routing
  21. to a file is a non-negotiable requirement.
  22.  
  23. Make sure that your router configuration ("routers" file) includes
  24. a suitable override paths file (with the "force" attribute) that is
  25. searched before any DNS lookups.  For example:
  26.  
  27.     # Special connections
  28.     force-special:    driver=pathalias, always, method=paths;
  29.         file = route/force-special, proto=lsearch, optional
  30.  
  31. (Notice that you can use the same old "method=paths" as usual.)
  32.  
  33. In the relevant paths file ("route/force-special" in this example),
  34. specify a route to the domain of interest.  On the left hand side you
  35. need to match the domain of interest (with a leading dot), and on the
  36. right hand side you need to specify a dummy host name, that smail will
  37. use internally for looking up the transport in the method file and for
  38. expanding the ${host} variable.  For example:
  39.  
  40.     .special.some.domain    specialdom!%s
  41.  
  42. In the relevant methods file ("paths", in this example), specify the
  43. delivery method to be used for the dummy host name.  For example:
  44.  
  45.     specialdom        special-batch
  46.  
  47. In the transport configuration ("transports" file), specify how the
  48. chosen delivery method works.  For example:
  49.  
  50.     special-batch:
  51.         # the appendfile driver can also accumulate in directories
  52.         driver=appendfile,
  53.         hbsmtp,            # send batched SMTP commands
  54.         -max_addrs,        # no limit on number or total size
  55.         -max_chars;        #  of recipient addresses.
  56.         # files whose names begin with `q' will be placed here:
  57.         dir=/usr/smail/spool/outq.special/${lc:host},
  58.         user=specialuser,    # files will be owned by this user
  59.         group=mail,        # and this group
  60.         mode=0600        # and will have this mode
  61.  
  62. Now, any message to *@special.some.domain or to *@*.special.some.domain
  63. will be stored as a file in the /usr/smail/spool/outq.special/specialdom
  64. directory.  (The ${lc:host} just forces the name to lower case.)
  65. Each file will have a name that starts with a "q", and will contain a
  66. message in hbsmtp format.  Hbsmtp is half-baked BSMTP, without the HELO
  67. and QUIT lines -- there will be a MAIL FROM line, one or more RCPT TO
  68. lines, a DATA line, the message (with the hidden dot protocol), and a
  69. dot line.
  70.  
  71. You might prefer to use the appendfile driver to append all messages to
  72. a single file.  If so, just say "file=" instead of "dir=" in the relevant
  73. transports entry.
  74.  
  75. --apb
  76. Alan Barrett, Dept. of Electronic Eng., Univ. of Natal, Durban, South Africa
  77. RFC822: barrett@ee.und.ac.za
  78.