HP Visualize J210XC IRIX to HP-UX Migration Guide - Page 111

Restarting sendmail, Configuring a sendmail Client to Relay All Mail to a Server

Page 111 highlights

sendmail 2. Use a text editor to add lines to the file. Each line has the following form: alias : mailing_list where alias is a local address, local user name, or local alias, and mailing_list is a comma-separated list of local user names or aliases, remote addresses, file names, commands, or included files. 3. Issue the following command to regenerate the alias database from the /etc/mail/aliases file: # /usr/sbin/newaliases This command creates the alias database, which is located in the file /etc/mail/aliases.db. Restarting sendmail Issue the following commands, on a standalone system or on the mail server, to restart sendmail: # /sbin/init.d/sendmail stop # /sbin/init.d/sendmail start Configuring a sendmail Client to Relay All Mail to a Server As mentioned previously, the default behavior for a sendmail client is to forward only local mail to the sendmail server for delivery; the client system sends non-local mail directly to remote systems. If you want the client to relay all mail (local and non-local) to the sendmail server, you will need to build a new sendmail.cf file using the m4 macros (a set of library routines used to create customized sendmail configuration files). Follow these steps to create a new sendmail.cf file: 1. Change directory to the /usr/newconfig/etc/mail/cf/cf directory: # cd /usr/newconfig/etc/mail/cf/cf 2. Copy the file examples/clientproto.mc to this directory: # cp examples/clientproto.mc. 3. Edit the following statements in the clientproto.mc file: OSTYPE(hpux10) ... FEATURE(mailhost.$m) For mailhost, enter the hostname of the sendmail server. 4. Use the m4 macros to build a new /etc/mail/sendmail.cf configuration file. (If you made changes to the existing sendmail configuration file that you want to retrofit to the new configuration file, you should first save the file to another name.) # m4 ../m4/cf.m4 clientproto.mc > /etc/mail/sendmail.cf HP-UX user agents are mail, mailx, and elm. mail is the standard AT&T program, whereas mailx is HPUX's version of BSD's /usr/ucb/mail. The default routing agent is the sendmail program, and the supported delivery agents are /bin/rmail (for local users), UUCP, HP's OpenMail, X.400, and SMTP. You have two ways to configure mail. You can: 106

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125

sendmail
106
2.
Use a text editor to add lines to the file. Each line has the following form:
alias
:
mailing_list
where
alias
is a local address, local user name, or local
alias
, and
mailing_list
is a comma-separated
list of local user names or
aliases
, remote addresses, file names, commands, or included files.
3.
Issue the following command to regenerate the
alias
database from the
/etc/mail/aliases
file:
# /usr/sbin/newaliases
This command creates the
alias
database, which is located in the file
/etc/mail/aliases.db
.
Restarting sendmail
Issue the following commands, on a standalone system or on the mail server, to restart
sendmail
:
# /sbin/init.d/sendmail stop
# /sbin/init.d/sendmail start
Configuring a sendmail Client to Relay All Mail to a Server
As mentioned previously, the default behavior for a
sendmail
client is to forward only local mail to the
sendmail
server for delivery; the client system sends non-local mail directly to remote systems. If you want
the client to relay all mail (local and non-local) to the
sendmail
server, you will need to build a new
sendmail.cf
file using the
m4
macros (a set of library routines used to create customized
sendmail
configuration files). Follow these steps to create a new
sendmail.cf
file:
1.
Change directory to the
/usr/newconfig/etc/mail/cf/cf
directory:
# cd /usr/newconfig/etc/mail/cf/cf
2.
Copy the file
examples/clientproto.mc
to this directory:
# cp examples/clientproto.mc.
3.
Edit the following statements in the
clientproto.mc
file:
OSTYPE(hpux10)
...
FEATURE(mailhost.$m)
For
mailhost
, enter the hostname of the
sendmail
server.
4.
Use the
m4
macros to build a new
/etc/mail/sendmail.cf
configuration file. (If you made changes to
the existing
sendmail
configuration file that you want to retrofit to the new configuration file, you
should first save the file to another name.)
# m4 ../m4/cf.m4 clientproto.mc > /etc/mail/sendmail.cf
HP-UX user agents are
mail
,
mailx
, and
elm
.
mail
is the standard AT&T program, whereas
mailx
is HP-
UX±s version of BSD±s
/usr/ucb/mail
. The default routing agent is the
sendmail
program, and the
supported delivery agents are
/bin/rmail
(for local users), UUCP, HP±s OpenMail, X.400, and SMTP.
You have two ways to configure
mail
. You can: