
23rd July 2008, 16:49
|
|
Member
|
|
Join Date: Apr 2008
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Amavis trouble with Postfix
Hi,
I changed over from using Exim on my Domain server as I wasn't happy with it.
Now I'm trying to get Amavis working with Spamassassin and ClamAV, so I found a few sites on google however I keep getting errors when Amavis tries to start scanning the email.
Code:
Jul 2 23:16:24 OptiplexGX270T amavis[2891]: (02891-01) (!) /usr/bin/clamscan is taking longer than 315 s and will be killed
Jul 2 23:16:24 OptiplexGX270T amavis[2891]: (02891-01) (!) killing process [3720] running /usr/bin/clamscan
Jul 2 23:16:24 OptiplexGX270T amavis[2890]: (02890-01) (!) /usr/bin/clamscan is taking longer than 315 s and will be killed
Jul 2 23:16:24 OptiplexGX270T amavis[2890]: (02890-01) (!) killing process [3721] running /usr/bin/clamscan
Jul 2 23:16:24 OptiplexGX270T amavis[2890]: (02890-01) (!) run_av: timed out
Jul 2 23:16:24 OptiplexGX270T amavis[2890]: (02890-01) (!!) ClamAV-clamscan av-scanner FAILED: /usr/bin/clamscan timed out at (eval 44) line 462.
Jul 2 23:16:24 OptiplexGX270T amavis[2890]: (02890-01) (!!) TROUBLE in check_mail: virus_scan FAILED: virus_scan: ALL VIRUS SCANNERS FAILED: ClamAV-clamd av-scanner FAILED: Too many retries to talk to /var/run/clamav/clamd.ctl (Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory) at (eval 44) line 268.; ClamAV-clamscan av-scanner FAILED: /usr/bin/clamscan timed out at (eval 44) line 462.
Jul 2 23:16:24 OptiplexGX270T amavis[2890]: (02890-01) (!) PRESERVING EVIDENCE in /var/lib/amavis/tmp/amavis-20080702T231102-02890
Jul 2 23:16:24 OptiplexGX270T amavis[2890]: (02890-01) TIMING [total 322468 ms] - SMTP EHLO: 6 (0%)0, SMTP pre-MAIL: 1 (0%)0, mkdir tempdir: 85 (0%)0, create email.txt: 0 (0%)0, SMTP pre-DATA-flush: 4 (0%)0, SMTP DATA: 7 (0%)0, body_digest: 1 (0%)0, gen_mail_id: 1 (0%)0, mkdir parts: 0 (0%)0, mime_decode: 16 (0%)0, get-file-type2: 314 (0%)0, decompose_part: 1 (0%)0, parts_decode: 0 (0%)0, AV-scan-1: 7018 (2%)2, AV-scan-2: 0 (0%)2, AV-scan-3: 315011 (98%)100, rundown: 2 (0%)100
Jul 2 23:16:24 OptiplexGX270T amavis[2891]: (02891-01) (!) run_av: timed out
Jul 2 23:16:24 OptiplexGX270T amavis[2891]: (02891-01) (!!) ClamAV-clamscan av-scanner FAILED: /usr/bin/clamscan timed out at (eval 44) line 462.
Jul 2 23:16:24 OptiplexGX270T amavis[2891]: (02891-01) (!!) TROUBLE in check_mail: virus_scan FAILED: virus_scan: ALL VIRUS SCANNERS FAILED: ClamAV-clamd av-scanner FAILED: Too many retries to talk to /var/run/clamav/clamd.ctl (Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory) at (eval 44) line 268.; ClamAV-clamscan av-scanner FAILED: /usr/bin/clamscan timed out at (eval 44) line 462.
Jul 2 23:16:24 OptiplexGX270T amavis[2891]: (02891-01) (!) PRESERVING EVIDENCE in /var/lib/amavis/tmp/amavis-20080702T231102-02891
Jul 2 23:16:24 OptiplexGX270T amavis[2891]: (02891-01) TIMING [total 322458 ms] - SMTP EHLO: 6 (0%)0, SMTP pre-MAIL: 1 (0%)0, mkdir tempdir: 70 (0%)0, create email.txt: 1 (0%)0, SMTP pre-DATA-flush: 4 (0%)0, SMTP DATA: 29 (0%)0, body_digest: 1 (0%)0, gen_mail_id: 1 (0%)0, mkdir parts: 0 (0%)0, mime_decode: 17 (0%)0, get-file-type2: 277 (0%)0, decompose_part: 1 (0%)0, parts_decode: 0 (0%)0, AV-scan-1: 7021 (2%)2, AV-scan-2: 0 (0%)2, AV-scan-3: 315023 (98%)100, rundown: 5 (0%)100
Jul 2 23:16:24 OptiplexGX270T postfix/smtp[3210]: C4E185AA34: to=<kayasaman@optiplex-networks.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=77127, delays=76804/0.19/0.01/322, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=02891-01, virus_scan FAILED: virus_scan: ALL VIRUS SCANNERS FAILED: ClamAV-clamd av-scanner FAILED: Too many retries to talk to /var/run/clamav/clamd.ctl (Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory) at (eval 44) line 268.; ClamAV-clamscan av-scanner FAILED: /usr/bin/clamscan timed out at (eval 44) line 462. (in reply to end of DATA command))
Jul 2 23:16:24 OptiplexGX270T postfix/smtp[3209]: 66D1C5AA22: to=<kayasaman@optiplex-networks.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=79388, delays=79066/0.18/0.01/322, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=02890-01, virus_scan FAILED: virus_scan: ALL VIRUS SCANNERS FAILED: ClamAV-clamd av-scanner FAILED: Too many retries to talk to /var/run/clamav/clamd.ctl (Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory) at (eval 44) line 268.; ClamAV-clamscan av-scanner FAILED: /usr/bin/clamscan timed out at (eval 44) line 462. (in reply to end of DATA command))
Also I can't understand why Amavis can't connect to socket:
Code:
(Can't connect to UNIX socket /var/run/clamav/clamd.ctl
as the dir is there?:
Code:
kayasaman@OptiplexGX270T:/var/run/clamav$ ls
clamd.ctl clamd.pid freshclam.pid
As a result I had many error emails sent back to me when I tried using my other accounts to send a test mail to my server - this is why I ran away from Exim in the first place!
Can anyone help me with how to solve this issue?
Many Thanks
|

24th July 2008, 17:35
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
What's the output of
Code:
ls -la /var/run/clamav
?
Are amavisd or Postfix running chrooted?
|

24th July 2008, 19:22
|
|
Member
|
|
Join Date: Apr 2008
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
OptiplexGX270T:/home/kayasaman# ls -la /var/run/clamav
total 16
drwxr-xr-x 2 clamav clamav 4096 2008-07-21 14:14 .
drwxr-xr-x 22 root root 4096 2008-07-21 13:40 ..
srwxrwxrwx 1 clamav clamav 0 2008-07-21 14:14 clamd.ctl
-rw-rw---- 1 clamav clamav 4 2008-07-21 14:14 clamd.pid
-rw-rw---- 1 clamav clamav 4 2008-07-21 13:39 freshclam.pid
Is output.
How can I test for amavisd and postfix is using chrooted?
I don't think they are but I'm not certain.
|

25th July 2008, 12:42
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
What's in /etc/postfix/master.cf?
|

25th July 2008, 12:48
|
|
Member
|
|
Join Date: Apr 2008
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# ================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ================================================== ========================
smtp inet n - - - - smtpd
#submission inet n - - - - smtpd
# -o smtpd_enforce_tls=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
#smtps inet n - - - - smtpd
# -o smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - - 300 1 oqmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - - - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - - - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - - - - showq
error unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 1 scache
#
# ================================================== ==================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ================================================== ==================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)#
# Other external delivery methods.
#
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipientscalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
amavis unix - - - - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
-o max_use=20
127.0.0.1:10025 inet n - - - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_delay_reject=no
-o smtpd_client_restrictions=permit_mynetworks,reject
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,rej ect
-o smtpd_data_restrictions=reject_unauth_pipelining
-o smtpd_end_of_data_restrictions=
-o mynetworks=192.168.1.0/24
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o smtpd_client_connection_count_limit=0
-o smtpd_client_connection_rate_limit=0
-o receive_override_options=no_header_body_checks,no_ unknown_recipient_checks
-o strict_rfc821_envelopes=yes
-o smtpd_bind_address=127.0.0.1
|

26th July 2008, 11:21
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
What happens when you replace
Code:
smtp inet n - - - - smtpd
with
Code:
smtp inet n - n - - smtpd
and restart Postfix?
|
| Thread Tools |
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 07:12.
|
|
Recent comments
1 day 4 hours ago
1 day 9 hours ago
1 day 11 hours ago
1 day 12 hours ago
1 day 13 hours ago
1 day 18 hours ago
1 day 19 hours ago
1 day 21 hours ago
2 days 10 hours ago
2 days 12 hours ago