Do not receive emails from outside

Hello,

I have problem with email server. I'm ok with web server but new to email server.

I have installed Postfix + Cyrus-imapd and SquirrelMail

Have created one email account. I send email from PHP script to support@mazecore.com (same server) and receive this email in SquirrelMail and can download to my Mail client.

But when I send email from google account or other email server it won't arrive to my server.

I added MX record to this domain and opened all ports.

Record type: MX

Record Host: mazecore.com

Record Answer: mazecore.com. (with dot at end)

TTL: 300

Priority (MX only): 100

Any ideas on what's wrong?

Thanks!

6 Replies

Is Postfix running and listening on port 25 on the public interface?

$ telnet mazecore.com 25
Trying 97.107.136.144...
telnet: Unable to connect to remote host: Connection refused

If you're on Debian, Ubuntu or Gentoo, use /etc/init.d/postfix start (I don't remember the command line for other distros).

Postfix is running. I'm sending emails and can connect to port 25 from my server (because it's allow to this IP)

It's open only for selected IP address because 25 is only for sending email.

Should I open this port to everyone?

Yes. SMTP is for both sending and receiving e-mails.

It's listening localhost only:

localhost:smtp

How can I change to *:smtp ?

@snowhall:

Postfix is running. I'm sending emails and can connect to port 25 from my server (because it's allow to this IP)

It's open only for selected IP address because 25 is only for sending email.

Should I open this port to everyone?
Yes, because Gmail is trying to send an e-mail to your server, and it's not on that select list of IP addresses you have.

Keep port 25 open for all, but restrict your configuration so you don't end up becoming an open relay.

The permitmynetworks and rejectunauthdestination parameters for the configuration option smtpdrecipient_restrictions do the trick for you (they are usually the default for Postfix, as I gather).

The mynetworks option can then be used to just allow certain IP addresses and/or network segments to send e-mail to anyone via your server.

@snowhall:

It's listening localhost only:

localhost:smtp

How can I change to :smtp ? Do you have the smtpbindaddress option set to anything in main.cf? If you do, set it to blank or 0.0.0.0* to let Postfix use all interfaces/IPs on your server (localhost, public IP(s) and, if used, private IP).

Thank you very much. It's receiving now!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct