From 154ca2e617010df6ae0da6cdf6e09ca97881e7ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Sun, 18 Jul 2004 11:02:24 +0000 Subject: [PATCH] remove warning when not using spamd_socket git-svn-id: https://svn.perl.org/qpsmtpd/trunk@276 958fd67b-6ff1-0310-b445-bb7760255be9 --- plugins/spamassassin | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/spamassassin b/plugins/spamassassin index 331321c..02a89ef 100644 --- a/plugins/spamassassin +++ b/plugins/spamassassin @@ -98,7 +98,8 @@ sub check_spam { my $paddr = sockaddr_in($port, $iaddr); my $proto = getprotobyname('tcp'); - if ( $self->{_args}->{spamd_socket} =~ /^([\w\/.-]+)$/ ) { # connect to Unix Domain Socket + if ($self->{_args}->{spamd_socket} and + $self->{_args}->{spamd_socket} =~ /^([\w\/.-]+)$/ ) { # connect to Unix Domain Socket my $spamd_socket = $1; socket(SPAMD, PF_UNIX, SOCK_STREAM, 0)