stat=Deferred: Connection refused by

Hi, greetings to all here!

I'll tell you a little more about my problem, hoping to give me an idea of ​​how to solve it.

In my VPS I have installed the following:

Debian 8

Apache 2.4




Data from my / etc / hosts file

Hostname: myhostname


I currently have 2 virtual hosts configured and running on Apache, one for the domain and one for the subdomain:

NOTE: The names of the domains, subdomains, as well as the contents of the hosts files are not real. I have modified them for safety.

In I have the WHMCS system installed, where I have configured the email account [email protected] as the main system. The [email protected] account is also set up in the sales ticket department.

I noticed the problem because every 4 hours are opened around 17 tickets to the sales department, ie every 4 hours emails are sent to the account [email protected], the content of the mail is as follows:

Subject: Mail Delivery Subsystem

Mail: [email protected]




The original message was received at Thu, 20 Jul 2017 04:25:03 -0500

from localhost []

–--- Transcript of session follows -----

<[email protected]>… Deferred: Connection refused by

Warning: message still undelivered after 4 hours

Will keep trying until message is 5 days old

Reporting-MTA: dns;

Arrival-Date: Thu, 20 Jul 2017 04:25:03 -0500

Final-Recipient: RFC822; [email protected]

Action: delayed

Status: 4.4.1

Remote-MTA: DNS;

Last-Attempt-Date: Thu, 20 Jul 2017 08:30:35 -0500

Will-Retry-Until: Tue, 25 Jul 2017 04:25:03 -0500

Also when reviewing the file /var/log/syslog I see the following information:

Jul 20 09:20:34 myhostname sm-mta[2629]: v6IJo3cR007314: to=<[email protected]>, delay=1+18:30:31, xdelay=00:00:00, mailer=esmtp, pri=23169571,, dsn=4.0.0, stat=Deferred: Connection refused by

Could you please give me some idea how to solve this problem?, besides, I do not understand why the messages are sent to the address [email protected] when apparently the problem is related to the domain

I appreciate your help in advance :)

Best regards to all!

4 Replies

It looks like you have a firewall blocking port 25 on maindomain?

Hello, thanks for answering.

Currently I have installed and working the UFW, and what I have allowed is the following:

Ports: 22, 80 / tcp, 443 / tcp, 22 (v6), 80 / tcp (v6), 443 / tcp (v6).

Everything else is blocked.

I am in Mexico, I understand that in Mexico we can not use port 25 for SMTP, does this have anything to do with the problem?

Could you change port 25 for another?

Thank you!

25 is the standard port of sending email. You have to allow it so that your two servers can talk

Hello, thank you very much for your answer. Best regards! :)


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct