• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to configure postifx smtp relay in CentOS/RHEL 5 and 6

By admin

The post is to illustrate the steps to configure the smtp relay using postfix on CentOS/RHEL 5 and 6.

For relaying mail through another smtp server, /etc/postfix/main.cf file has to be configured with “relayhost” parameter which specifies the destination smtp server.

1. Install the postfix rpm if not installed already.

# rpm -qa|grep postfix

2. Take a backup of the default configuration:

# cp /etc/postfix/main.cf /etc/postfix/main.cf.bkp_default

3. Edit the /etc/postfix/main.cf and append/modify the following parameter on the configuration.

myhostname = [hostname-of-server]
relayhost = [IP Address/Hostname of relay server] 

4. Restart postfix service to make the changes effect.

# service postfix restart

5. Verify the mail relay using telnet/mail(mailx) commands.

Linux / UNIX : How to send mails with attachments using mailx command
UNIX / Linux : How to install and configure mutt
UNIX / Linux : Send mail with attachment using mutt

Filed Under: CentOS/RHEL 5, CentOS/RHEL 6, Linux

Some more articles you might also be interested in …

  1. How to monitor /etc/shadow and /etc/passwd file for changes with Auditd?
  2. Common Init.ora Parameters and Unix, Linux Kernel Parameters and Relationship Between Them
  3. CentOS / RHEL 5,6 : How to Change the timezone
  4. crontab error : “You (user) are not allowed to access to (crontab) because of pam configuration.”
  5. Understanding OS load average and run queue/blocked queue in terms of CPU utilization in Linux
  6. CentOS / RHEL : How to delete LVM volume
  7. CentOS / RHEL 7 : Unable To Start The Samba Service
  8. Red Hat / CentOS : How to create interface / NIC bonding
  9. How to Change the Default Timeout Settings for Telnet Session in CentOS/RHEL
  10. Downloading a Specific Version of Package and Its Dependencies from Repository for Offline Installation Using YUM

You May Also Like

Primary Sidebar

Recent Posts

  • What are different Oracle Database Vault Roles
  • Unable to export realm protected table using data pump
  • Beginners Guide to Oracle Database Vault
  • How to Disable IPv6 on Ubuntu 18.04 Bionic Beaver Linux
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary