SUMMARY sendmail/.forward in Solaris 2.2

From: Mark Schaal (marks@jarthur.Claremont.EDU)
Date: Fri Aug 06 1993 - 04:35:48 CDT


My original problem, condensed:

Using aliases (.forward or /etc/mail/aliases) to deliver mail to a file does
not work with messages between users on the same machine. sendmail appears
to deliver with the permissions of the sender, and thus is usually not able
to access the mailbox of the receiver.

The responses:

Hal Stern made a couple of good suggestions, neither of which worked for
our problem.

Kevin Mah sent a mail delivery/sorting script from Marty Hall, allowing a
.foward to pipe mail through the script to be deliver as desired. I did
not try this script, as I had already found a different solution.

Tim Smith sent an interesting letter (appended) saying that our method
couldn't work and shouldn't be used in any case because it bypasses
/bin/mail. He suggested trying sym-links from /var/spool/mail to the
desired file, but this did not appear to work for us.

The solution:

I installed procmail to be used as our system's local mailer instead of
/bin/mail. procmail is easily configurable, and conveniently its default
is to deliver to $HOME/mailbox. procmail also gives users a lot more
control over delivery than sendmail's .forward system. The most recent
version of procmail should be available in /pub/unix at
        ftp.informatik.rwth-aachen.de (137.226.112.172)

Thanks to:
        kmah@DCS-Systems.COM (Kevin Mah)
        stern@sunne.East.Sun.COM (Hal Stern - NE Area Systems Engineer)
        Timothy G. Smith - Special Projects <tgsmith@Sun.COM>

mark

--
Mark Schaal                                    marks@jarthur.claremont.edu
Computer Science Department Intern             uunet!jarthur!marks
Harvey Mudd College - Olin 101
Claremont, CA 91711                            (714) 621-8555 x 3485
--

<tgsmith@Sun.COM> wrote: > >This will break in at least two ways (if not more). You have already >discovered the first problem. > >The second problem with this is that by having the mail appended >directly to a file you are bypassing /bin/mail and asking for trouble. > >sendmail normally invokes /bin/mail to make the final delivery to a >mailbox. /bin/mail does two very important things for you. First, it >locks the mailbox before writing to it so as to avoid having your >mailbox trashed when two processes try to update it at once. Second, >/bin/mail does some formatting on the message as it writes it into the >mailbox. /bin/mail inserts the message seperator line (ie the "From >foo date"), quotes lines that start with "From", and also adds the >content length header. By having sendmail deliver the mail directly >to a file you will end up with a mailbox that mail reading programs >cannot parse correctly and may also end up with a trashed mailbox. > >I would strongly recommend abandoning your current strategy since it is >going to cause you problems. > >You might try making /var/spool/mail be a symlink to where you really >want the file to live; I have not tried this so I do not know if this >will cause other problems but it is worth a shot. > >--tim >



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:08:05 CDT