Can not connect to clamav
Summary
Hi, I have installed fuglu and followed the instructions in fuglu documentation in the configuration step. Every thing seems to be ok and the command fuglu
and fuglu --lint
work very well. I can receive mails sent from my gmail account to postfix but I can't send mail.
fuglu version and operating system
With fuglu --version
, I got 0.10.7. I am using debian 10.
Steps to reproduce
I have installed all requirements accept except for libmilter
because I don't need it. With fuglu --lint
I got OK everywhere (not for libmilter). For the postfix configuration, I've chosen the one proposed in the doc and I've added on top of that the lines in main.cf :
content_filter = fuglu_default:localhost:10025
receive_override_options = no_address_mappings
In fuglu.conf file, I've only set these values:
host=localhost
port=/var/run/clamav/clamd.ctl
I use unix socket for clamav and the command:
sudo systemctl status clamav-daemon
outputs enabled and active. fuglu --lint chows that clamAV is OK.
What is the current bug behavior?
I can receive message from outside but when I send a message it does not work.
What is the expected correct behavior?
Normally every thing should work and I should be able to send messages from outside and inside my domain.
Relevant logs and/or configuration snippets
From postfix maillog:
Jul 25 00:15:44 ma postfix/submission/smtpd[20523]: connect from localhost[127.0.0.1]
Jul 25 00:15:44 ma postfix/submission/smtpd[20523]: Anonymous TLS connection established from localhost[127.0.0.1]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
Jul 25 00:15:44 ma postfix/submission/smtpd[20523]: NOQUEUE: filter: RCPT from localhost[127.0.0.1]: <localhost[127.0.0.1]>: Client host triggers FILTER fuglu_trusted:[127.0.0.1]:10099; from=<sya@mail-server.tk> to=<sya@ept.sn> proto=ESMTP helo=<localhost>
Jul 25 00:15:44 ma postfix/submission/smtpd[20523]: 4BD66S3Pr9z4yr8: client=localhost[127.0.0.1], sasl_method=LOGIN, sasl_username=sya@mail-server.tk
Jul 25 00:15:44 ma postfix/cleanup[20525]: 4BD66S3Pr9z4yr8: message-id=<9ae75666e9364f7dcfb7b5e79412b212@mail-server.tk>
Jul 25 00:15:44 ma postfix/qmgr[32174]: 4BD66S3Pr9z4yr8: from=<sya@mail-server.tk>, size=745, nrcpt=1 (queue active)
Jul 25 00:15:44 ma roundcube: <ailnscii> User sya@mail-server.tk [41.214.81.2]; Message <9ae75666e9364f7dcfb7b5e79412b212@mail-server.tk> for sya@ept.sn; 250: 2.0.0 Ok: queued as 4BD66S3Pr9z4yr8
Jul 25 00:15:44 ma postfix/submission/smtpd[20523]: disconnect from localhost[127.0.0.1] ehlo=2 starttls=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=8
Jul 25 00:15:44 ma postfix/smtp[20484]: 4BD66S3Pr9z4yr8: to=<sya@ept.sn>, relay=127.0.0.1[127.0.0.1]:10099, delay=0.11, delays=0.08/0/0/0.03, dsn=4.0.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 internal problem - message deferred (in reply to end of DATA command))
From fuglu.log
I've got:
File "/usr/local/lib/python3.7/dist-packages/fuglu-0.10.7-py3.7.egg/fuglu/plugins/clamav.py", line 217, in scan_stream
s = self.__init_socket__(oneshot=not pipelining)
File "/usr/local/lib/python3.7/dist-packages/fuglu-0.10.7-py3.7.egg/fuglu/plugins/clamav.py", line 390, in __init_socket__
raise Exception('Could not reach clamd using network (%s, %s)' % (clamd_HOST, clamd_PORT))
Exception: Could not reach clamd using network (clamd, 3310)
2020-07-25 00:15:44,569 fuglu.plugin.ClamavPlugin: ERROR Could not reach clamd using network (clamd, 3310)
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/fuglu-0.10.7-py3.7.egg/fuglu/plugins/clamav.py", line 388, in __init_socket__
s.connect((clamd_HOST, clamd_PORT))
socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/fuglu-0.10.7-py3.7.egg/fuglu/plugins/clamav.py", line 136, in examine
viruses = self.scan_stream(content, suspect.id)
File "/usr/local/lib/python3.7/dist-packages/fuglu-0.10.7-py3.7.egg/fuglu/plugins/clamav.py", line 217, in scan_stream
s = self.__init_socket__(oneshot=not pipelining)
File "/usr/local/lib/python3.7/dist-packages/fuglu-0.10.7-py3.7.egg/fuglu/plugins/clamav.py", line 390, in __init_socket__
raise Exception('Could not reach clamd using network (%s, %s)' % (clamd_HOST, clamd_PORT))
Exception: Could not reach clamd using network (clamd, 3310)
2020-07-25 00:15:44,571 fuglu.plugin.ClamavPlugin: ERROR Could not reach clamd using network (clamd, 3310)
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/fuglu-0.10.7-py3.7.egg/fuglu/plugins/clamav.py", line 388, in __init_socket__
s.connect((clamd_HOST, clamd_PORT))
socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/fuglu-0.10.7-py3.7.egg/fuglu/plugins/clamav.py", line 136, in examine
viruses = self.scan_stream(content, suspect.id)
File "/usr/local/lib/python3.7/dist-packages/fuglu-0.10.7-py3.7.egg/fuglu/plugins/clamav.py", line 217, in scan_stream
s = self.__init_socket__(oneshot=not pipelining)
File "/usr/local/lib/python3.7/dist-packages/fuglu-0.10.7-py3.7.egg/fuglu/plugins/clamav.py", line 390, in __init_socket__
raise Exception('Could not reach clamd using network (%s, %s)' % (clamd_HOST, clamd_PORT))
Exception: Could not reach clamd using network (clamd, 3310)
2020-07-25 00:15:44,572 fuglu.plugin.ClamavPlugin: ERROR d912d76226e24ddf91b9ec85e4113678 Clamdscan failed after 3 retries
2020-07-25 00:15:44,572 fuglu.SessionHandler: INFO Suspect d912d76226e24ddf91b9ec85e4113678 from=sya@mail-server.tk to=sya@ept.sn size=743 spam=no virus=no modified=no decision=DEFER
2020-07-25 00:15:44,578 fuglu.SessionHandler: WARNING DEFERRED d912d76226e24ddf91b9ec85e4113678
Thanks in advance.