Question

I can't receive e-mails

  • Posted November 20, 2013

Hello, I tried to contact the support but it seems they can’t help with config issues. I hope someone will be able to help here.

I followed this tutorial https://www.digitalocean.com/community/articles/how-to-install-postfix-on-centos-6 and I only have email redirects into /etc/postfix/virtual

I’m testing with the email address test@xxxxxxxx.com (redirecting to test@gmail.com) I can:

  • send an email from ssh using the command line “mail test@xxxxxxxx.com”
  • receive this email on my Gmail account
  • send an email from Gmail from test@xxxxxxxx.com to test@xxxxxxxx.com (I think so)
  • send an email from Gmail from test@gmail.com to test@xxxxxxxx.com (I think so) but I can’t :
  • receive the emails from Gmail on my Gmail account

Also, the emails sent through the ssh are received with the sender root@mail.xxxxxxxx.com. Why not test@xxxxxxxx.com?

This is my DNS config:

$TTL 1800 @ IN SOA NS1.DIGITALOCEAN.COM. hostmaster.xxxxxxxx.com. ( 1384969598 ; last update: 2013-11-20 17:46:38 UTC 3600 ; refresh 900 ; retry 1209600 ; expire 1800 ; ttl ) IN NS NS1.DIGITALOCEAN.COM. NS NS2.DIGITALOCEAN.COM. NS NS3.DIGITALOCEAN.COM. MX 5 mail MX 1 ASPMX.L.GOOGLE.COM. MX 5 ALT1.ASPMX.L.GOOGLE.COM. MX 5 ALT2.ASPMX.L.GOOGLE.COM. MX 10 ASPMX2.GOOGLEMAIL.COM. MX 10 ASPMX3.GOOGLEMAIL.COM. @ IN A xxx.xxx.xxx.xxx www CNAME @ @ TXT “v=spf1 ip4:xxx.xxx.xxx.xxx include:_spf.google.com -all”

I get this email back from google

Delivery to the following recipient failed permanently:

 test@xxxxxxxx.com

Technical details of permanent failure: Google tried to deliver your message, but it was rejected by the server for the recipient domain xxxxxxxx.com by aspmx.l.google.com. [2607:f8b0:4002:c01::1a].

The error that the other server returned was: 550-5.1.1 The email account that you tried to reach does not exist. Please try 550-5.1.1 double-checking the recipient’s email address for typos or 550-5.1.1 unnecessary spaces. Learn more at 550 5.1.1 http://support.google.com/mail/bin/answer.py?answer=6596 8si5260891yhq.157 - gsmtp

Thank you for your help

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Technical details of permanent failure: <br>Google tried to deliver your message, but it was rejected by the server for the recipient domain xxxxxxxx.com by aspmx.l.google.com. [2607:f8b0:4002:c01::1a]. <br> <br>This is a big indicator of your problem, I suggest you look over your aliases and make sure that the email address you’re forwarding to is the correct one.

You need to create MX records for your domain: <br> <br>MX, priority 10, hostname: mail

By chance, have you taken a look at <a href=“https://digitalocean.com/community/articles/how-to-set-up-a-postfix-e-mail-server-with-dovecot”>How To Set Up a Postfix E-Mail Server with Dovecot</a>? I realize that it’s written for Debian, but with <a href=“https://digitalocean.com/community/articles/how-to-install-postfix-on-centos-6”>How To Install Postfix on CentOS 6</a>, you should be able to easily apply it to your situation.

By the way, the error message from google is different from my 1st post. <br> <br>Technical details of temporary failure: <br>The recipient server did not accept our requests to connect. Learn more at http://support.google.com/mail/bin/answer.py?answer=7720 <br>[(0) xxxxxxx.com. [xxx.xxx.xxx.xxx]:25: Connection refused] <br>[(5) mail.xxxxxxx.com. [xxx.xxx.xxx.xxx]:25: Connection refused] <br> <br>When I follow the Google link and go to their mx configuring page I get a wrning on ‘SPF MUST allow Google servers to send mail on behalf of domain.’ but the data that provides google is 100% the same I have in my config

Hi, <br>I was wrong it isn’t working :( <br>When I looked for the email in gmail, I actually found the sent email. I thought it was what I received haha <br> <br> <br>Can someone help? <br>Maybe with this? <br> <br>/etc/postfix/main.cf <br>http://pastebin.centos.org/5951/ <br> <br>Thank you

ok thanks all for your help. it seems to be working now :)

<blockquote>“… the emails sent through the ssh are received with the sender root@mail.xxxxxxxx.com. Why not test@xxxxxxxx.com?” </blockquote> <br>That’s normal. You just need to set the From: header to whatever you want it to be: <br><pre>mail [your arguments here, such as -s for the subject and the recipient’s email address] – -f sender@bar.com</pre> <br>Example: <br><pre>mail -s “Test email” your@email.address – -f noreply@yourdomain.com</pre>

Add a DNS record as follows: <br> <br><code>CNAME mail @</code>

Here is what my config looks like: <br> <br>/etc/postfix/main.cf <br>http://pastebin.centos.org/5951/