View Full Version : smtp problem
z.y
30th March 2006, 23:46
I installed FC4 as a mail server. Then I used Outlook to test it. The POP3 (incoming email) was passed, however, the outgoing (SMTP, port 25) failed. I got the error message:
The TCP/IP connection was unexpectedly terminated by the server.(server: '192.168.2.214', Error Number 0x800ccc0f).
I checked the server using nmap localhost, I got the following output:
Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2006-03-30 16:36 EST
Interesting ports on mail1.avensys.ca (127.0.0.1):
(The 1652 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
25/tcp open smtp
80/tcp open http
110/tcp open pop3
111/tcp open rpcbind
143/tcp open imap
443/tcp open https
993/tcp open imaps
995/tcp open pop3s
3306/tcp open mysql
It seems that smtp port 25 is open.
I also use netstat -tap to get the following result:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 *:imaps *:* LISTEN 1767/xinetd
tcp 0 0 *:pop3s *:* LISTEN 1767/xinetd
tcp 0 0 *:mysql *:* LISTEN 1870/mysqld
tcp 0 0 *:pop3 *:* LISTEN 1767/xinetd
tcp 0 0 *:imap *:* LISTEN 1767/xinetd
tcp 0 0 *:sunrpc *:* LISTEN 1554/portmap
tcp 0 0 *:ftp *:* LISTEN 1946/proftpd: (acce
tcp 0 0 192.168.2.214:5335 *:* LISTEN 1720/mDNSResponder
tcp 0 0 192.168.2.214:smtp *:* LISTEN 1937/master
tcp 0 0 *:http *:* LISTEN 1962/httpd
tcp 0 0 *:ssh *:* LISTEN 1759/sshd
tcp 0 0 *:https *:* LISTEN 1962/httpd
tcp 0 144 ::ffff:192.168.2.214:ssh ::ffff:192.168.2.40:4817 ESTABLISHED 2647/0
I saw smtp was listening.
What's wrong with me? Any suggestion?
Thanks a lot.
till
31st March 2006, 09:15
Did you get any errors in your mail log?
z.y
31st March 2006, 17:08
The mail log in /var/log/maillog likes this:
Mar 30 11:17:09 mail1 postfix/smtpd[10183]: connect from mail1.avensys.ca[127.0.0.1]
Mar 30 11:17:09 mail1 ipop3d[10185]: pop3 service init from 192.168.2.40
Mar 30 11:17:09 mail1 ipop3d[10185]: Mailbox vulnerable - directory /var/spool/mail must have 1777 protection
Mar 30 11:17:09 mail1 ipop3d[10185]: Login user=zyan host=[192.168.2.40] nmsgs=0/0
Mar 30 11:17:09 mail1 ipop3d[10185]: Mailbox vulnerable - directory /var/spool/mail must have 1777 protection
Mar 30 11:17:09 mail1 ipop3d[10185]: Logout user=zyan host=[192.168.2.40] nmsgs=0 ndele=0
Mar 30 11:17:27 mail1 postfix/smtpd[10183]: disconnect from mail1.avensys.ca[127.0.0.1]
Mar 30 11:20:22 mail1 ipop3d[10199]: pop3 service init from 192.168.2.76
Mar 30 11:20:22 mail1 ipop3d[10199]: Mailbox vulnerable - directory /var/spool/mail must have 1777 protection
Mar 30 11:20:22 mail1 ipop3d[10199]: Login user=zyan host=[192.168.2.76] nmsgs=0/0
What does the 'Mailbox vulnerable - directory /var/spool/mail must have 1777 protection' mean?
Thanks.
falko
31st March 2006, 17:52
Please run chmod 1777 /var/spool/mail
However, this does not affect your sending problem. Can you post a log excerpt from when you try to send a mail?
z.y
31st March 2006, 18:53
However, this does not affect your sending problem. Can you post a log excerpt from when you try to send a mail?
I can deliver mail within local machine. For example, use command line:
[root@mail1 ~]# mail paul
the account paul can receive the test mail. I can see this in maillog file:
Mar 23 09:37:15 mail1 postfix/pickup[13761]: 19004290F9B: uid=500 from=<zyan>
Mar 23 09:37:15 mail1 postfix/cleanup[13841]: 19004290F9B: message-id=<20060323143715.19004290F9B@mail1.avensys.ca>
Mar 23 09:37:15 mail1 postfix/qmgr[1945]: 19004290F9B: from=<zyan@mail1.avensys.ca>, size=307, nrcpt=1 (queue active)
Mar 23 09:37:15 mail1 postfix/local[13843]: 19004290F9B: to=<paul@mail1.avensys.ca>, orig_to=<paul>, relay=local, delay=0, status=sent (delivered to mailbox)
Mar 23 09:37:15 mail1 postfix/qmgr[1945]: 19004290F9B: removed
I just found some errors in the /var/log/maillog file, but only occurred from yesterday:
Mar 31 01:38:43 mail1 postfix/qmgr[3015]: 38838290F9B: from=<root@mail1.avensys.ca>, size=295, nrcpt=1 (queue active)
Mar 31 01:38:43 mail1 postfix/smtp[5895]: fatal: unknown service: smtp/tcp
Mar 31 01:38:44 mail1 postfix/qmgr[3015]: warning: premature end-of-input on private/smtp socket while reading input attribute name
Mar 31 01:38:44 mail1 postfix/qmgr[3015]: warning: private/smtp socket: malformed response
Mar 31 01:38:44 mail1 postfix/qmgr[3015]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Mar 31 01:38:44 mail1 postfix/master[1937]: warning: process /usr/libexec/postfix/smtp pid 5895 exit status 1
Mar 31 01:38:44 mail1 postfix/master[1937]: warning: /usr/libexec/postfix/smtp: bad command startup -- throttling
How to solve it?
falko
1st April 2006, 12:38
Mar 31 01:38:43 mail1 postfix/smtp[5895]: fatal: unknown service: smtp/tcp
Mar 31 01:38:44 mail1 postfix/qmgr[3015]: warning: premature end-of-input on private/smtp socket while reading input attribute name
Please post your /etc/postfix/master.cf and the output of grep -i smtp /etc/services
Please post your /etc/postfix/master.cf and the output of grep -i smtp /etc/services
This is the output:
[root@mail1 ~]# grep -i smtp /etc/services
smtp 25/tcp mail
smtp 25/udp mail
smtps 465/tcp # SMTP over SSL (TLS).
Bellow is /etc/postfix/master.cf
[root@mail1 postfix]# cat master.cf
#
# Postfix master process configuration file. For details on the format
# of the file, see the Postfix master(5) manual page.
#
# ================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ================================================== ========================
smtp inet n - y - - smtpd
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - y - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - n - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
#
# ================================================== ==================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ================================================== ==================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
#
# The Cyrus deliver program has changed incompatibly, multiple times.
#
old-cyrus unix - n n - - pipe
flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
cyrus unix - n n - - pipe
user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
[root@mail1 postfix]#
Thanks again.
falko
3rd April 2006, 20:18
Looks ok...
What's the output of ls -la /usr/lib/postfix?
Looks ok...
What's the output of ls -la /usr/lib/postfix
No such file on my machine.
I issued command: find / -name postfix -print
the ouptput:
[root@mail1 ~]# find / -name postfix -print
/usr/share/logwatch/scripts/services/postfix
/usr/sbin/postfix
/usr/libexec/postfix
/etc/postfix
/etc/rc.d/init.d/postfix
/var/spool/postfix
/var/lock/subsys/postfix
Something wrong with my system files?
falko
4th April 2006, 15:41
What's the output of ls -la /usr/libexec/postfix?
What's the output of ls -la /usr/libexec/postfix?
The output:
[root@mail1 ~]# ls -la /usr/libexec/postfix
total 5292
drwxr-xr-x 2 root root 4096 Mar 18 04:02 .
drwxr-xr-x 8 root root 4096 Mar 18 04:02 ..
-rwxr-xr-x 1 root root 179532 Apr 20 2005 anvil
-rwxr-xr-x 1 root root 208560 Apr 20 2005 bounce
-rwxr-xr-x 1 root root 249444 Apr 20 2005 cleanup
-rwxr-xr-x 1 root root 191824 Apr 20 2005 discard
-rwxr-xr-x 1 root root 192236 Apr 20 2005 error
-rwxr-xr-x 1 root root 184204 Apr 20 2005 flush
-rwxr-xr-x 1 root root 238412 Apr 20 2005 lmtp
-rwxr-xr-x 1 root root 263372 Apr 20 2005 local
-rwxr-xr-x 1 root root 126096 Apr 20 2005 master
-rwxr-xr-x 2 root root 234144 Apr 20 2005 nqmgr
-rwxr-xr-x 1 root root 226368 Apr 20 2005 oqmgr
-rwxr-xr-x 1 root root 183844 Apr 20 2005 pickup
-rwxr-xr-x 1 root root 214028 Apr 20 2005 pipe
-rwxr-xr-x 1 root root 167440 Apr 20 2005 proxymap
-rwxr-xr-x 2 root root 234144 Apr 20 2005 qmgr
-rwxr-xr-x 1 root root 200480 Apr 20 2005 qmqpd
-rwxr-xr-x 1 root root 176720 Apr 20 2005 scache
-rwxr-xr-x 1 root root 187980 Apr 20 2005 showq
-rwxr-xr-x 1 root root 314028 Apr 20 2005 smtp
-rwxr-xr-x 1 root root 352064 Apr 20 2005 smtpd
-rwxr-xr-x 1 root root 176120 Apr 20 2005 spawn
-rwxr-xr-x 1 root root 183792 Apr 20 2005 tlsmgr
-rwxr-xr-x 1 root root 192568 Apr 20 2005 trivial-rewrite
-rwxr-xr-x 1 root root 179696 Apr 20 2005 verify
-rwxr-xr-x 1 root root 212720 Apr 20 2005 virtual
[root@mail1 ~]#
falko
6th April 2006, 00:14
Looks ok, too... :confused:
falko
14th April 2006, 16:51
Does /var/spool/postfix/etc/services exist? Your smtpd daemon is running chrooted.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.