On Thursday 06 July 2006 16:00, Matt Sergeant wrote:
> Yup. It seems localhost is hard coded. Should be fairly simple to
> patch.
Hmmm, OK! So, could you good folks have a look at the attached patch to
see if it does the trick...? :-)
I didn't quite dare to test it on my production system, though... :-)
Cheers,
Kjetil
Index: spamassassin
===================================================================
--- spamassassin (revision 649)
+++ spamassassin (working copy)
@@ -44,11 +44,12 @@
The default is to never munge the subject based on the SpamAssassin score.
-=item spamd_socket [/path/to/socket]
+=item spamd_socket [/path/to/socket|spamd.host:port]
-Beginning with Mail::SpamAssassin 2.60, it is possible to use Unix
-domain sockets for spamd. This is faster and more secure than using
-a TCP connection.
+Beginning with Mail::SpamAssassin 2.60, it is possible to use Unix
+domain sockets for spamd. This is faster and more secure than using a
+TCP connection, but if you run spamd on a remote machine, you need to
+use a TCP connection.
=item leave_old_headers [drop|rename|keep]
@@ -100,6 +101,10 @@
my $remote = 'localhost';
my $port = 783;
+ if ($self->{_args}->{spamd_socket} =~ /^([\w.-]+):(\d+)$/) {
+ $remote = $1;
+ $port = $2;
+ }
if ($port =~ /\D/) { $port = getservbyname($port, 'tcp') }
die "No port" unless $port;
my $iaddr = inet_aton($remote) or