Setting up Postfix on a new computer. I was getting :
telnet myhostname 25
Trying myhostname...
telnet: Unable to connect to remote host: Connection refused
Postfix was refusing the connection. The trick here is that the default config (Redhat Fedora Core 3) only allows connection from the localhost.
the solution is to edit /etc/postfix/main.cf to change the section under # RECEIVING MAIL to:
inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
#inet_interfaces = localhost
This does not create an open relay, because Postfix will still only accept non-local recipent mail from machines defigned by mynetworks.
This should answer postfix only lets me connect from localhost
May 2009
I just implemented RBL blocking on my post fix configuration. What I used was a less draconian version of the sample listed Here. This is what I set it to:
smtpd_recipient_restrictions =
permit_mynetworks,
reject_unauth_destination,
reject_invalid_hostname,
reject_unauth_pipelining,
reject_non_fqdn_sender,
reject_unknown_sender_domain,
reject_non_fqdn_recipient,
reject_unknown_recipient_domain,
reject_rbl_client bl.spamcop.net,
reject_rbl_client sbl.spamhaus.org,
permit
added to the end of /etc/postfix/main.cf. Now my mailer is rejecting about half of the mail that is attempted (a sample from a typical day's logs):
17943 Accepted 48.41%
19120 Rejected 51.59%
-------- ------------------------------------------------
37063 Total 100.00%
======== ================================================
35 Reject relay denied 0.18%
70 Reject HELO/EHLO 0.37%
19015 Reject RBL 99.45%
-------- ------------------------------------------------
19120 Total Rejects 100.00%
======== ================================================
The problem is that of the about 20 thousand messages a day that get through, about 19,950 are still spam. (this is what happens when you have a bunch of domain names with public contact addresses )
|