Subject: pkg/36292: clamsmtpd started too early
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <martti.kuparinen@iki.fi>
List: pkgsrc-bugs
Date: 05/08/2007 04:00:00
>Number:         36292
>Category:       pkg
>Synopsis:       clamsmtpd started too early
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 08 04:00:00 +0000 2007
>Originator:     Martti Kuparinen
>Release:        NetBSD 4.0_BETA2
>Organization:
>Environment:
System: NetBSD p130.mydomain.com 4.0_BETA2 NetBSD 4.0_BETA2 (P130) #1: Wed May 2 11:13:30 EEST 2007 root@p130.mydomain.com:/usr/src/sys/arch/amd64/compile/P130 amd64
Architecture: x86_64
Machine: amd64
>Description:

The clamsmptd daemon is started before clamd. This causes clamsmtpd to fail
with error like this:

May  8 06:47:14 p131 clamsmtpd: 100001: CLAMAV: couldn't connect to: /tmp/clamd: No such file or directory

>How-To-Repeat:

1) Reboot
2) Execute the following commands

ROOT p131:~> mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
083E81A84D0    20529 Tue May  8 06:47:10  root@mydomain.com
(host 127.0.0.1[127.0.0.1] said: 451 Local Error (in reply to end of DATA command))
                                         root@mydomain.com

ROOT p131:~> postfix flush
ROOT p131:~> mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
083E81A84D0    20529 Tue May  8 06:47:10  root@mydomain.com
(host 127.0.0.1[127.0.0.1] said: 451 Local Error (in reply to end of DATA command))
                                         root@mydomain.com

ROOT p131:~> /etc/rc.d/clamsmtpd restart
Stopping clamsmtpd.
Starting clamsmtpd.
ROOT p131:~> postfix flush
ROOT p131:~> mailq
Mail queue is empty

>Fix: