Вы находитесь на странице: 1из 1

Configuring Sendmail SMTP Server and Client on Solaris 10

Here is a sample configuration of a Solaris 10 SMTP server.


# cd /etc/mail/cf/cf
# cp main.mc new.mc
# vi new.mc
divert(0)dnl
VERSIONID(`@(#)sendmail.mc 1.11 (Sun) 06/21/04')
OSTYPE(`solaris8')dnl
DOMAIN(`solaris-generic)dnl
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA)
DAEMON_OPTIONS(`Port=smtp,Addr=192.168.2.250, Name=MTA)
MASQUERADE_AS(`mycompany.com)
FEATURE(masquerade_envelope)
MAILER(`local)dnl
MAILER(`smtp)dnl
#PATH=/usr/bin:/sbin:/usr/local/bin:/usr/openwin/bin:/usr/dt/bin
#LD_LIBARAY_PAT=/lib:/usr/lib:/usr/local/lib
# /usr/ccs/bin/make new.cf
# cp new.cf /etc/mail/sendmail.cf
#PATH=$PATH:/usr/sbin
# svcadm restart sendmail
The DAEMON_OPTIONS lines will configure your SMTP server to forward mail
that is sent to either of those IP addresses. The assumption here is that
this server has an IP address of 192.168.2.250 and other mail clients will
be sending mail to this system for forwarding.
If you only want this
system to forward its own mail, and reject other client mail forward
requests, then get rid of the second line.

And here is a sample sendmail client configuration that will forward its
mail through this sever.
# cd /etc/mail/cf/cf
# cp main.mc new.mc
# vi new.mc
divert(0)dnl
VERSIONID(`@(#)sendmail.mc 1.11 (Sun) 06/21/04')
OSTYPE(`solaris8')dnl
DOMAIN(`solaris-generic)dnl
define(`SMART_HOST, `192.168.2.250)dnl
MASQUERADE_AS(`mycompany.com)
FEATURE(`masquerade_envelope)
MAILER(`local)dnl
MAILER(`smtp)dnl
#PATH=/usr/bin:/sbin:/usr/local/bin:/usr/openwin/bin:/usr/dt/bin
#LD_LIBARAY_PAT=/lib:/usr/lib:/usr/local/lib
# /usr/ccs/bin/make new.cf
# cp new.cf /etc/mail/sendmail.cf
#PATH=$PATH:/usr/sbin
# svcadm restart sendmail

Вам также может понравиться