1

Topic: Amavisd and ClamAv not working

==== Required information ====
- iRedMail version: 0.8.5
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: CentOS 6.2
- Related log if you're reporting an issue:
====
Okay so I just set up iRedMail 0.8.5.
The installation completed successfully. My roundcube works, so does iRedAdmin but I am just not able to send or receive mails from my account.
Everytime I try to send an email it gives an error:
connect to address 127.0.0.1: Connection refused
This, from the forum is reported to be an amavisd not running issue.
So I restarted amavis using the following command:
It gave the following errors:
Shutting down amavisd: /etc/rc.d/init.d/functions: line 530: 25594 Killed                  "$@"                                                 [FAILED]

Starting amavisd: /etc/rc.d/init.d/functions: line 530: 25618 Killed                  "$@"                                                          [FAILED]

What have I done wrong? :-\

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Amavisd and ClamAv not working

vidit.chopra wrote:

Shutting down amavisd: /etc/rc.d/init.d/functions: line 530: 25594 Killed                  "$@"                                                 [FAILED]

*) No idea about what it means. Any RELATED log in /var/log/maillog?
*) Could you please show us output of command "yum repolist"?

3

Re: Amavisd and ClamAv not working

ZhangHuangbin wrote:
vidit.chopra wrote:

Shutting down amavisd: /etc/rc.d/init.d/functions: line 530: 25594 Killed                  "$@"                                                 [FAILED]

*) No idea about what it means. Any RELATED log in /var/log/maillog?
*) Could you please show us output of command "yum repolist"?


1. Here is the output of yum repolist:

[root@email ~]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/metalink                                            |  14 kB     00:00     
* epel: linux.mirrors.es.net
base                                                     | 3.7 kB     00:00     
centosplus                                               | 3.4 kB     00:00     
contrib                                                  | 2.9 kB     00:00     
epel                                                     | 4.2 kB     00:00     
epel/primary_db                                          | 5.6 MB     00:01     
extras                                                   | 3.4 kB     00:00     
iRedMail                                                 |  951 B     00:00     
update                                                   | 3.4 kB     00:00     
repo id            repo name                                              status
base               CentOS-6 - Base                                        6,381
centosplus         CentOS-6 - CentosPLUS                                     56
contrib            CentOS-6 - Contrib                                         0
epel               Extra Packages for Enterprise Linux 6 - x86_64         9,741
extras             CentOS-6 - Extras                                         13
iRedMail           iRedMail                                                  81
update             CentOS-6 - Updates                                     1,319
repolist: 17,591

2. Okay so when I try to send an email this is what happens in the mail.log file:

Sep 29 08:50:39 email postfix/smtpd[29307]: connect from email.logicake.com[127.0.0.1]
Sep 29 08:50:39 email postfix/smtpd[29307]: CC4B737C70: client=email.logicake.com[127.0.0.1], sasl_method=LOGIN, sasl_username=postmaster@logicake.com
Sep 29 08:50:40 email postfix/cleanup[29313]: CC4B737C70: message-id=<39b5a48ddc2ce26629648fa572e660cb@logicake.com>
Sep 29 08:50:40 email postfix/qmgr[1462]: CC4B737C70: from=<postmaster@logicake.com>, size=564, nrcpt=1 (queue active)
Sep 29 08:50:40 email roundcube: User postmaster@logicake.com [122.177.185.36]; Message for vidit.chopra@gmail.com; 250: 2.0.0 Ok: queued as CC4B737C70
Sep 29 08:50:41 email postfix/smtpd[29307]: disconnect from email.logicake.com[127.0.0.1]
Sep 29 08:50:41 email postfix/smtp[29317]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
Sep 29 08:50:41 email postfix/smtp[29317]: CC4B737C70: to=<vidit.chopra@gmail.com>, relay=none, delay=2.4, delays=1.1/1.2/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)

4

Re: Amavisd and ClamAv not working

vidit.chopra wrote:

Sep 29 08:50:41 email postfix/smtp[29317]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused

Amavisd is not running.
Any RELATED log in /var/log/maillog after you restarted Amavisd service? Log related to amavisd start.

5

Re: Amavisd and ClamAv not working

ZhangHuangbin wrote:
vidit.chopra wrote:

Sep 29 08:50:41 email postfix/smtp[29317]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused

Amavisd is not running.
Any RELATED log in /var/log/maillog after you restarted Amavisd service? Log related to amavisd start.

Nope. No activity happens in maillog when I restart Amavisd. Just the same error shows up on the terminal.

