Bug 26774

Summary: Installation of rmail, even without sendmail
Product: Base System Reporter: jaco <jaco>
Component: confAssignee: Gregory Neil Shapiro <gshapiro>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.3-STABLE   
Hardware: Any   
OS: Any   

Description jaco 2001-04-22 18:10:00 UTC
When NO_SENDMAIL is true, rmail is not built even if NOUUCP is false...
In fact, rmail is necessary if UUCP is used, even if sendmail is'nt 
(we mary choose another MTA, Postfix for example.

Fix: 

rmail has to be built if sendmail _or_ uucp are used. 

In other words, if NO_SENDMAIL is not defined _or_ NOUUCP is not defined:
 
Change the /usr/src/bin/Makefile to read:

.if !defined(NO_SENDMAIL) || !defined(NOUUCP)
SUBDIR+=rmail
.endif
How-To-Repeat: make installworld with NO_SENDMAIL= true doesn't build rmail
Comment 1 Brian Candler 2001-05-02 17:13:17 UTC
I would like to suggest that there is a better solution to this, which fixes
another problem too.

The trouble is that rmail is very sendmail-specific. For example, if I
install exim 3.22, and change mailer.conf so that /usr/sbin/sendmail invokes
exim, rmail does not work:

bash# /bin/rmail testuser
From root
Subject: test
exim abandoned: unknown, malformed, or incomplete option -G

My preferred solution is therefore as follows. When building sendmail,

- install rmail as /usr/libexec/sendmail/rmail
- /bin/rmail symlinks to /usr/sbin/mailwrapper
- add a new entry to /etc/mail/mailer.conf:
  rmail   /usr/libexec/sendmail/rmail

Since many sensible mailers (e.g. exim, smail) have 'rmail' functionality
already, then it becomes straightforward to change this to, say,

rmail	/usr/exim/bin/exim

In the case where the MTA supports rmail, this means that jaco's fix is not
necessary. But equally it doesn't do any harm to include it, as long as
rmail is indirected through mailer.conf.

Regards,

Brian.
Comment 2 jaco 2001-05-02 18:21:18 UTC
>>>>> "Brian" == Brian Candler <B.Candler@pobox.com> writes:

Brian> My preferred solution is therefore as follows. When building
Brian> sendmail,

The problem is we may need rmail without needing sendmail... As i'm
using Postfix, i have NO_SENDMAIL in my make.conf hence rmail is never
rebuild. My fix doesn't solve your problem but breaks the dependancy
between sendmail build and rmail build (and solves the problem i've
mentionned).

Brian> Since many sensible mailers (e.g. exim, smail) have 'rmail'
Brian> functionality already, then it becomes straightforward to
Brian> change this to, say,

Yep, that's perhaps another way... I've never investigated Postfix
enough to see if the distribution provides a rmail replacement.

-- 
Éric Jacoboni, né il y a 1292188590 secondes.
Comment 3 Brian Candler 2001-05-02 18:39:29 UTC
On Wed, May 02, 2001 at 07:21:18PM +0200, Eric Jacoboni wrote:
> Brian> Since many sensible mailers (e.g. exim, smail) have 'rmail'
> Brian> functionality already, then it becomes straightforward to
> Brian> change this to, say,
> 
> Yep, that's perhaps another way... I've never investigated Postfix
> enough to see if the distribution provides a rmail replacement.

http://www.postfix.org/faq.html

"You need an rmail program that extracts the sender address from mail that
arrives via UUCP, and that feeds the mail into the Postfix sendmail
command. Most UNIX systems come with an rmail utility. If you're in a
pinch, try the one bundled with the Postfix source code in the auxiliary
directory. Some day Postfix may have its own rmail command."

Personally I think it should be the responsibility of a well-behaved MTA to
provide an rmail workalike, and if the user specifies NO_SENDMAIL then they
really don't want any part of sendmail, including its rmail (which is
arguably sendmail-specific anyway)

Regards,

Brian.
Comment 4 jaco 2001-05-02 19:23:05 UTC
>>>>> "Brian" == Brian Candler <B.Candler@pobox.com> writes:

Brian> If you're in a pinch, try the one bundled with
Brian> the Postfix source code in the auxiliary directory. Some day
Brian> Postfix may have its own rmail command."

Ok i will give it a try...

Brian> Personally I think it should be the responsibility of a
Brian> well-behaved MTA to provide an rmail workalike, and if the user
Brian> specifies NO_SENDMAIL then they really don't want any part of
Brian> sendmail, including its rmail (which is arguably
Brian> sendmail-specific anyway)

I think too. May be the Postfix port should insist on it...

-- 
Éric Jacoboni, né il y a 1292192266 secondes.
Comment 5 jaco 2001-05-02 20:13:01 UTC
>>>>> "Brian" == Brian Candler <B.Candler@pobox.com> writes:

Brian> http://www.postfix.org/faq.html

Ok, i look at the Postfix sources and found a rmail script. I've
tested some UUCP batches and it seems to work ok.

It seems we can close this PR. I'm gonna contact the Postfix port
maintainer to ask him to add this script in its installation.


-- 
Éric Jacoboni, né il y a 1292195410 secondes.
Comment 6 Kris Kennaway freebsd_committer freebsd_triage 2001-08-25 22:41:06 UTC
Responsible Changed
From-To: freebsd-bugs->gshapiro

Over to the sendmail maintainer
Comment 7 Gregory Neil Shapiro freebsd_committer freebsd_triage 2001-11-14 02:49:54 UTC
State Changed
From-To: open->feedback

rmail no longer uses -G so that isn't an issue.  As far as building 
even if NO_SENDMAIL is defined, I've received complaints when doing that 
as some users don't even have the sendmail source in contrib/ and the 
build will fail.
Comment 8 Gregory Neil Shapiro freebsd_committer freebsd_triage 2001-12-10 19:33:04 UTC
State Changed
From-To: feedback->closed

No feedback from submitter regarding rmail change so I assume it is a good 
enough solution.