LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-22-2010, 11:24 PM   #16
willcastle
Member
 
Registered: Sep 2010
Location: Philippines
Distribution: Centos
Posts: 63

Original Poster
Rep: Reputation: 0

Code:
[root@porto ~]# netstat aux | grep postfix
usage: netstat [-veenNcCF] [<Af>] -r         netstat {-V|--version|-h|--help}
       netstat [-vnNcaeol] [<Socket> ...]
       netstat { [-veenNac] -I[<Iface>] | [-veenNac] -i | [-cnNe] -M | -s } [delay]

        -r, --route                display routing table
        -I, --interfaces=[<Iface>] display interface table for <Iface>
        -i, --interfaces           display interface table
        -g, --groups               display multicast group memberships
        -s, --statistics           display networking statistics (like SNMP)
        -M, --masquerade           display masqueraded connections

        -v, --verbose              be verbose
        -n, --numeric              don't resolve names
        --numeric-hosts            don't resolve host names
        --numeric-ports            don't resolve port names
        --numeric-users            don't resolve user names
        -N, --symbolic             resolve hardware names
        -e, --extend               display other/more information
        -p, --programs             display PID/Program name for sockets
        -c, --continuous           continuous listing

        -l, --listening            display listening server sockets
        -a, --all, --listening     display all sockets (default: connected)
        -o, --timers               display timers
        -F, --fib                  display Forwarding Information Base (default)
        -C, --cache                display routing cache instead of FIB
        -T, --notrim               stop trimming long addresses
        -Z, --context              display SELinux security context for sockets

  <Iface>: Name of interface to monitor/list.
  <Socket>={-t|--tcp} {-u|--udp} {-S|--sctp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom
  <AF>=Use '-A <af>' or '--<af>'; default: inet
  List of possible address families (which support routing):
    inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25)
    netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP)
    x25 (CCITT X.25)
this is the output.

Last edited by willcastle; 09-27-2010 at 09:48 PM.
 
Old 09-22-2010, 11:40 PM   #17
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,143
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
In [root@porto ~]# netstat aux | grep postfix ; you missed -

it should be netstat -aux | grep postfix

You can also try this:

Code:
netstat -an | grep 25 | grep -i tcp
 
Old 09-22-2010, 11:53 PM   #18
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,143
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
You said you have pfsense firewall in In your mailserver

pfSense is a web-based firewall

Access it from web interface and see if the port 25 enable or not

refer this link:

http://202.143.130.99/files/transparent_firewall.pdf
 
Old 09-23-2010, 11:25 PM   #19
willcastle
Member
 
Registered: Sep 2010
Location: Philippines
Distribution: Centos
Posts: 63

Original Poster
Rep: Reputation: 0
netstat -an | grep 25 | grep -i tcp
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
[root@porto ~]# netstat -an | grep 110 | grep -i tcp
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN

Hi,
This is the output. What do you make of this?
 
Old 09-23-2010, 11:40 PM   #20
willcastle
Member
 
Registered: Sep 2010
Location: Philippines
Distribution: Centos
Posts: 63

Original Poster
Rep: Reputation: 0
Hi,

I don't know what's the problem, I contacted our ISP and they said that they are not blocking any ports. I also contacted our domain host they said the same thing. The email server is in our office(btw).

The outgoing mail has no problem. It can send emails anywhere. The problem is incoming mail we cannot receive any mail. I'm always testing emails but I still cannot receive anything to our company mail.

"Recipient address rejected: Destination .PH Domain does not exist or has expired. Please check for typographical errors in the recipient email address. [RCPT_TO]"

This was sent to my yahoo mail whenever I test email to our company mail. That's why I contacted our domain host and they said that there's no problem with our account. And they said check our mail servers and firewall.

So please help me with my problem.

Thanks in advance.

Last edited by willcastle; 09-23-2010 at 11:59 PM.
 
Old 09-24-2010, 04:23 AM   #21
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Ubuntu 10.10, Slackware 64-current
Posts: 2,124

Rep: Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778
Sorry about the -aux thing. My system (ubuntu) complains when you put the - in there, though it does list it in the help (???)
Anyway, to recap what we know so far: your ISP is not blocking the ports, you are not being blocked by a firewall (Iptables) and you have applications listening on ports 25 and 110. This is all good and necessary in order for your mail system to work. There are just a lot of different things that need to be checked because mail servers are pretty complex setups. At this point it looks like you have a mis configured server, which is where we need to start looking.

The mail receive function in postfix can also be a bit complex due to its flexibility. You can have both virtual users and system users. as well as multiple forms of delivery. There are also multiple ways you can specify the list of users: you can put it in recipient hash or you can use a database lookup. At this point, the error message you received looks like you tried to send mail to an invalid user, at least as far as postfix is concerned. There are two pieces of information that would be valuable to us at this point in helping to figure out what is going on, your main.cf (possibly master.cf too) and an excerpt from your postfix log showing what is happening. The main.cf file specifies things like who you should receive mail for, any aliases, your domains, etc and the postfix log should help show what the problem is. Since you have an application listening on port 25, you don't have a gross error that is sever enough to keep it from running, but you may have something keeping it from properly receiving.

I would suggest the following: 1 - restart postfix and dovecot and look at your syslog and mail.log. Typically these are in a place like /var/log, but there may be some variation. See if there are any error or warning messages towards the bottom. The entries are time and date stamped as well as listed with the application so you should be able to see the entries related to your actions. If you see anything 'interesting' please post it. Second, try to send yourself a message. Then look at the new entries in mail.log and post them. You will probably have some sort of error codes there. Next please post your main.cf file. Please put it between "code" tags, the words code and /code in []s.
 
Old 09-24-2010, 05:51 AM   #22
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,143
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
Hi,

Are you the administrator or sys admin of that mail server? If so then let us know which firewall you are running?
 
Old 09-26-2010, 08:27 PM   #23
willcastle
Member
 
Registered: Sep 2010
Location: Philippines
Distribution: Centos
Posts: 63

Original Poster
Rep: Reputation: 0
[root@porto ~]# postfix start
/postfix-script: warning: not owned by root: /etc/postfix/mysql_relay_domains_maps.cf
/postfix-script: warning: not owned by root: /etc/postfix/mysql_virtual_alias_maps.cf
/postfix-script: warning: not owned by root: /etc/postfix/mysql_virtual_domains_maps.cf
/postfix-script: warning: not owned by root: /etc/postfix/mysql_virtual_mailbox_limits_maps.cf
/postfix-script: warning: not owned by root: /etc/postfix/mysql_virtual_mailbox_maps.cf
/postfix-script: starting the Postfix mail system

[root@porto ~]# service dovecot restart
Stopping Dovecot Imap: [ OK ]
Starting Dovecot Imap: Warning: mail_extra_groups setting was often used insecurely so it is now deprecated, use mail_access_groups or mail_privileged_group instead
[ OK ]
Hi,

This is the output.
 
Old 09-26-2010, 08:53 PM   #24
willcastle
Member
 
Registered: Sep 2010
Location: Philippines
Distribution: Centos
Posts: 63

Original Poster
Rep: Reputation: 0
Hi,

Honestly I don't know what to look for in maillog. So I put the last section of the maillog.

Code:
Sep 27 01:53:07 porto dovecot: auth-worker(default): sql(w.castillo@mariagracia.ph,192.168.101.247): query: SELECT password FROM mailbox WHERE username = 'w.castillo@mariagracia.ph'
Sep 27 01:53:07 porto dovecot: auth(default): client out: OK    1       user=w.castillo@mariagracia.ph
Sep 27 01:53:07 porto dovecot: auth(default): master in: REQUEST        18      3053    1
Sep 27 01:53:07 porto dovecot: auth-worker(default): sql(w.castillo@mariagracia.ph,192.168.101.247): SELECT maildir, 89 AS uid, 89 AS gid FROM mailbox WHERE username  = 'w.castillo@mariagracia.ph'
Sep 27 01:53:07 porto dovecot: auth(default): master out: USER  18      w.castillo@mariagracia.ph       maildir=w.castillo@mariagracia.ph/      uid=89  gid=89
Sep 27 01:53:07 porto dovecot: pop3-login: Login: user=<w.castillo@mariagracia.ph>, method=PLAIN, rip=192.168.101.247, lip=192.168.101.5, TLS
Sep 27 01:53:07 porto dovecot: POP3(w.castillo@mariagracia.ph): Disconnected: Logged out top=0/0, retr=0/0, del=0/13, size=21894
Sep 27 01:53:07 porto dovecot: auth(default): new auth connection: pid=3068
Sep 27 01:54:17 porto dovecot: auth(default): client in: AUTH   1       PLAIN   service=POP3    secured lip=192.168.101.5       rip=192.168.101.247     resp=<hidden>
Sep 27 01:54:17 porto dovecot: auth-worker(default): sql(w.castillo@mariagracia.ph,192.168.101.247): query: SELECT password FROM mailbox WHERE username = 'w.castillo@mariagracia.ph'
Sep 27 01:54:17 porto dovecot: auth(default): client out: OK    1       user=w.castillo@mariagracia.ph
Sep 27 01:54:17 porto dovecot: auth(default): master in: REQUEST        19      3068    1
Sep 27 01:54:17 porto dovecot: auth-worker(default): sql(w.castillo@mariagracia.ph,192.168.101.247): SELECT maildir, 89 AS uid, 89 AS gid FROM mailbox WHERE username  = 'w.castillo@mariagracia.ph'
Sep 27 01:54:17 porto dovecot: auth(default): master out: USER  19      w.castillo@mariagracia.ph       maildir=w.castillo@mariagracia.ph/      uid=89  gid=89
Sep 27 01:54:17 porto dovecot: pop3-login: Login: user=<w.castillo@mariagracia.ph>, method=PLAIN, rip=192.168.101.247, lip=192.168.101.5, TLS
Sep 27 01:54:17 porto dovecot: POP3(w.castillo@mariagracia.ph): Disconnected: Logged out top=0/0, retr=0/0, del=0/13, size=21894
Sep 27 01:54:17 porto dovecot: auth(default): new auth connection: pid=3073
Sep 27 01:54:17 porto dovecot: auth(default): client in: AUTH   1       PLAIN   service=POP3    secured lip=192.168.101.5       rip=192.168.101.247     resp=<hidden>
Sep 27 01:54:17 porto dovecot: auth-worker(default): sql(w.castillo@mariagracia.ph,192.168.101.247): query: SELECT password FROM mailbox WHERE username = 'w.castillo@mariagracia.ph'
Sep 27 01:54:17 porto dovecot: auth(default): client out: OK    1       user=w.castillo@mariagracia.ph
Sep 27 01:54:17 porto dovecot: auth-worker(default): sql(w.castillo@mariagracia.ph,192.168.101.247): SELECT maildir, 89 AS uid, 89 AS gid FROM mailbox WHERE username  = 'w.castillo@mariagracia.ph'
Sep 27 01:54:17 porto dovecot: auth(default): master in: REQUEST        20      3059    1
Sep 27 01:54:17 porto dovecot: auth(default): master out: USER  20      w.castillo@mariagracia.ph       maildir=w.castillo@mariagracia.ph/      uid=89  gid=89
Sep 27 01:54:17 porto dovecot: pop3-login: Login: user=<w.castillo@mariagracia.ph>, method=PLAIN, rip=192.168.101.247, lip=192.168.101.5, TLS
Sep 27 01:54:17 porto dovecot: POP3(w.castillo@mariagracia.ph): Disconnected: Logged out top=0/0, retr=0/0, del=0/13, size=21894
Sep 27 01:54:18 porto dovecot: auth(default): new auth connection: pid=3075

Last edited by willcastle; 09-27-2010 at 09:57 PM.
 
Old 09-26-2010, 09:02 PM   #25
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
You said that people were able to get their mail is that correct? If so the dovecot stuff should be working and let's concentrate on postfix. Let's look at `tail -n1000 /var/log/maillog | grep -v dovecot`.

Regards,

Alunduil
 
Old 09-26-2010, 09:04 PM   #26
willcastle
Member
 
Registered: Sep 2010
Location: Philippines
Distribution: Centos
Posts: 63

Original Poster
Rep: Reputation: 0
Hi,

I suppose I'm the sys admin because no one is administering the servers when I got here.
 
Old 09-26-2010, 09:08 PM   #27
willcastle
Member
 
Registered: Sep 2010
Location: Philippines
Distribution: Centos
Posts: 63

Original Poster
Rep: Reputation: 0
Hi,

Yes they can recieve mails but not send mails. But when sending mail in LAN there's no problem.
 
Old 09-26-2010, 09:09 PM   #28
willcastle
Member
 
Registered: Sep 2010
Location: Philippines
Distribution: Centos
Posts: 63

Original Poster
Rep: Reputation: 0
Hi,

What will I look for in the logs?
 
Old 09-26-2010, 09:12 PM   #29
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Where are your clients when they can't deliver mail through your server? Is it possible that port 25 is being blocked by their remote network administrators? Have you enabled and configured your clients to use the submission port 587?

Regards,

Alunduil
 
Old 09-26-2010, 09:48 PM   #30
willcastle
Member
 
Registered: Sep 2010
Location: Philippines
Distribution: Centos
Posts: 63

Original Poster
Rep: Reputation: 0
Hi,

Here in our office. And we have branches in the province so they need to send mails here in the office. The problem is whenever I configure their emails(Outlook 2003) an error apperears. "The specified server was found but the connection has failed...etc".

Thanks in advance.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VectorLinux user, must make post before I can post url The Headacher LinuxQuestions.org Member Intro 2 07-02-2011 11:55 AM
Forum suggested I post a first post. So here it is. Linux user Michigan. MixAndMatch LinuxQuestions.org Member Intro 3 01-20-2010 05:52 PM
Suggestion: Minimum post count to post in old inactive threads Eternal_Newbie LQ Suggestions & Feedback 5 04-28-2008 09:34 AM
i dont want to post here but i guess i have to to post relevent links in another thre sluckz LinuxQuestions.org Member Intro 8 10-02-2007 12:55 PM


All times are GMT -5. The time now is 04:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration