Home > centOS > centOS – sendmail sendmail.mc private use

centOS – sendmail sendmail.mc private use

How to use default sendmail private use?

1. yum install sendmail-cf

2. vi /etc/mail/sendmail.mc
# uncomment it like this
dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA’)dnl

3. [root@www mail]# m4 sendmail.mc > sendmail.cf.new

4. [root@www mail]# mv sendmail.cf sendmail.cf.ori
[root@www mail]# mv sendmail.cf.new sendmail.cf
[root@www mail]# service sendmail restart
Shutting down sendmail:                                    [FAILED]
Starting sendmail:                                         [  OK  ]
Starting sm-client:                                        [  OK  ]
[root@www mail]#

5. echo “body text” | mail -s “subject text” you@outdomain.com

Done..

When i cant send email to ouside domains? (sendmail send mails to localhost! in that case.)

1.vi sendmail.mc
change the smtp address

2. m4 sendmail.mc sendmail.cf

3. [root@www mail]# service sendmail restart
Shutting down sm-client:                                   [  OK  ]
Shutting down sendmail:                                    [  OK  ]
Starting sendmail:                                         [  OK  ]
Starting sm-client:                                        [  OK  ]
[root@www mail]#

Advertisements
Categories: centOS
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: