# Unable to receive incoming emails



## albsallu (Sep 10, 2009)

I am unable to receive emails from outside my network. I can send, but I can't receive anything coming from the outside. I have tried to telnet my server health.umd.edu but unable to telnet that server. It was working fine not until this morning. I have try restarting my server and tried postfix stop and start. Please help


----------



## DutchDaemon (Sep 10, 2009)

What is the output of [cmd=]sockstat -l4p25[/cmd]?


----------



## honk (Sep 10, 2009)

Could be a problem with the internet connection of the server health.umd.edu?!

Could you give us some more details about your problem, your setup and what you already did to troubleshoot the problem?


----------



## albsallu (Sep 10, 2009)

I have try the right command again and got this:

```
%sockstat -l4p25
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
%
```


----------



## DutchDaemon (Sep 10, 2009)

From the outside, any connection to that server (regular traceroute, and connections to ports 21, 22, 25, 80, etc.) drop dead at a UMD core router (Gi1-1.ptx-dual-r1.net.umd.edu (128.8.0.26). Nothing after that hop.


----------



## honk (Sep 10, 2009)

Your mailserver is not running/listening on port 25. Check the logfile of your mailserver (postfix).


----------



## DutchDaemon (Sep 10, 2009)

[cmd=]pgrep postfix[/cmd] is probably silent?


----------



## albsallu (Sep 10, 2009)

Should I run the command pgrep postfix?


----------



## DutchDaemon (Sep 10, 2009)

Just to make sure Postfix is not running at all.


----------



## albsallu (Sep 10, 2009)

I did a postfix start and it seems to run


----------



## albsallu (Sep 10, 2009)

so the command pgrep postfix is to check if postfix is silent?


----------



## DutchDaemon (Sep 10, 2009)

No, that command should give you the process id of Postfix, if it is running.

Anyway, [cmd=]/usr/local/etc/rc.d/postfix status[/cmd] will serve the same purpose. If that says Postfix is not running, run [cmd=]/usr/local/etc/rc.d/postfix rcvar[/cmd] to see whether you have the correct settings.


----------



## albsallu (Sep 10, 2009)

I just did a netstat and the only ports listening are the following ports:

```
%netstat -t -a|grep LISTEN
tcp4       0      0  *.pop3pw               *.*                    LISTEN
tcp4       0      0  *.ftp                  *.*                    LISTEN
tcp4       0      0  health.1003            *.*                    LISTEN
tcp4       0      0  *.imaps                *.*                    LISTEN
tcp4       0      0  *.imap                 *.*                    LISTEN
tcp4       0      0  localhost.10023        *.*                    LISTEN
tcp4       0      0  localhost.783          *.*                    LISTEN
%
```


----------



## albsallu (Sep 10, 2009)

```
%/usr/local/etc/rc.d/postfix status
postfix is running as pid 576.
%
```


```
%/usr/local/etc/rc.d/postfix rcvar
# postfix
$postfix_enable=YES
%
```


----------



## DutchDaemon (Sep 10, 2009)

So, still nothing in [cmd=]sockstat -l4p 25[/cmd]? What is the output of [cmd=]/usr/local/etc/rc.d/postfix rcvar[/cmd] and [cmd=]ps axww | grep postfix[/cmd]?

Please put 

```
tags[/url] around the output
```


----------



## albsallu (Sep 10, 2009)

These are the output:


> %sockstat -l4p 25
> USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
> root     master     1028  11 tcp4   *:25                  *:*
> %





> %/usr/local/etc/rc.d/postfix rcvar
> # postfix
> $postfix_enable=YES
> %





> %ps axww | grep postfix
> 1028  ??  Is     0:00.05 /usr/local/libexec/postfix/master


----------



## albsallu (Sep 10, 2009)

```
%netstat -t -a | grep LISTEN
tcp4       0      0  *.smtp                 *.*                    LISTEN
tcp4       0      0  *.pop3pw               *.*                    LISTEN
tcp4       0      0  *.ftp                  *.*                    LISTEN
tcp4       0      0  health.1003            *.*                    LISTEN
tcp4       0      0  *.imaps                *.*                    LISTEN
tcp4       0      0  *.imap                 *.*                    LISTEN
tcp4       0      0  localhost.10023        *.*                    LISTEN
tcp4       0      0  localhost.783          *.*                    LISTEN
%
```


----------



## albsallu (Sep 10, 2009)

Do I have to restart postgrey as well because I have this error when I try to restart it:


```
%postgrey start
ERROR: --unix or --inet must be specified
%
```


----------



## albsallu (Sep 10, 2009)

Any time I run tail -f /var/log/maillog, I get the following:

Sep 10 17:03:37 health postfix/local[1221]: warning: database /etc/aliases.db is older than source file /etc/aliases

What does this mean


----------



## DutchDaemon (Sep 10, 2009)

Well, Postfix is listening on port 25 now anyway. I don't use postgrey (or even postfix), so I'll have to point you to the manual for that:

postgrey(1)


----------



## albsallu (Sep 10, 2009)

I am not using postgrey neither. I still have not resolve the problem with receiving emails from outside


----------



## DutchDaemon (Sep 10, 2009)

newaliases(1)


----------



## albsallu (Sep 10, 2009)

Do you think I should update the postfix ports?


----------



## albsallu (Sep 10, 2009)

This is my config file


```
%postconf -n
body_checks = regexp:/usr/local/etc/postfix/body_checks
bounce_queue_lifetime = 2d
command_directory = /usr/local/sbin
config_directory = /usr/local/etc/postfix
daemon_directory = /usr/local/libexec/postfix
debug_peer_level = 2
header_checks = regexp:/usr/local/etc/postfix/header_checks
home_mailbox = Maildir/
html_directory = no
mail_owner = postfix
mailq_path = /usr/local/bin/mailq
manpage_directory = /usr/local/man
maximal_queue_lifetime = 2d
message_size_limit = 15360000
mydomain = test.com
myhostname = mail.test.com
mynetworks = 148.8.194.0/24
myorigin = $mydomain
newaliases_path = /usr/local/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail
setgid_group = maildrop
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_delay_reject = yes
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks,   check_helo_access hash:/usr/local/etc/postfix/helo_access,   reject_invalid_helo_hostname,   reject_non_fqdn_helo_hostname
smtpd_recipient_restrictions = permit_mynetworks,   check_sender_access hash:/usr/local/etc/postfix/sender_access,   check_recipient_access hash:/usr/local/etc/postfix/recipient_access,   reject_unauth_destination,   reject_non_fqdn_recipient,   reject_unknown_recipient_domain,   reject_unlisted_sender,   reject_rbl_client bl.spamcop.net,   reject_rbl_client cbl.abuseat.org,   reject_rbl_client combined.njabl.org,   reject_rbl_client l2.spews.dnsbl.sorbs.net,   reject_rbl_client list.dsbl.org,   reject_rbl_client sbl-xbl.spamhaus.org,   check_policy_service inet:127.0.0.1:10023
smtpd_sender_restrictions = permit_mynetworks,   reject_non_fqdn_sender,   reject_unknown_sender_domain
unknown_local_recipient_reject_code = 550
%
```


----------



## DutchDaemon (Sep 10, 2009)

Are you using made-up data? Why would 'health.umd.edu' relay email for Milwaukee Area Technical College?


----------



## albsallu (Sep 10, 2009)

yes I was using made up date. But the problem is being resolved. The ISP actually blocked port 25 mistakenly. Issue is being resolved. Thanks


----------



## DutchDaemon (Sep 10, 2009)

I see. The issues I mentioned in post #5 are indeed resolved now. Traffic goes through.


----------

