LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   post/dovecot (https://www.linuxquestions.org/questions/linux-newbie-8/post-dovecot-833651/)

willcastle 09-22-2010 11:24 PM

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.

prayag_pjs 09-22-2010 11:40 PM

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

prayag_pjs 09-22-2010 11:53 PM

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

willcastle 09-23-2010 11:25 PM

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?

willcastle 09-23-2010 11:40 PM

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.

Noway2 09-24-2010 04:23 AM

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.

prayag_pjs 09-24-2010 05:51 AM

Hi,

Are you the administrator or sys admin of that mail server? If so then let us know which firewall you are running?

willcastle 09-26-2010 08:27 PM

[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.

willcastle 09-26-2010 08:53 PM

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


alunduil 09-26-2010 09:02 PM

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

willcastle 09-26-2010 09:04 PM

Hi,

I suppose I'm the sys admin because no one is administering the servers when I got here.

willcastle 09-26-2010 09:08 PM

Hi,

Yes they can recieve mails but not send mails. But when sending mail in LAN there's no problem.

willcastle 09-26-2010 09:09 PM

Hi,

What will I look for in the logs?

alunduil 09-26-2010 09:12 PM

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

willcastle 09-26-2010 09:48 PM

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.


All times are GMT -5. The time now is 01:10 AM.