Wednesday, 4 September 2013

Configuring SMTP (POSTFIX)


  1. #yum install postfix
  2. #service postfix restart
  3. #chkconfig postfix on
  4. #vim /etc/postfix/main.cf
    1. Line 83 --> Uncomment & put domain name
      1. mydomain=example.com
    2. Line 99 --> Uncomment & put domain name
      1. myorigin=example.com
    3. Line 113 --> Uncomment
      1. inet_interfaces=all
    4. Line 116 --> Comment it
      1. #inet_interfaces=localhost
    5. Line 164 --> Comment it
      1. #mydestination=$myhostname,localhost,$mydomain,localhost
    6. Line 165 --> Uncomment
      1. mydestination=$myhostname,localhost.$mydomain,localhost,$mydomain
  5. #service postfix restart
  6. Forward the mail from hr@example.com to employee@example.com
  7. #vim /etc/postfix/virtual  
    1. Go to last line (shift+g) and append following:
    2. hr@example.com     employee@example.com
  8. Copy Line 158-159 of /etc/postfix/virtual & Paste in the end of /etc/postfix/virtual and Uncomment it
  9. #vim /etc/postfix/virtual
  10. #postmap /etc/postfix/main.cf
  11. Create alias for hr for employee, like any mail coming to hr@example.com should be delivered to employee@example.com as well
  12. #vim /etc/aliases
    1. Go to last line, append following
    2. hr :     employee

1 comment:

  1. 8. Copy Line 158-159 of /etc/postfix/virtual & Paste in the end of /etc/postfix/main.cf and Uncomment it.

    Other than, your blog is excellent.

    ReplyDelete