Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I just configured a mail server and tried sending a mail to my gmail account with a local email I created with my mail servers DNSs. I didn't go well. I use Redhat server and sendmail and the testing was done with evolution mail.

I had the following error :

"RCPT TO<mygmail@gmail.com> failed: <mygmail@gmail.com>...
  relaying temporarily denied. Cannot resolve PTR for my IP"

How can I solve this?

share|improve this question

1 Answer 1

I put this together for myself a long time ago, give it a try and see if it still works. In a terminal window, type:

sudo aptitude install postfix libsasl2 ca-certificates mailx
sudo gedit /etc/postfix/main.cf

then add/change this in main.cf:

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no
relayhost = [smtp.gmail.com]:587
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_note_starttls_offer = yes
tls_random_source = dev:/dev/urandom
smtp_tls_scert_verifydepth = 5
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtpd_use_tls=yes
smtp_use_tls = yes
smtpd_tls_ask_ccert = yes
smtpd_tls_req_ccert =no
smtp_tls_enforce_peername = no
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

edit the /etc/postfix/sasl_passwd to setup your username and password:

sudo gedit /etc/postfix/sasl_passwd


[smtp.gmail.com]:587    user.name@gmail.com:password

Then do:

sudo chmod 400 /etc/postfix/sasl_passwd
sudo postmap /etc/postfix/sasl_passwd
cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem | sudo tee -a /etc/postfix/cacert.pem
sudo /etc/init.d/postfix restart
share|improve this answer
    
thanks for cleaning that up. I am still trying to figure out all the editing quirks for the answer window. –  Dave York Sep 11 '12 at 15:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.