LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   postfix not receiving email from the outside world (http://www.linuxquestions.org/questions/linux-server-73/postfix-not-receiving-email-from-the-outside-world-806551/)

zeos386sx 05-07-2010 03:30 PM

postfix not receiving email from the outside world
 
i can't receive outside emails on a postfix server. i was able to get it to send emails with help in this thread. i can telnet into it via localhost, but not via domain name.

Code:

[root@cent ~]# telnet gandacomputers.com 25
Trying 24.155.13.116...
Connected to gandacomputers.com (24.155.13.116).
Escape character is '^]'.
Connection closed by foreign host.
[root@cent ~]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 cent.gandacomputers.com ESMTP Postfix
ehlo gandacomputers.com
250-cent.gandacomputers.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
quit
221 2.0.0 Bye
Connection closed by foreign host.
[root@cent ~]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = amavisfeed:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = gandacomputers.com, localhost.gandacomputers.com, localhost
mydomain = gandacomputers.com
myhostname = cent.gandacomputers.com
mynetworks = 192.168.1.0/24, 127.0.0.0/8, 24.155.13.0/23
myorigin = gandacomputers.com
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
relayhost = [66.90.130.73]:25
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP $mail_name
unknown_local_recipient_reject_code = 550
[root@cent ~]# dig gandacomputers.com mx

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> gandacomputers.com mx
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19888
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 4

;; QUESTION SECTION:
;gandacomputers.com.            IN      MX

;; ANSWER SECTION:
gandacomputers.com.    600    IN      MX      10 gandacomputers.com.

;; AUTHORITY SECTION:
gandacomputers.com.    46841  IN      NS      ns9.san.yahoo.com.
gandacomputers.com.    46841  IN      NS      yns1.yahoo.com.
gandacomputers.com.    46841  IN      NS      ns8.san.yahoo.com.
gandacomputers.com.    46841  IN      NS      yns2.yahoo.com.

;; ADDITIONAL SECTION:
ns8.san.yahoo.com.      5333    IN      A      98.136.43.32
ns9.san.yahoo.com.      5333    IN      A      66.196.84.168
yns1.yahoo.com.        70358  IN      A      98.136.43.32
yns2.yahoo.com.        70358  IN      A      66.196.84.168

;; Query time: 48 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Fri May  7 15:29:26 2010
;; MSG SIZE  rcvd: 200


AlucardZero 05-07-2010 03:50 PM

post: netstat -nap | grep :25

zeos386sx 05-07-2010 04:00 PM

Code:

[root@cent ~]# netstat -nap | grep :25
tcp        0      0 0.0.0.0:25                  0.0.0.0:*                  LISTEN      8147/master


AlucardZero 05-07-2010 05:01 PM

Post: the contents of /etc/hosts
and: /sbin/ifconfig -a (I want to see if cent actually owns and uses 24.155.13.116)

Do you have a firewall? Is it configured to allow port 25 inbound from the internet?

zeos386sx 05-07-2010 05:09 PM

hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6

this server is behind nat with port 25 forwarded to it and 24.155.13.116 is the public ip, i added it to dns and mx for the domain.

[root@cent ~]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:0C:29:9E:97:E3
inet addr:192.168.1.65 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe9e:97e3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:223962 errors:7 dropped:10 overruns:0 frame:0
TX packets:326945 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:51274049 (48.8 MiB) TX bytes:428242983 (408.4 MiB)
Interrupt:177 Base address:0x1400

AlucardZero 05-07-2010 05:13 PM

On cent, does "telnet 192.168.1.65 25" work?

From different machine on your LAN, does "telnet 192.168.1.65 25" work?

Check your port forwarding, make sure it is forwarding 25 to 192.168.1.65.

zeos386sx 05-10-2010 12:18 PM

Quote:

Originally Posted by AlucardZero (Post 3960809)
On cent, does "telnet 192.168.1.65 25" work?

yes

Quote:

Originally Posted by AlucardZero (Post 3960809)
From different machine on your LAN, does "telnet 192.168.1.65 25" work?

yes

Quote:

Originally Posted by AlucardZero (Post 3960809)
Check your port forwarding, make sure it is forwarding 25 to 192.168.1.65.

it is forwarded properly.

AlucardZero 05-10-2010 01:11 PM

Does your ISP block inbound port 25?

If you switch everything to port 26 (incl the port forwarding etc), does it work?

zeos386sx 05-10-2010 02:29 PM

Quote:

Originally Posted by AlucardZero (Post 3963582)
Does your ISP block inbound port 25?

not sure

Quote:

Originally Posted by AlucardZero (Post 3963582)
If you switch everything to port 26 (incl the port forwarding etc), does it work?

locally yes; by domain or public ip no

edit: just for laughs i tried disabling the firewall on the server and i still get the same problem when trying to connect by domain name.


All times are GMT -5. The time now is 06:36 PM.