home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!psgrain!hippo!ee.und.ac.za!tplinfm
- From: barrett@daisy.ee.und.ac.za (Alan P Barrett)
- Newsgroups: comp.mail.misc
- Subject: Re: Directing a Domain's Mail to a file
- Message-ID: <1jut33INNrt4@daisy.ee.und.ac.za>
- Date: 25 Jan 93 00:10:11 GMT
- Article-I.D.: daisy.1jut33INNrt4
- References: <1993Jan24.163250.7707@news.csuohio.edu>
- Organization: Dept. Elec. Eng., Univ. Natal, Durban, S. Africa
- Lines: 65
- NNTP-Posting-Host: daisy.ee.und.ac.za
-
- In article <1993Jan24.163250.7707@news.csuohio.edu>,
- damin@randell.cba.csuohio.edu (Greg Boehnlein) writes:
- > In other words, ALL incoming mail for xxx@xxx.xxx.fvnet.org needs to
- > be routed to a sperate file where it can be parsed and distributed.
-
- You forgot to say what mail system you use. The following answer applies
- to smail3, and includes extracts from config files that are in use here.
- (Only names and places have been changed.) I also assume that routing
- to a file is a non-negotiable requirement.
-
- Make sure that your router configuration ("routers" file) includes
- a suitable override paths file (with the "force" attribute) that is
- searched before any DNS lookups. For example:
-
- # Special connections
- force-special: driver=pathalias, always, method=paths;
- file = route/force-special, proto=lsearch, optional
-
- (Notice that you can use the same old "method=paths" as usual.)
-
- In the relevant paths file ("route/force-special" in this example),
- specify a route to the domain of interest. On the left hand side you
- need to match the domain of interest (with a leading dot), and on the
- right hand side you need to specify a dummy host name, that smail will
- use internally for looking up the transport in the method file and for
- expanding the ${host} variable. For example:
-
- .special.some.domain specialdom!%s
-
- In the relevant methods file ("paths", in this example), specify the
- delivery method to be used for the dummy host name. For example:
-
- specialdom special-batch
-
- In the transport configuration ("transports" file), specify how the
- chosen delivery method works. For example:
-
- special-batch:
- # the appendfile driver can also accumulate in directories
- driver=appendfile,
- hbsmtp, # send batched SMTP commands
- -max_addrs, # no limit on number or total size
- -max_chars; # of recipient addresses.
- # files whose names begin with `q' will be placed here:
- dir=/usr/smail/spool/outq.special/${lc:host},
- user=specialuser, # files will be owned by this user
- group=mail, # and this group
- mode=0600 # and will have this mode
-
- Now, any message to *@special.some.domain or to *@*.special.some.domain
- will be stored as a file in the /usr/smail/spool/outq.special/specialdom
- directory. (The ${lc:host} just forces the name to lower case.)
- Each file will have a name that starts with a "q", and will contain a
- message in hbsmtp format. Hbsmtp is half-baked BSMTP, without the HELO
- and QUIT lines -- there will be a MAIL FROM line, one or more RCPT TO
- lines, a DATA line, the message (with the hidden dot protocol), and a
- dot line.
-
- You might prefer to use the appendfile driver to append all messages to
- a single file. If so, just say "file=" instead of "dir=" in the relevant
- transports entry.
-
- --apb
- Alan Barrett, Dept. of Electronic Eng., Univ. of Natal, Durban, South Africa
- RFC822: barrett@ee.und.ac.za
-