--- /usr/bin/mimedefang.pl      2007-08-29 09:12:12.000000000 -0800
+++ /tmp/mimedefang.pl  2007-09-26 20:42:52.000000000 -0800
@@ -4381,6 +4381,7 @@
     }
     my $sock = IO::Socket::UNIX->new(Peer => $clamd_sock);
     if (defined $sock) {
+        $sock->timeout(20);
        my $path = $entity->bodyhandle->path;
        # If path is not absolute, add cwd
        if (! ($path =~ m+^/+)) {
@@ -4452,6 +4453,8 @@
        return (wantarray ? (999, 'cannot-execute', 'tempfail') : 999);
     }

+    $sock->timeout(20);
+
     my $s = IO::Select->new();
     $s->add($sock);
     if (!$s->can_write(30)) {

