🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Greg Boehnlein Sun, 24 Jan 1993 16:32
Directing a Domain's Mail to a file
#3862
Author: Greg Boehnlein
Date: Sun, 24 Jan 1993 16:32
8 lines
713 bytes
	Hi all... I have this crazy need to re-direct the mail for a sub-domain
running under a Host system to a file. 

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.

Any ideas?
Re: Directing a Domain's Mail to a file
#3864
Author: Alan P Barrett
Date: Mon, 25 Jan 1993 00:10
65 lines
3386 bytes
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads