This discussion is archived
6 Replies Latest reply: Feb 6, 2013 11:40 PM by alvaromiranda RSS

postfix setup for OEL 5.6

gpoz Newbie
Currently Being Moderated
All,

I am interested in configuring psotfix + any related stuff needed for allowing my home system (198.162.1.105) to send email (not concerned if it can receive) to my yahoo/gmail accounts. This is because I would like to set up APEX to send emails, although I know that part is a matter for the APEX forum. But, of course, I have searched for documentation; some sound so simplistic, some rather involved, wouldn't surprise me if there are some variant-specific setup tweaks, which is why I ask here.

Where may I find documentation that will help with the right setup for my needs on this version of OEL? Please do not supply the URL to Google, been there.
  • 1. Re: postfix setup for OEL 5.6
    gpoz Newbie
    Currently Being Moderated
    sorry, I meant 192.168.1.105, this is on my LAN, and I do have DSL to work with.
  • 2. Re: postfix setup for OEL 5.6
    Dude! Guru
    Currently Being Moderated
    The following works for me for using gmail:

    Install the software:
    su - root
    wget http://public-yum.oracle.com/public-yum-el5.repo \
      --output-document=/etc/yum.repos.d/public-yum-el5.repo
    
    yum -y install postfix
    chkconfig sendmail --del
    chkconfig postfix --add
    Configure postfix smtp authentication. Use your own username and password credentials and use the echo command with single quotes ('):
    echo 'smtp.gmail.com username:password' > /etc/postfix/sasl_passwd
    postmap hash:/etc/postfix/sasl_passwd
    rm -f /etc/postfix/sasl_passwd
    Configure postfix relay and authentication:
    cat >> /etc/postfix/main.cf <<EOF
    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtp_sasl_security_options = noanonymous
    smtp_tls_security_level = secure
    smtp_tls_mandatory_protocols = TLSv1
    smtp_tls_mandatory_ciphers = high
    smtp_tls_secure_cert_match = nexthop
    smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
    relayhost = smtp.gmail.com:587
    EOF
    Restart postfix
    service postfix restart
    Mail test:
    echo "testmail " | mail -s "test" username@gmail.com
    Troubleshooting:
    tail /var/log/maillog
  • 3. Re: postfix setup for OEL 5.6
    gpoz Newbie
    Currently Being Moderated
    thank you, Dude, as soon as I can try it on my system, I'll be sure to give points. I appreciate the insights.
  • 4. Re: postfix setup for OEL 5.6
    gpoz Newbie
    Currently Being Moderated
    well, this offering looked very helpful at the front end, but I've run into a snag, in that my static IP setting 192.168.1.105 does not allow my system to take advantage of DHCP, and tuhs I lose my connection to outside. How can this be addresssed?
  • 5. Re: postfix setup for OEL 5.6
    Dude! Guru
    Currently Being Moderated
    Sorry please explain. I have no idea what DHCP or static IP as such has to do with relaying your mail for outgoing connections? If your machine can connect to the Internet, the above should work. If you cannot connect to the Internet with your IP setup, that's a completely different story and needs to be addressed separately. If your service provider gives you an IP address for your router and provides NAT services than any private IP will work as long as you use your DSL router as your TCP/IP gateway.
  • 6. Re: postfix setup for OEL 5.6
    alvaromiranda Explorer
    Currently Being Moderated
    to check if your network have connection to internet for mail, do

    dig mx gmail.com

    telnet gmail-smtp-in.l.google.com 25

    type helo

    type quit

    if you see prompts, then you should be able to mail outside.

    if the ip with you get internet doesn't match the domain of the same, your emails will probably get mark as spam..

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points