Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jun 1998 12:56:30 -0700 (PDT)
From:      David Wolfskill <dhw@whistle.com>
To:        freebsd-questions@FreeBSD.ORG
Cc:        yurtesen@ispro.net.tr
Subject:   Re: sendmail
Message-ID:  <199806151956.MAA22669@pau-amma.whistle.com>

next in thread | raw e-mail | index | archive | help
>Date: Mon, 15 Jun 1998 16:43:25 +0300 (EET DST)
>From: Evren Yurtesen <yurtesen@ispro.net.tr>

>how may I tell sendmail to store its mails on a different 
>folder than /var/mail ?

Well, it doesn't.  To the extent that sendmail "stores" mail, it does so
(in FreeBSD) in /var/spool/mqueue.

>how comes sendmail knows where to store it? for example
>on linux mails are stored at /var/spool/mail
>so should I recompile sendmail? if so
>where may I find the sources?

sendmail (basically) acts as a switch:  for a given message, the
(envelope) recipient addresses are analyzed, and the message is routed
to appropriate "delivery agents" for each recipient address.

The delivery agent that (in a FreeBSD system) puts messages in
/var/spool/mail is /usr/libexec/mail.local, the sources for which may be
found in /usr/src/usr.sbin/sendmail/mail.local.  (Please note that the
sources to sendmail proper are in /usr/src/usr.sbin/sendmail/src.)


So... there are lots of ways to make local mail delivery occur in a
different place.  Among those ways:

* Recompile & install mail.local, after having hacked the source.

* Make /var/mail a symbolic link to someplace else.

* Change the sendmail.cf (preferably -- my opinion -- by creating/
  modifying an appropriate .mc file & using "make" to create a new
  sendmail.cf) that uses a program other than /usr/libexec/mail.local
  for the "local" mailer (identified in sendmail.cf by the line that
  begins "Mlocal") -- preferably, one that both puts the mail where you
  want it and is (at least) as reliable as mail.local.  To do this,
  define "LOCAL_MAILER_PATH" in your .mc file.

* Set up an alias for each mail recipient that directs the mail to some
  process of your choosing, and which (presumably) would deliver the
  mail as you desire.

Please note that the 2nd option (above) would still allow the mail to
seem to be in /var/mail, which might be an advantage, as the various
Mail User Agents (that expect mail to be in a particular place) need not
be changed.

Cheers,
david
-- 
David Wolfskill		UNIX System Administrator
dhw@whistle.com		voice: (650) 577-7158	pager: (650) 371-4621

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806151956.MAA22669>