DevTech101

DevTech101
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 1.00 out of 5)
Loading...

Create a DNS zone record for Mail (SMTP)

Configure and setup sendmail configuration(mc) file

cd /usr/lib/mail/cf
cp main.mc main.mc-org
>helpfile
cp main.cf main.cf-org
cp sendmail.cf /etc/mail/.
m4 ../m4/cf.m4 main.mc >main.cf
makemap dbm access 

Setup the mc file

Modify the main.mc file
divert(0)dnl
VERSIONID(`sendmail.mc (Sun)')
OSTYPE(`solaris11')dnl
DOMAIN(`solaris-generic')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(`mailertable', `dbm -T /etc/mail/mailertable')dnl

MAILER(`local')dnl
MAILER(`smtp')dnl


define(`SMART_HOST', `external.domain.com')dnl

LOCAL_NET_CONFIG
R$* < @ $* .$m. > $*	$#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3

compile the main.mc file

m4 ../m4/cf.m4 main.mc >main.cf

restart sendmail

Change sendmail to listen on all interfaces(not only localhost)
svccfg -s svc:/network/smtp:sendmail setprop config/local_only=false
svcadm refresh svc:/network/smtp:sendmail
svcadm restart svc:/network/smtp:sendmail svc:/network/sendmail-client:default

Update all client servers with the latest mail server

grep ^DS */root/etc/mail/sendmail.cf
cd /rpool/zones
for i in `ls */root/etc/mail/sendmail.cf`; do \
perl -p -i -e 's,^DSsmtp:smtp1.domain.com:smtp2.domain.com,DSsmtp:smtp3.domain.com:smtp4.domain.com,' $i; done

#Restart sendmail on all zones
for i in `ls`; do zlogin $i svcadm restart sendmail; done
You might also like. Sendmail SMTP Mail Server Configuration on Solaris
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
%d bloggers like this: