Sendmail “Connection refused by mail.example.com” when attempting to send emails

I'm trying to have a virtually hosted PHP site send emails to a particular Gmail address when the site's contact form is correctly filled out and submitted. Unfortunately, nothing is being sent out. In /var/log/mail.log I have numerous instances of things like this:

Jul 31 16:38:51 picus sm-mta[28576]: v6SL4xII018234: to=<person@gmail.com>, delay=2+23:33:52, xdelay=00:00:00, mailer=esmtp, pri=38910659, relay=mail.example.com., dsn=4.0.0,stat=Deferred:Connection refused by mail.example.com.</person@gmail.com>

Where person@gmail.com is the address the site-generated email is to be sent to, and example.com is my domain name. Note: I don't have a reverse DNS setup for this domain because it's virtual.

I'm completely new to handling an email server, and simply wanted to use Sendmail since it's built into the distro I'm using and Swiftmailer supports it, so I'm not sure how to fix the problem. Any ideas?

1 Reply

I'm pretty sure it's a DNS issue. I CANNOT connect to mail.example.com from a remote telnet, even though port 25 is open in my iptables. Since this is for a virtual host, there's no reverse DNS. I'm pretty stuck, so any suggestions would be appreciated.

Reply

Please enter an answer
Tips:

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] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct