0

I'm trying to set up a simple mail service in my Ubuntu server, but I'm having the most difficult time setting it up correctly.

I have followed the steps in Ubuntu's Postfix guide but I'm still having trouble.

Here are my test cases.

Seeing this, I automatically think that my MX record setting is incorrect. But I don't think that is the case as as I have consulted various other people and examples and they seems to be correct. And yes I have waited at least 24 hours between changes for flushing DNS records.

I Have no idea what to do any more and any guidance or trouble shooting guide would be appreciated.

Thank you,

-- EDIT 5/5/2013 8:34 PM

I had a drop all other ports prior to the command to open SMTP. I did not know the order of the iptable command matters...

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http-alt
DROP       all  --  anywhere             anywhere            
*ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:smtp*

Chain FORWARD (policy DROP)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination    
8
  • Is 25/tcp open on your firewall? Is postfix listening there? What does your mail log say when you try and send a message from an external server?
    – EEAA
    Apr 24, 2013 at 4:28
  • Port 25 is open. And how do I know what port post fix is listening to?
    – Anatoli
    Apr 24, 2013 at 4:34
  • And "The recipient server did not accept our requests to connect." is what I get in my personal gmail when I try to send email to myserver from gmail
    – Anatoli
    Apr 24, 2013 at 4:36
  • 2
    Very poorly stated question. Lacks of valuable info and so. In case you want play questio-answers ping-pong, you'd better pay for it. I'll vote for close when bounty expires.
    – poige
    May 1, 2013 at 5:04
  • 1
    Please post your postfix configuration. And check if the inet_interfaces=all is set.
    – Peter
    May 1, 2013 at 7:20

4 Answers 4

3
+100

Here's the troubleshooting steps I would try:

  1. Check the logs for hints.
  2. Do a "netstat -lvtn" on the mail server as root, see if the postfix process is attached to port 25.
  3. From the local server: "telnet localhost 25" Verify that you get a 250 reply after a few seconds.
  4. From a remote server elsewhere on the Internet and/or one on the same network: "telnet myserver.com 25" look for identical results
  5. If either step fails something is blocking the port, or postfix is failing.

It is very likely that either your local firewall is blocking port 25, or your Internet provider is doing so.

3
  • Clarification: postfix must be listening on port 25 on all interfaces, or on the ethernet interface. Not (only) on 127.0.0.1.
    – Wodin
    May 5, 2013 at 7:49
  • It was number 4 where I failed...
    – Anatoli
    May 6, 2013 at 1:08
  • That means that most likely your ISP is blocking incoming port 25, presumably to cut down on spam. You need to talk to them about opening it for you.
    – Jenny D
    May 7, 2013 at 6:56
1

In /etc/postfix/main.cf, check mydestination, it should look like the following

mydestination = myServer.com, localhost.localdomain, localhost

myServer.com(your real domain) must be there. If not, edit that line and restart postfix.

If that is not the case, please post /etc/postfix/main.cf and /etc/postfix/master.cf in your question.

0

How many MX record do you have and what is priority of them? Can you post here.

If you receive "The recipient server did not accept our requests to connect.", It means that the google mail can not connect to your mail server or It had connected to wrong mail server, It didn't connect to your postfix server.

Did you try "telnet x.x.x.x 25" where x.x.x.x is the public ip of postfix server?

0

In /etc/postfix/manin.cf, check smtpd_client_restrictions maybe you only accept local connections.

The default is to allow all connection requests.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .