6

I'm using a VPS with CentOS 5, containing Postfix and OpenDKIM. I have set up OpenDKIM using this guide. Everything seems to work properly as the log in /var/log/maillog does not report anything other than that OpenDKIM is running.

The problem is that once I try to use PHP to send an email (mail() function), I notice my maillog spits this out:

Sep 20 17:28:36 localhost postfix/cleanup[973]: warning: connect to Milter service inet:127.0.0.1:8891: Connection timed out

However, using netstat shows it's listening on that port. Strangely, using telnet to connect to 127.0.0.1:8891 fails to connect aswell. I have the feeling that something is configured improperly, but I'm not an experienced Unix user at all.

Hennes
  • 64,768
  • 7
  • 111
  • 168
user1640348
  • 161
  • 3
  • I would recommend moving away from using PHP's mail and using PHPMailer or something equivalent to send emails through your SMTP server. You can use PHPMailer to connect to localhost as the SMTP server. – Jon May 06 '14 at 11:01
  • Is selinux set to be enforcing? try getenforce – DarkPeakGeek Oct 07 '14 at 09:29
  • 1
    You might want to check your firewall configuration. Can you post your iptables rules? (`iptables -nL`) – Steen Schütt Dec 04 '14 at 11:42
  • As it stands this question can have a dozen answers. Consider going to the basics. You can not open a connection to 127.0.0.1:8891. Not with telnet, not with php, so no need to further specify PHP info. What is relevant is what is running on that port and what your firewall config is. Which service is bound to that. Is it listening on your IP, on 0.0.0.0, or on 127.1? Etc. Until we get that sort of information we cannot answer. – Hennes Feb 03 '16 at 07:43

0 Answers0