RHEL7
Using Postfix (for relay server - LCLS-PROD03 ) *sendmail is deprecated
- cd /etc/postfix/
- cp main.cf main.cf.orig
- edit main.cf
- Changes:
- mydomain = slac.stanford.edu
- relayhost = smtpunix.slac.stanford.edu
- myhostname = lcls-prod03.slac.stanford.edu
- myorigin = $mydomain
- inet_interfaces = all
- #inet_interfaces = localhost
- mynetworks = 172.27.0.0/16, 134.79.151.0/24, 127.0.0.0/8
- postfix check
- systemctl start postfix
- systemctl status postfix
- systemctl enable postfix
- Also, perform: knife node attribute set lcls-prod03.slac.stanford.edu slac_mailgateway leavealone
For Clients:
cd /etc/postfix/
- cp main.cf main.cf.orig
- edit main.cf
- Changes:
- mydomain = slac.stanford.edu
- myorigin = $mydomain
- relayhost = lcls-prod03.slac.stanford.edu
- inet_protocols = ipv4
- postfix check
- systemctl start postfix
- systemctl status postfix
- systemctl enable postfix
|
|
|
We have set up a mail relay server on lcls-prod03
|
- Put mailbox_server in /etc/taylor.opts
- This will add the following to the /etc/mail/sendmail.cf file
- DSsmtpunix.slac.stanford.edu
- Add the following line to /etc/mail/access
- Add the following to /etc/mail/relay-domains
|
On our Private servers: (Done in Kickstart -> "AfterKickstart.sh")
- The "DS" line in /etc/mail/sendmail.cf need to be changed to "DSlcls-prod03.slac.stanford.edu"
- This sets up the Smart Relay to lcls-prod03
- sed -i s/^DS$/DSlcls-prod03.slac.stanford.edu/g /etc/mail/sendmail.cf
- Restart sendmail services
|
How to send mail from our PROD servers:
- Just send email the normal way as all mail will get relayed to lcls-prod03
- brobeck@slac.stanford.edu
- controls-system-admins@slac.stanford.edu
|
|