Starting amavisd: /etc/rc.d/init.d/functions: line 530: 30202 Killed                  "$@"
                                                           [FAILED]

No activity in maillog.

6

Re: Amavisd and ClamAv not working

That's weird. Could you please show me output of below commands:

# rpm -qi amavisd-new
# bash -xv /etc/init.d/amavisd start

7

Re: Amavisd and ClamAv not working

ZhangHuangbin wrote:

That's weird. Could you please show me output of below commands:

# rpm -qi amavisd-new
# bash -xv /etc/init.d/amavisd start

For :

 rpm -qi amavisd-new 
Name        : amavisd-new                  Relocations: (not relocatable)
Version     : 2.8.0                             Vendor: Fedora Project
Release     : 4.el6                         Build Date: Thursday 21 February 2013 05:23:14 PM PST
Install Date: Saturday 28 September 2013 10:17:56 AM PDT      Build Host: ppc12.phx2.fedoraproject.org
Group       : Applications/System           Source RPM: amavisd-new-2.8.0-4.el6.src.rpm
Size        : 2963797                          License: GPLv2+ and BSD and GFDL
Signature   : RSA/8, Friday 22 February 2013 09:18:05 AM PST, Key ID 3b49df2a0608b895
Packager    : Fedora Project
URL         : [url]http://www.ijs.si/software/amavisd/[/url]
Summary     : Email filter with virus scanner and spamassassin support
Description :
amavisd-new is a high-performance and reliable interface between mailer
(MTA) and one or more content checkers: virus scanners, and/or
Mail::SpamAssassin Perl module. It is written in Perl, assuring high
reliability, portability and maintainability. It talks to MTA via (E)SMTP
or LMTP, or by using helper programs. No timing gaps exist in the design
which could cause a mail loss.

For:

bash -xv /etc/init.d/amavisd start

Gave a long output so I copied it to a text file, just the output. Here is what it contained:

Starting amavisd: ^[[60G[^[[0;31mFAILED^[[0;39m]^M

For the long output, this is all I could retrieve:

    RC=$?
    if [ -n "$pid" ]; then
        echo $pid
        return 0
    fi

    [ -n "$pid_file" ] && return $RC
    __pids_pidof "$1" || return $RC
}

status() {
    local base pid lock_file= pid_file=

    # Test syntax.
    if [ "$#" = 0 ] ; then
        echo $"Usage: status [-p pidfile] {program}"
        return 1
    fi
    if [ "$1" = "-p" ]; then
        pid_file=$2
        shift 2
    fi
    if [ "$1" = "-l" ]; then
        lock_file=$2
        shift 2
    fi
    base=${1##*/}

    # First try "pidof"
    __pids_var_run "$1" "$pid_file"
    RC=$?
    if [ -z "$pid_file" -a -z "$pid" ]; then
        pid="$(__pids_pidof "$1")"
    fi
    if [ -n "$pid" ]; then
            echo $"${base} (pid $pid) is running..."
            return 0
    fi

    case "$RC" in
        0)
            echo $"${base} (pid $pid) is running..."
            return 0
            ;;
        1)
                    echo $"${base} dead but pid file exists"
                    return 1
            ;;
        4)
            echo $"${base} status unknown due to insufficient privileges."
            return 4
            ;;
    esac
    if [ -z "${lock_file}" ]; then
        lock_file=${base}
    fi
    # See if /var/lock/subsys/${lock_file} exists
    if [ -f /var/lock/subsys/${lock_file} ]; then
        echo $"${base} dead but subsys locked"
        return 2
    fi
    echo $"${base} is stopped"
    return 3
}

echo_success() {
  [ "$BOOTUP" = "color" ] && $MOVE_TO_COL
  echo -n "["
  [ "$BOOTUP" = "color" ] && $SETCOLOR_SUCCESS
  echo -n $"  OK  "
  [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
  echo -n "]"
  echo -ne "\r"
  return 0
}

echo_failure() {
  [ "$BOOTUP" = "color" ] && $MOVE_TO_COL
  echo -n "["
  [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE
  echo -n $"FAILED"
  [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
  echo -n "]"
  echo -ne "\r"
  return 1
}

echo_passed() {
  [ "$BOOTUP" = "color" ] && $MOVE_TO_COL
  echo -n "["
  [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING
  echo -n $"PASSED"
  [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
  echo -n "]"
  echo -ne "\r"
  return 1
}

echo_warning() {
  [ "$BOOTUP" = "color" ] && $MOVE_TO_COL
  echo -n "["
  [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING
  echo -n $"WARNING"
  [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
  echo -n "]"
  echo -ne "\r"
  return 1
}

# Inform the graphical boot of our current state
update_boot_stage() {
  if [ -x /bin/plymouth ]; then
      /bin/plymouth --update="$1"
  fi
  return 0
}

# Log that something succeeded
success() {
  [ "$BOOTUP" != "verbose" -a -z "${LSB:-}" ] && echo_success
  return 0
}

# Log that something failed
failure() {
  local rc=$?
  [ "$BOOTUP" != "verbose" -a -z "${LSB:-}" ] && echo_failure
  [ -x /bin/plymouth ] && /bin/plymouth --details
  return $rc
}

# Log that something passed, but may have had errors. Useful for fsck
passed() {
  local rc=$?
  [ "$BOOTUP" != "verbose" -a -z "${LSB:-}" ] && echo_passed
  return $rc
}  

# Log a warning
warning() {
  local rc=$?
  [ "$BOOTUP" != "verbose" -a -z "${LSB:-}" ] && echo_warning
  return $rc
}  

# Run some action. Log its output.
action() {
  local STRING rc

  STRING=$1
  echo -n "$STRING "
  shift
  "$@" && success $"$STRING" || failure $"$STRING"
  rc=$?
  echo
  return $rc
}

# returns OK if $1 contains $2
strstr() {
  [ "${1#*$2*}" = "$1" ] && return 1
  return 0
}

# Confirm whether we really want to run this service
confirm() {
  [ -x /bin/plymouth ] && /bin/plymouth --hide-splash
  while : ; do 
      echo -n $"Start service $1 (Y)es/(N)o/(C)ontinue? [Y] "
      read answer
      if strstr $"yY" "$answer" || [ "$answer" = "" ] ; then
         return 0
      elif strstr $"cC" "$answer" ; then
     rm -f /var/run/confirm
     [ -x /bin/plymouth ] && /bin/plymouth --show-splash
         return 2
      elif strstr $"nN" "$answer" ; then
         return 1
      fi
  done
}

# resolve a device node to its major:minor numbers in decimal or hex
get_numeric_dev() {
(
    fmt="%d:%d"
    if [ "$1" == "hex" ]; then
        fmt="%x:%x"
    fi
    ls -lH "$2" | awk '{ sub(/,/, "", $5); printf("'"$fmt"'", $5, $6); }'
) 2>/dev/null
}

# Check whether file $1 is a backup or rpm-generated file and should be ignored
is_ignored_file() {
    case "$1" in
    *~ | *.bak | *.orig | *.rpmnew | *.rpmorig | *.rpmsave)
        return 0
        ;;
    esac
    return 1
}

# Evaluate shvar-style booleans
is_true() {
    case "$1" in
    [tT] | [yY] | [yY][eE][sS] | [tT][rR][uU][eE])
    return 0
    ;;
    esac
    return 1
}

# Evaluate shvar-style booleans
is_false() {
    case "$1" in
    [fF] | [nN] | [nN][oO] | [fF][aA][lL][sS][eE])
    return 0
    ;;
    esac
    return 1
}

# Apply sysctl settings, including files in /etc/sysctl.d
apply_sysctl() {
    sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1
    for file in /etc/sysctl.d/* ; do
        is_ignored_file "$file" && continue
        test -f "$file" && sysctl -e -p "$file" >/dev/null 2>&1
    done
}

key_is_random() {
    [ "$1" = "/dev/urandom" -o "$1" = "/dev/hw_random" \
    -o "$1" = "/dev/random" ]
}

find_crypto_mount_point() {
    local fs_spec fs_file fs_vfstype remaining_fields
    local fs
    while read fs_spec fs_file remaining_fields; do
    if [ "$fs_spec" = "/dev/mapper/$1" ]; then
        echo $fs_file
        break;
    fi
    done < /etc/fstab
}

# Because of a chicken/egg problem, init_crypto must be run twice.  /var may be
# encrypted but /var/lib/random-seed is needed to initialize swap.
init_crypto() {
    local have_random dst src key opt mode owner params makeswap skip arg opt
    local param value rc ret mke2fs mdir prompt mount_point

    ret=0
    have_random=$1
    while read dst src key opt; do
    [ -z "$dst" -o "${dst#\#}" != "$dst" ] && continue
        [ -b "/dev/mapper/$dst" ] && continue;
    if [ "$have_random" = 0 ] && key_is_random "$key"; then
        continue
    fi
    if [ -n "$key" -a "x$key" != "xnone" ]; then
        if test -e "$key" ; then
        owner=$(ls -l $key | (read a b owner rest; echo $owner))
        if ! key_is_random "$key"; then
            mode=$(ls -l "$key" | cut -c 5-10)
            if [ "$mode" != "------" ]; then
               echo $"INSECURE MODE FOR $key"
            fi
        fi
        if [ "$owner" != root ]; then
            echo $"INSECURE OWNER FOR $key"
        fi
        else
        echo $"Key file for $dst not found, skipping"
        ret=1
        continue
        fi
    else
        key=""
    fi
    params=""
    makeswap=""
    mke2fs=""
    skip=""
    # Parse the src field for UUID= and convert to real device names
    if [ "${src%%=*}" == "UUID" ]; then
        src=$(/sbin/blkid -t "$src" -l -o device)
    elif [ "${src/^\/dev\/disk\/by-uuid\/}" != "$src" ]; then
        src=$(__readlink $src)
    fi
    # Is it a block device?
    [ -b "$src" ] || continue
    # Is it already a device mapper slave? (this is gross)
    devesc=${src##/dev/}
    devesc=${devesc//\//!}
    for d in /sys/block/dm-*/slaves ; do
        [ -e $d/$devesc ] && continue 2
    done
    # Parse the options field, convert to cryptsetup parameters and
    # contruct the command line
    while [ -n "$opt" ]; do
        arg=${opt%%,*}
        opt=${opt##$arg}
        opt=${opt##,}
        param=${arg%%=*}
        value=${arg##$param=}

        case "$param" in
        cipher)
        params="$params -c $value"
        if [ -z "$value" ]; then
            echo $"$dst: no value for cipher option, skipping"
            skip="yes"
        fi
        ;;
        size)
        params="$params -s $value"
        if [ -z "$value" ]; then
            echo $"$dst: no value for size option, skipping"
            skip="yes"
        fi
        ;;
        hash)
        params="$params -h $value"
        if [ -z "$value" ]; then
            echo $"$dst: no value for hash option, skipping"
            skip="yes"
        fi
        ;;
        verify)
            params="$params -y"
        ;;
        swap)
        makeswap=yes
        ;;
        tmp)
        mke2fs=yes
        esac
    done
    if [ "$skip" = "yes" ]; then
        ret=1
        continue
    fi
    if [ -z "$makeswap" ] && cryptsetup isLuks "$src" 2>/dev/null ; then
        if key_is_random "$key"; then
        echo $"$dst: LUKS requires non-random key, skipping"
        ret=1
        continue
        fi
        if [ -n "$params" ]; then
        echo "$dst: options are invalid for LUKS partitions," \
            "ignoring them"
        fi
        if [ -n "$key" ]; then
        /sbin/cryptsetup -d $key luksOpen "$src" "$dst" <&1 2>/dev/null && success || failure
        rc=$?
        else
        mount_point="$(find_crypto_mount_point $dst)"
        [ -n "$mount_point" ] || mount_point=${src##*/}
        prompt=$(printf $"%s is password protected" "$mount_point")
        plymouth ask-for-password --prompt "$prompt" --command="/sbin/cryptsetup luksOpen -T1 $src $dst" <&1
        rc=$?
        fi
    else
        [ -z "$key" ] && plymouth --hide-splash
        /sbin/cryptsetup $params ${key:+-d $key} create "$dst" "$src" <&1 2>/dev/null && success || failure
        rc=$?
        [ -z "$key" ] && plymouth --show-splash
    fi
    if [ $rc -ne 0 ]; then
        ret=1
        continue
    fi
    if [ -b "/dev/mapper/$dst" ]; then
        if [ "$makeswap" = "yes" ]; then
        mkswap "/dev/mapper/$dst" 2>/dev/null >/dev/null
        fi
        if [ "$mke2fs" = "yes" ]; then
        if mke2fs "/dev/mapper/$dst" 2>/dev/null >/dev/null \
            && mdir=$(mktemp -d /tmp/mountXXXXXX); then
            mount "/dev/mapper/$dst" "$mdir" && chmod 1777 "$mdir"
            umount "$mdir"
            rmdir "$mdir"
        fi
        fi
    fi
    done < /etc/crypttab
    return $ret
}

# A sed expression to filter out the files that is_ignored_file recognizes
__sed_discard_ignored_files='/\(~\|\.bak\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d'
++ __sed_discard_ignored_files='/\(~\|\.bak\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d'

# Source networking configuration.
. /etc/sysconfig/network
+ . /etc/sysconfig/network
GATEWAYDEV=eth0
++ GATEWAYDEV=eth0
NETWORKING=yes
++ NETWORKING=yes
NETWORKING_IPV6=yes
++ NETWORKING_IPV6=yes
HOSTNAME=email.logicake.com
++ HOSTNAME=email.logicake.com

#prog="/opt/amavisd-new/sbin/amavisd"
prog="/usr/sbin/amavisd"
+ prog=/usr/sbin/amavisd
prog_base="$(basename ${prog})"
basename ${prog})"
basename ${prog})
basename ${prog}
++ basename /usr/sbin/amavisd
+ prog_base=amavisd

prog_config_file="/etc/amavisd/amavisd.conf"
+ prog_config_file=/etc/amavisd/amavisd.conf

# Source configuration.
[ -e /etc/sysconfig/${prog_base} ] && . /etc/sysconfig/${prog_base}
+ '[' -e /etc/sysconfig/amavisd ']'

## Check that networking is up.
#[ ${NETWORKING} = "no" ] && exit 0

RETVAL=0
+ RETVAL=0

# See how we were called.
case "$1" in
  start)
    action $"Starting ${prog_base}:" ${prog} -c ${prog_config_file}
    RETVAL=$?
    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/${prog_base}
    echo
    ;;
  stop)
    action $"Shutting down ${prog_base}:" ${prog} -c ${prog_config_file} stop
    RETVAL=$?
    if [ $RETVAL -eq 0 ] ; then
            echo "${prog_base} stopped"
            rm -f /var/lock/subsys/${prog_base}
    else
        echo
    fi
    ;;
  status)
    status ${prog_base}
    RETVAL=$?
    ;;
  restart)
    $0 stop
    $0 start
    RETVAL=$?
    ;;
  reload)
    action $"Reloading ${prog_base}:" ${prog} -c ${prog_config_file} reload
    RETVAL=$?
    ;;
  condrestart)
    [ -f /var/lock/subsys/${prog_base} ] && $0 restart || :
    RETVAL=$?
    ;;
  *)
    echo "Usage: $0 {start|stop|status|restart|reload|condrestart}"
    exit 1
esac
+ case "$1" in
+ action 'Starting amavisd:' /usr/sbin/amavisd -c /etc/amavisd/amavisd.conf
+ local STRING rc
+ STRING='Starting amavisd:'
+ echo -n 'Starting amavisd: '
+ shift
+ /usr/sbin/amavisd -c /etc/amavisd/amavisd.conf
Starting amavisd: /etc/rc.d/init.d/functions: line 530: 32019 Killed                  "$@"
+ failure 'Starting amavisd:'
+ local rc=137
+ '[' color '!=' verbose -a -z '' ']'
+ echo_failure
+ '[' color = color ']'
+ echo -en '\033[60G'
+ echo -n '['
                                                           + '[' color = color ']'
[+ echo -en '\033[0;31m'
+ echo -n FAILED
FAILED+ '[' color = color ']'
+ echo -en '\033[0;39m'
+ echo -n ']'
]+ echo -ne '\r'
+ return 1
+ '[' -x /bin/plymouth ']'
+ /bin/plymouth --details
+ return 137
+ rc=137
+ echo
+ return 137
+ RETVAL=137
+ '[' 137 -eq 0 ']'
+ echo



exit $RETVAL
+ exit 137

8

Re: Amavisd and ClamAv not working

OK, what's the output of below command:

/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf

9

Re: Amavisd and ClamAv not working

ZhangHuangbin wrote:

OK, what's the output of below command:

/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf
/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf

Just gives the output

Killed

10

Re: Amavisd and ClamAv not working

OK, what's the output of command:

# /usr/sbin/amavisd -c /etc/amavisd/amavisd.conf debug

11

Re: Amavisd and ClamAv not working

ZhangHuangbin wrote:

OK, what's the output of command:

# /usr/sbin/amavisd -c /etc/amavisd/amavisd.conf debug
/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf debug

Gives this output:

Oct  1 22:34:40.504 email.logicake.com /usr/sbin/amavisd[3255]: logging initialized, log level 0, syslog: amavis.mail
Oct  1 22:34:40.516 email.logicake.com /usr/sbin/amavisd[3255]: starting. /usr/sbin/amavisd at email.logicake.com amavisd-new-2.8.0 (20120630), Unicode aware, LANG="en_IN"
Oct  1 22:34:40.517 email.logicake.com /usr/sbin/amavisd[3255]: perl=5.010001, user=, EUID: 495 (495);  group=, EGID: 492 492 (492 492)
Oct  1 22:34:40.817 email.logicake.com /usr/sbin/amavisd[3255]: INFO: no optional modules: unicore::lib::Perl::Alnum.pl unicore::lib::Perl::SpacePer.pl unicore::lib::Perl::Word.pl unicore::lib::Alpha::Y.pl unicore::lib::Nt::De.pl IO::Socket::IP Unix::Getrusage
Oct  1 22:34:40.835 email.logicake.com /usr/sbin/amavisd[3255]: SpamControl: attempting to load scanner SpamAssassin, module Amavis::SpamControl::SpamAssassin
Oct  1 22:34:40.849 email.logicake.com /usr/sbin/amavisd[3255]: SpamControl: scanner SpamAssassin, module Amavis::SpamControl::SpamAssassin
Killed

