[net.unix-wizards] rerouting mail after a timeout

mp@allegra.UUCP (Mark Plotnick) (01/14/86)

All the systems in our lab use a common aliases file, with an entry
for each user in the lab so that all mail for a given user goes to
exactly one machine.

Many users here do most of their work on Suns, using the central vaxes
only for reading mail and netnews.  I've gotten quite a few requests
from some users wondering if it's possible to change their aliases to
route their mail to their Suns (since this would save them the trouble
of having to manually copy saved mail messages from the vaxes to the
Suns) yet be assured that if they turn off their Suns for a long period
of time without telling anyone (e.g. to go on vacation) that their mail
will then be automatically rerouted to a vax rather than being returned
to the sender.  Has anyone enhanced sendmail's timeout mechanism (or
written a separate tool that grovels through the queue files) to do
something like this?

	Mark Plotnick
	allegra!mp

ggr@packard.UUCP (Guy Riddle) (01/16/86)

) Many users here do most of their work on Suns, using the central vaxes
) only for reading mail and netnews.  I've gotten quite a few requests
) from some users wondering if it's possible to change their aliases to
) route their mail to their Suns (since this would save them the trouble
) of having to manually copy saved mail messages from the vaxes to the
) Suns) yet be assured that if they turn off their Suns for a long period
) of time without telling anyone (e.g. to go on vacation) that their mail
) will then be automatically rerouted to a vax rather than being returned
) to the sender.

At the cost of some inefficiency, you could normally route the users
mail to their VAX-addresses where those users that wished their mail delivered
to their SUNs could create a .forward file on the VAX to route their mail
to their SUN-addressese.

They could then remove the .forward when they went on vacation, leaving
their mail on the VAX (or modify it to run their mail through the infamous
vacation(1) program).

		=== Guy Riddle == AT&T Bell Laboratories Liberty Corner ===

mrose%NRTC@usc-ecl.arpa (Marshall Rose) (01/16/86)

I not sure how either MMDF-II or SendMail handle this, though my last
recollections are that they don't worry about the problem.  If, after you
examine the question further, this turns out to be the case, you could run
a POP (Post Office Protocol) server on your lab machine.  All mail continues
to get delivered to the lab machine.  When a user on another machine wants
his/her mail, they run a POP client program which retrieves the mail over
the localnet (TCP/IP) and then they can work on it there.  You can even
set things up so that when mail gets posted, it gets posted on the lab
machine via SMTP in such a way that replies go back to the lab machine.
Although both POP and SMTP are fairly well known protocols, I know of only
one user agent that makes substantial use of them: MH, the Rand Message
Handler.  For info on how to get a copy, drop a note to Bug-MH@UCI.EDU.

/mtr

sid@linus.UUCP (Sid Stuart) (01/20/86)

>Many users here do most of their work on Suns, using the central vaxes
>only for reading mail and netnews.  I've gotten quite a few requests
>from some users wondering if it's possible to change their aliases to
>route their mail to their Suns (since this would save them the trouble
>of having to manually copy saved mail messages from the vaxes to the
>Suns) yet be assured that if they turn off their Suns for a long period
>of time without telling anyone (e.g. to go on vacation) that their mail
>will then be automatically rerouted to a vax rather than being returned
>to the sender.  Has anyone enhanced sendmail's timeout mechanism (or
>written a separate tool that grovels through the queue files) to do
>something like this?
>
>	Mark Plotnick
>	allegra!mp


	The nicest solution to this problem would be to have only one
/usr/spool/mail directory across your network of computers.
Having only one /usr/spool/mail directory means that whatever computer
you log into, you read the same mail.  I don't think it would take more than
a week or two of work to do, unfortunatly I haven't had a week or two to do it
yet. I am hoping Sun will do it in Release 3.0. Here is the idea,

		1) Sendmail.cf changes:
		 Have the computers route all their mail to a main machine,
		lets call it the mailhost. This would mean that the
		subsidiary machines, lets call them nomailhosts, would
		not have a local mailer specified in their sendmail.cf.
		The mailhost would also rewrite the addresses coming
		from the nomailhosts to make it appear as if the mail
		was sent from the mailhost. The mailhost would also
		accept mail sent to the nomailhosts and deliver it
		via the local mailer.


		2) Directory changes:
		Set up the mailhost's /usr/spool/mail directory
		normally. Have the mailhost's /usr/spool/mail mounted
		on the nomailhost machines through the NFS.

		3) Software changes:
		This is the hard part. Sendmail, /bin/mail and
		/usr/ucb/mail and probably any other mail readers/deliverers
		want to coordinate spooled mailfile activity through lockfiles.
		They have a timeout check on the creation date of the
		lockfile. To make sure that that time skew on different
		machines doesn't burp on this feature and to fix any posible
		wierd race problems that I don't want to consider, one
		needs a lock server. It would be easy to implement the lock
		server using Sun's RPC, but it would take a week or so for me
		to do it.(Which I don't have.)

		
	The above changes require that you have NFS running on your Vax. This
is available from Mt. Xinu.


	You can also have your users read news on the Suns, just mount the
news spool directory with the NFS and install the news reader on the Suns.


						sid at linus

woof@psivax.UUCP (Hal Schloss) (01/23/86)

In article <132@linus.UUCP> sid@linus.UUCP (Sid Stuart) writes:
>>Many users here do most of their work on Suns, using the central vaxes
>>only for reading mail and netnews.
>>
>>      Mark Plotnick
>>      allegra!mp
>
>
>       The nicest solution to this problem would be to have only one
>/usr/spool/mail directory across your network of computers.
>Having only one /usr/spool/mail directory means that whatever computer
>you log into, you read the same mail.  I don't think it would take more than
>a week or two of work to do, unfortunatly I haven't had a week or two to do it
>yet. I am hoping Sun will do it in Release 3.0. Here is the idea,
>
>                                               sid at linus


I did it. What I have done is to have two vaxes both appear as the same machine
for mail and netnews purposes. As sid suggests latter is his message the Mt.
Xinu NFS port is required to accomplish this. If you have this what you can do
is have all the machines use just one mail directory and one netnews directory.

For mail I set it up so that /usr/spool/mail is actually the same directory by
using a symbolic link on the new machine to point to the old machines directory.
This requires NFS. Thus to read the mail a user must only run mail on either
machine and things go fine. To send mail I force sendmail to run only on the
old machine. The new machine has the following script for sendmail.

#!/bin/sh
cat << EOF > /vax/tmp/rsh$USER$$
#!/bin/sh
PATH="$PATH"
export PATH
rm /tmp/rsh$USER$$
exec $0 $*
EOF
chmod u+x /vax/tmp/rsh$USER$$
exec rsh psivax /tmp/rsh$USER$$

This forces sendmail to run on psivax.

For the netnews, I have set up /usr/spool/news to be named identically on
both machines, and run inews only on one of the machines. I use a similar
script for inews.
--
                Hal Schloss
                (from the Software Lounge at) Pacesetter Systems Inc.
 {sdcrdcf|ttdica|group3|scgvaxd|nrcvax|bellcore|logico|rdlvax|ihnp4}!psivax!woof
 ARPA: ttidca!psivax!woof@rand-unix.arpa