Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Specify port at top of file

  • Loading branch information...
commit c0a7a097cefcab190b4e30e36891112379506516 1 parent 5728b14
@purcell authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 bin/postfix-policy-whois
View
6 bin/postfix-policy-whois
@@ -2,6 +2,8 @@
$0='postfix-policy-whois'
+PORT = 8787
+
require 'syslog'
$LOG = Syslog.open($0, Syslog::LOG_PID | Syslog::LOG_PERROR, Syslog::LOG_MAIL)
@@ -44,8 +46,8 @@ def dodgy?(domain)
end
require 'socket'
-server = TCPServer.new("0.0.0.0", 8787)
-$LOG.log(Syslog::LOG_INFO, "Listening on 0.0.0.0:8787")
+server = TCPServer.new("0.0.0.0", PORT)
+$LOG.log(Syslog::LOG_INFO, "Listening on 0.0.0.0:{PORT}")
while true
Thread.new(server.accept) do |client|
Please sign in to comment.
Something went wrong with that request. Please try again.