0

I am trying to use the SpamAssassin class from the spamassassin_client module to get the spam score

from spamassassin_client import SpamAssassin
spam_score = SpamAssassin(text).get_score()

However, I cannot establish a connection with the the host:

ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

This is a snippet from the SpamAssassin.__init__() constructor:

# Connecting
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.settimeout(timeout)
client.connect(('127.0.0.1', 783))

# Sending
client.sendall(self._build_message(message))
client.shutdown(socket.SHUT_WR)

How to solve this issue?

Mark Tolonen
  • 166,664
  • 26
  • 169
  • 251
Filip Szczybura
  • 407
  • 5
  • 14

0 Answers0