LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-20-2014, 01:55 AM   #1
wewanwang
LQ Newbie
 
Registered: Dec 2014
Posts: 2

Rep: Reputation: Disabled
[Postfix/smtp] 25 connection refused / connection timed out


Hello, I had setup a vps with the CentOS Apache installed.

I am facing a problem with postfix, I can send & receive emails without problem but I got the bounced back emails in mail log.

Quote:
CB2EB3CCB 23311 Fri Dec 19 17:31:32 xxxx@xxxx.com
(connect to 163mx02.mxmail.netease.com[220.181.14.146]:25: Connection timed out) xxxx@xxxx.com

922B82832 4699 Fri Dec 19 03:22:48 MAILER-DAEMON
(connect to xxxx.com[83.121.8.78]:25: Connection refused) xxxx@xxx.com

ABDD23CB5 16744 Fri Dec 19 14:11:38 xxxx@gmail.com
(connect to mx.mail.ym.163.com[123.58.178.51]:25: Connection timed out) xxxx@xxxx.com
For your information, I have the port 25,110,587,993,995 opened on firewall and I also could telnet the host like google, yahoo on port 25. PTR & rDNS also been set and I had checked my IP at mxtoolbar.com, it is not being blacklisted.

Below are the info of postconf -n.
Quote:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
body_checks = regexp:/etc/postfix/body_checks
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = amavis:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
dovecot_destination_recipient_limit = 1
header_checks = regexp:/etc/postfix/header_checks
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mailbox_size_limit = 0
maildrop_destination_concurrency_limit = 1
maildrop_destination_recipient_limit = 1
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 0
mime_header_checks = regexp:/etc/postfix/mime_header_checks
mydestination = server.mromarket.com, localhost, localhost.localdomain
myhostname = server.mromarket.com
mynetworks = 127.0.0.0/8 [::1]/128
nested_header_checks = regexp:/etc/postfix/nested_header_checks
newaliases_path = /usr/bin/newaliases.postfix
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
receive_override_options = no_address_mappings
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
relayhost =
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_host_lookup = dns, native
smtp_tls_protocols = !SSLv2,!SSLv3
smtp_tls_security_level = may
smtpd_client_message_rate_limit = 100
smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = reject_unknown_sender_domain, check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_protocols = !SSLv2,!SSLv3
smtpd_tls_security_level = may
smtpd_use_tls = yes
transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
unknown_local_recipient_reject_code = 550
virtual_alias_domains =
virtual_alias_maps = hash:/etc/mailman/virtual-mailman, proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_transport = dovecot
virtual_uid_maps = static:5000
What could be causing this problem??
 
Old 12-20-2014, 07:27 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,129

Rep: Reputation: Disabled
The error messages refer to outbound connections. For some reason, the mail servers in the log have all rejected at least one connection attempt from your server.

There could be several reasons for this. The IP address of your VPS may previously have been used by a spammer, or may be listed as belonging to an IP range that gets blacklisted by default. You should check here to see if your address is listed.

If could also be that your server is actually generating or relaying spam, and is then dynamically blacklisted and perhaps even reported by the receiving servers. The first IP address in the log definitely belongs to a spam-filtering gateway.

Do you know why your server is attempting to send mail to or through these other servers?
 
Old 12-22-2014, 02:14 AM   #3
wewanwang
LQ Newbie
 
Registered: Dec 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ser Olmy View Post
The error messages refer to outbound connections. For some reason, the mail servers in the log have all rejected at least one connection attempt from your server.

There could be several reasons for this. The IP address of your VPS may previously have been used by a spammer, or may be listed as belonging to an IP range that gets blacklisted by default. You should check here to see if your address is listed.

If could also be that your server is actually generating or relaying spam, and is then dynamically blacklisted and perhaps even reported by the receiving servers. The first IP address in the log definitely belongs to a spam-filtering gateway.
Hi, thank you for your advise.

I had checked my IP & domain name on spamhaus.org, both are not listed in the SBL, PBL, XBL, DBL thou.
Also did the smtp test at mxtoolbox.com, no open relay.

Quote:
Connecting to 106.186.112.204

220 xxx.xxx.com ESMTP Postfix [1622 ms]
EHLO MXTB-PWS3.mxtoolbox.com
250-xxx.xxx.com
250-PIPELINING
250-SIZE
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN [780 ms]
MAIL FROM: <supertool@mxtoolbox.com>
250 2.1.0 Ok [796 ms]
RCPT TO: <test@example.com>
454 4.7.1 <test@example.com>: Relay access denied [905 ms]

MXTB-PWS3v2 5273ms
This VPS is setup for company use i.e. to host company websites & systems; no spam emails allow.

Quote:
Do you know why your server is attempting to send mail to or through these other servers?
All the messages showed in the mail log are the client's emails we attempt to send...
 
  


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
BackupPC to Windows client; connection timed out/refused RootMason Linux - Software 3 08-22-2013 01:14 PM
sendmail - Connection timed out [dsn=4.0.0 stat=Deferred: Connection timed out] ananthak Linux - Software 0 04-24-2007 08:28 AM
Postfix: Connection timed out Kristijan Linux - Networking 3 09-28-2006 06:11 AM
DHCP + DNS connection refused or timed out errors tnine9 Linux - Networking 1 08-08-2005 10:57 PM
Postfix SMTP config problems, connection refused yallu Linux - Software 1 04-12-2005 05:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:32 AM.

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
Open Source Consulting | Domain Registration