This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add the files from dist/meta to perl's repo
[metaconfig.git] / dist / U / mailer.U
1 ?RCS: $Id: mailer.U 1 2006-08-24 12:32:52Z rmanfredi $
2 ?RCS:
3 ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
4 ?RCS: 
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 4.0.
10 ?RCS:
11 ?RCS: $Log: mailer.U,v $
12 ?RCS: Revision 3.0.1.3  1995/01/11  15:32:11  ram
13 ?RCS: patch45: can now use Loc variables since path stripping is deferred
14 ?RCS:
15 ?RCS: Revision 3.0.1.2  1994/05/06  15:10:04  ram
16 ?RCS: patch23: ensure full path value is used for rmail also
17 ?RCS:
18 ?RCS: Revision 3.0.1.1  1994/01/24  14:14:18  ram
19 ?RCS: patch16: now use _sendmail vars and friends for portability issues
20 ?RCS:
21 ?RCS: Revision 3.0  1993/08/18  12:09:10  ram
22 ?RCS: Baseline for dist 3.0 netwide release.
23 ?RCS:
24 ?MAKE:mailer: test cat rmail mail smail sendmail Getfile Oldconfig
25 ?MAKE:  -pick add $@ %<
26 ?S:mailer:
27 ?S:     This variable contains the full pathname of a reasonable mailer.
28 ?S:     By reasonable, we mean some program which can understand internet
29 ?S:     addresses or at least forward them to some internet router. This
30 ?S:     mailer should be invoked as "mailer [options] recipients <mail".
31 ?S:.
32 : determine the name of a reasonable mailer
33 case "$mailer" in
34 '')
35         if $test -f "$sendmail"; then
36                 dflt="$sendmail"
37         elif $test -f "$smail"; then
38                 dflt="$smail"
39         elif $test -f "$rmail"; then
40                 dflt="$rmail"
41         elif $test -f /bin/mail; then
42                 dflt=/bin/mail
43         else
44                 dflt=$mail
45         fi
46         ;;
47 *)  dflt="$mailer";;
48 esac
49 $cat <<EOM
50
51 I need the full pathname of the program used to deliver mail on your system.
52 A typical answer would be /usr/lib/sendmail or /bin/rmail, but you may choose
53 any other program, as long as it can be fed from standard input and will
54 honour any user-supplied headers.
55
56 EOM
57 fn=f
58 rp='Mail transport agent to be used?'
59 . ./getfile
60 mailer="$ans"
61