12

Re: Amavisd and ClamAv not working

No idea at all. Looks like a broken Amavisd package.

13

Re: Amavisd and ClamAv not working

ZhangHuangbin wrote:

No idea at all. Looks like a broken Amavisd package.

Should I try and re-install iRedMail?

14 (edited by shreepatil89 2014-06-19 15:05:44)

Re: Amavisd and ClamAv not working

Hi,

I am not able to send and receive mail because of Amavisd  and clamav service, This service is crashing while sending and receiving  mail,
Also, I couldn't start clamav service, i am getting below error,
Please check and revert with best solution,
Can i start mailing without Amavisd and calmav services??
Please find below logs to describe the issue,

==== Required information ====
- iRedMail version: 0.3.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: RHEL 6.5
- Related log if you're reporting an issue:
====

[root@ip-178-35-59-185 iRedAdmin-0.3.3]# freshclam
ERROR: Can't open /var/log/clamav/freshclam.log in append mode (check permissions!).
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).

[root@ip-178-35-59-185 iRedAdmin-0.3.3]# /etc/init.d/amavisd status
amavisd dead but subsys locked


[root@ip-178-35-59-185 ~]# /etc/init.d/clamd start
Starting Clam AntiVirus Daemon: LibClamAV Warning: **************************************************
LibClamAV Warning: ***  The virus database is older than 7 days!  ***
LibClamAV Warning: ***   Please update it as soon as possible.    ***
LibClamAV Warning: **************************************************

Post's attachments

iredapd.log 37.43 kb, file has never been downloaded. 

maillog 378.45 kb, 1 downloads since 2014-06-19 

You don't have the permssions to download the attachments of this post.

15

Re: Amavisd and ClamAv not working

The key error log is this line:

Cannot allocate memory at /usr/sbin/amavisd

Please decrease number of pre-forked Amavisd process in /etc/amavisd/amavisd.conf:

$max_servers = 2;

Then update /etc/postfix/master.cf, find below line:

smtp-amavis unix -  -   -   -   10  smtp

Change 10 to 2. Then restart both Postfix and Amavisd services.

16

Re: Amavisd and ClamAv not working

Hi ZhangHuangbin,

I have solved above freshclam error , but i couldn't start clamd and clamd.amavis service,

[root@ip-178-35-59-185 ~]# /etc/init.d/clamd start
Starting Clam AntiVirus Daemon: /bin/bash: line 1:  1127 Killed                  clamd
                                                           [FAILED]
[root@ip-178-35-59-185 ~]# /etc/init.d/clamd.amavisd start
Starting clamd.amavisd:                                    [FAILED]
[root@ip-178-35-59-185 ~]#

Amavisd service is gets dead frequently,
I have 512 ram in my server, is it gets dead because of ram size??
[root@ip-178-35-59-185 ~]# /etc/init.d/amavisd status
amavisd dead but subsys locked

17

Re: Amavisd and ClamAv not working

shreepatil89 wrote:

I have 512 ram in my server, is it gets dead because of ram size??

Yes. iRedMail requires at least 1GB memory with "$max_servers = 2" in Amavisd config file.

18

Re: Amavisd and ClamAv not working

Hi ZhangHuangbin,

Can i mail without amavisd service, i don't want to check the spam mail,
I just want to send and receive mail without spam check, (only postfix and dovecot should be running)

19

Re: Amavisd and ClamAv not working

Sure. Reference: http://www.iredmail.org/wiki/index.php? … amAssassin