Not sure if inbound emails are on my server.

Discussion in 'Server Operation' started by hbtousa, Nov 5, 2010.

  1. hbtousa

    hbtousa New Member

    I did not install anything myself. The postfix wasn't working at all as far as inbound/outbound email; I got the outbound and local email working. I am having problems with inbound email. Last thing I did yesterday was setting up Iptables. I run MXtoolbox and the results are telling me that my port 25 is not open. I am not an expert reading the mail log, but I am not sure the incoming mail is stuck on my server ready to be delivered.
    Thanks

    I noticed, based on old posts a request for hostname and host name -f. On my case both are the same. Is this supposed to be like this?
    [[email protected] etc]# hostname
    mail.mysite.com
    [[email protected] etc]# hostname -f
    mail.mysite.com
    [[email protected] etc]#
     

    Attached Files:

    Last edited: Nov 5, 2010
  2. falko

    falko Super Moderator ISPConfig Developer

    The netstat output looks ok. Are there any Postfix errors in your mail log?
    Also make sure that the MX record of your domain points to the correct server. You can check that with
    Code:
    dig mx yourdomain.com
     
  3. hbtousa

    hbtousa New Member

    Dig and Iptables

    Dig shows the output below. I also included after the results my iptables

    [[email protected] ~]# dig mx mysite.com

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

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

    ;; ANSWER SECTION:
    mysite.com. 14400 IN MX 1 mail.mysite.com.

    ;; Query time: 55 msec
    ;; SERVER: 205.152.144.23#53(205.152.144.23)
    ;; WHEN: Sat Nov 6 10:41:45 2010
    ;; MSG SIZE rcvd: 58

    ******iptables****
    [[email protected] ~]# iptables -L -v
    Chain INPUT (policy ACCEPT 4618K packets, 265M bytes)
    pkts bytes target prot opt in out source destination
    0 0 ACCEPT tcp -- any any anywhere adsl-074-164 -099-299.sip.bct.bellsouth.net tcp spts:1024:65535 dpt:smtp state NEW,ESTABLISHE D
    50 2942 ACCEPT tcp -- any any anywhere anywhere tcp dpt:smtp
    42 2096 ACCEPT tcp -- any any anywhere anywhere tcp dpt:submission

    Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
    pkts bytes target prot opt in out source destination

    Chain OUTPUT (policy ACCEPT 8627K packets, 13G bytes)
    pkts bytes target prot opt in out source destination
    0 0 ACCEPT tcp -- any any adsl-074-164-099-099.sip.bct.bell south.net anywhere tcp spt:smtp dpts:1024:65535 state ESTABLISHED



    Thanks
     
  4. hbtousa

    hbtousa New Member

    What is the meaning of tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 2661/master?

    [[email protected] etc]# netstat -tulpn | less
    tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN 2732/asterisk
    tcp 0 0 192.168.1.107:8088 0.0.0.0:* LISTEN 2732/asterisk
    tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 2661/master
    tcp 0 0 0.0.0.0:4445 0.0.0.0:* LISTEN 2974/perl
    tcp 0 0 0.0.0.0:765 0.0.0.0:* LISTEN 1855/rpc.statd
    tcp 0 0 0.0.0.0:4190 0.0.0.0:* LISTEN 2550/cyrus-master
    tcp 0 0 :::7777 :::* LISTEN 2993/java
    tcp 0 0 :::993 :::* LISTEN 2550/cyrus-master
    tcp 0 0 :::9090 :::* LISTEN 2993/java
    tcp 0 0 :::9091 :::* LISTEN 2993/java
    tcp 0 0 :::995 :::* LISTEN 2550/cyrus-master
    tcp 0 0 :::5222 :::* LISTEN 2993/java
    tcp 0 0 :::5223 :::* LISTEN 2993/java
    tcp 0 0 :::5229 :::* LISTEN 2993/java
    tcp 0 0 :::110 :::* LISTEN 2550/cyrus-master
    tcp 0 0 :::143 :::* LISTEN 2550/cyrus-master
    tcp 0 0 :::80 :::* LISTEN 2686/httpd
    tcp 0 0 :::7443 :::* LISTEN 2993/java
    tcp 0 0 :::5269 :::* LISTEN 2993/java
    tcp 0 0 :::22 :::* LISTEN 2221/sshd
    tcp 0 0 :::25 :::* LISTEN 2661/master
    tcp 0 0 :::443 :::* LISTEN 2686/httpd
    tcp 0 0 :::7070 :::* LISTEN 2993/java
    tcp 0 0 :::4190 :::* LISTEN 2550/cyrus-master
    udp 0 0 0.0.0.0:5000 0.0.0.0:* 2732/asterisk
    udp 0 0 0.0.0.0:2727 0.0.0.0:* 2732/asterisk
    udp 0 0 0.0.0.0:4520 0.0.0.0:* 2732/asterisk
    udp 0 0 0.0.0.0:40000 0.0.0.0:* 2888/iaxmodem
    udp 0 0 0.0.0.0:5060 0.0.0.0:* 2732/asterisk
    udp 0 0 0.0.0.0:69 0.0.0.0:* 2244/xinetd
    udp 0 0 192.168.1.107:4569 0.0.0.0:* 2732/asterisk
    udp 0 0 0.0.0.0:39778 0.0.0.0:* 2922/avahi-daemon:
    udp 0 0 0.0.0.0:5353 0.0.0.0:* 2922/avahi-daemon:
    udp 0 0 0.0.0.0:111 0.0.0.0:* 1818/portmap
    udp 0 0 0.0.0.0:759 0.0.0.0:* 1855/rpc.statd
    udp 0 0 0.0.0.0:762 0.0.0.0:* 1855/rpc.statd
    udp 0 0 192.168.1.107:123 0.0.0.0:* 2261/ntpd
    udp 0 0 127.0.0.1:123 0.0.0.0:* 2261/ntpd
    udp 0 0 0.0.0.0:123 0.0.0.0:* 2261/ntpd
    udp 0 0 :::52054 :::* 2922/avahi-daemon:
    udp 0 0 :::5353 :::* 2922/avahi-daemon:
    udp 0 0 ::1:123 :::* 2261/ntpd
    udp 0 0 :::123 :::* 2261/ntpd





    ****Thanks
     
  5. falko

    falko Super Moderator ISPConfig Developer

    Postfix is listening on all interfaces, so that is fine.

    Have you tried to switch off the firewall for testing purposes?

    Also, does mail.mysite.com point to the correct server? You can check that with
    Code:
    dig mail.mysite.com
     
  6. hbtousa

    hbtousa New Member

    IP tables

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

    ;; QUESTION SECTION:
    ;mail.mysite.com. IN A

    ;; ANSWER SECTION:
    mail.mysite.com. 14400 IN A 74.164.83.99;; Query time: 213 msec
    ;; SERVER: 205.152.144.23#53(205.152.144.23)
    ;; WHEN: Mon Nov 8 12:37:20 2010
    ;; MSG SIZE rcvd: 58

    *******
    If I disconnect the firewall, do I need t get rid of the ip tables?
    iptables -A INPUT -p tcp -s 0/0 --sport 1024:65535 -d 99.99.99.20 --dport 25 -m state --state NEW,ESTABLISHED -j ACCEPT

    iptables -A OUTPUT -p tcp -s 99.99.99.20 --sport 25 -d 0/0 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT


    iptables -A OUTPUT -p tcp -s 99.99.99.20 --sport 1024:65535 -d 0/0 --dport 25 -m state --state NEW,ESTABLISHED -j ACCEPT

    iptables -A INPUT -p tcp -s 0/0 --sport 25 -d 99.99.99.20 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT
    The iptables look like:

    Thanks
     
  7. falko

    falko Super Moderator ISPConfig Developer

    Is this the IP of your server?

    Usually there is an init script in the /etc/init.d directory that you can use to stop the firewall.
     
  8. hbtousa

    hbtousa New Member

    Yes, I changed the last two digits. Instead of 99 is 248.

    *****This is what my dir shows.***
    What file should I use to stop the firewall.Can you please, walk me through?

    [[email protected] init.d]# dir
    acpid firstboot mailman rawdevices
    asterisk functions mcstrans rdisc
    atd generic-cloexec mdmonitor restorecond
    auditd gpm mdmpd rpcgssd
    avahi-daemon haldaemon messagebus rpcidmapd
    avahi-dnsconfd halt multipathd rpcsvcgssd
    capi hsqldb mysqld saslauthd
    crond httpd named single
    cups hylafax netconsole snmpd
    cups-config-daemon iaxmodem netfs snmptrapd
    cyrus-imapd ip6tables netplugd spamassassin
    dahdi iptables network sshd
    dc_client isdn NetworkManager syslog
    dc_server jexec nfs vncserver
    dhcdbd killall nfslock vsftpd
    dhcpd krb524 ntpd wanrouter
    dhcrelay kudzu openfire wdaemon
    dnsmasq LCDd pcscd webmin
    elastixdialer lcdelastix portmap wpa_supplicant
    elastix-firstboot lm_sensors postfix xfs
    elastix-updaterd lvm2-monitor psacct xinetd
     
  9. falko

    falko Super Moderator ISPConfig Developer

    Try
    Code:
    /etc/init.d/iptables stop
    and
    Code:
    /etc/init.d/ip6tables stop
     

Share This Page