iredmail / iRedMail / conf / amavisd

Zhang Huangbin 7c26194 

Zhang Huangbin 69f2f69 
Zhang Huangbin 7c26194 



























Zhang Huangbin 72ad0fa 
Zhang Huangbin 7c26194 
Zhang Huangbin 74aee26 

Zhang Huangbin 7c26194 



Zhang Huangbin 2ebbddd 
Zhang Huangbin bec313b 
Zhang Huangbin a75ee88 

Zhang Huangbin f2f31b2 
Zhang Huangbin 7c26194 

Zhang Huangbin 6fdcb85 
Zhang Huangbin 7c26194 





Zhang Huangbin e2ca631 



Zhang Huangbin f5a0d22 


Zhang Huangbin 7c26194 



Zhang Huangbin 4b87d19 
Zhang Huangbin f2f31b2 

Zhang Huangbin 7c26194 












Zhang Huangbin f5a0d22 
Zhang Huangbin 8c0475d 
Zhang Huangbin ea8a387 
Zhang Huangbin 8c0475d 
Zhang Huangbin 76af891 
Zhang Huangbin 8c0475d 
Zhang Huangbin 43334e2 
Zhang Huangbin 8c0475d 
Zhang Huangbin 7c26194 







Zhang Huangbin 58a1263 
Zhang Huangbin f2f31b2 

Zhang Huangbin 58a1263 









Zhang Huangbin 7c26194 
Zhang Huangbin f2f31b2 

Zhang Huangbin 7c26194 







Zhang Huangbin 6fdcb85 


Zhang Huangbin 12efb11 















Zhang Huangbin f2f31b2 
Zhang Huangbin 3755fba 
Zhang Huangbin f2f31b2 





Zhang Huangbin 7c26194 



Zhang Huangbin 3894acb 




#!/usr/bin/env bash

# Author:   Zhang Huangbin (zhb _at_ iredmail.org)

#---------------------------------------------------------------------
# This file is part of iRedMail, which is an open source mail server
# solution for Red Hat(R) Enterprise Linux, CentOS, Debian and Ubuntu.
#
# iRedMail is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# iRedMail is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with iRedMail.  If not, see <http://www.gnu.org/licenses/>.
#---------------------------------------------------------------------

# Warning: Please source 'conf/postfix' first.

export AMAVISD_SYS_USER='amavis'
export AMAVISD_SYS_GROUP='amavis'
export AMAVISD_QUARANTINE_PORT='9998'
export AMAVISD_LOGFILE='/var/log/amavisd.log'
export AMAVISD_LOGROTATE_FILE="${LOGROTATE_DIR}/amavisd"
export AMAVISD_DKIM_SELECTOR='dkim'
export AMAVISD_DKIM_DIR='/var/lib/dkim'
export AMAVISD_RC_SCRIPT_NAME='amavisd'

export AMAVISD_VIRUSMAILS_DIR='/var/virusmails'

# Database used to store incoming & outgoing email related information.
export AMAVISD_DB_NAME='amavisd'
export AMAVISD_DB_USER='amavisd'
export AMAVISD_DB_PASSWD="$(${RANDOM_STRING})"
export MYSQL_BACKUP_DATABASES="${MYSQL_BACKUP_DATABASES} ${AMAVISD_DB_NAME}"
export PGSQL_BACKUP_DATABASES="${PGSQL_BACKUP_DATABASES} ${AMAVISD_DB_NAME}"

# Amavisd-new-2.7 and 2.8.0 use the same SQL structure, but different from 2.6.
export AMAVISD_VERSION='2.6'

# Altermime.
export ALTERMIME_BIN='/usr/bin/altermime'
export DISCLAIMER_DIR="${POSTFIX_ROOTDIR}/disclaimer"

if [ X"${DISTRO}" == X"RHEL" ]; then
    export AMAVISD_BIN='/usr/sbin/amavisd'
    export AMAVISD_LDAP_SCHEMA_NAME='amavisd-new.schema'

    export AMAVISD_MYHOME='/var/spool/amavisd'
    export AMAVISD_QUARANTINEDIR="${AMAVISD_MYHOME}/quarantine"
    export AMAVISD_TEMPDIR="${AMAVISD_MYHOME}/tmp"

    # RHEL/CENTOS 6
    export AMAVISD_CONF='/etc/amavisd/amavisd.conf'
    export AMAVISD_VIRUSMAILS_DIR="${AMAVISD_QUARANTINEDIR}"

    export AMAVISD_DKIM_CONF="${AMAVISD_CONF}"

elif [ X"${DISTRO}" == X"SUSE" ]; then
    # openSUSE-12.1/12.2 ships Amavisd-new-2.7.0
    export AMAVISD_VERSION='2.7'

    # Override global setting: user/group.
    export AMAVISD_SYS_USER='vscan'
    export AMAVISD_SYS_GROUP='vscan'
    export AMAVISD_DKIM_DIR='/var/spool/amavis/dkim'

    export AMAVISD_BIN='/usr/sbin/amavisd'
    export AMAVISD_CONF='/etc/amavisd.conf'
    export AMAVISD_DKIM_CONF='/etc/amavisd.conf'
    export AMAVISD_RC_SCRIPT_NAME='amavis'
    export AMAVISD_LDAP_SCHEMA_NAME='amavisd-new.schema'
    export AMAVISD_VIRUSMAILS_DIR='/var/spool/amavis/virusmails'

elif [ X"${DISTRO}" == X"DEBIAN" -o X"${DISTRO}" == X"UBUNTU" ]; then
    # Debian 7 (wheezy) and Ubuntu 13.04 (raring) ships Amavisd-new-2.7
    if [ X"${DISTRO}" == X'DEBIAN' ]; then
        export AMAVISD_VERSION='2.7'
    elif [ X"${DISTRO}" == X'UBUNTU' ]; then
        if [ X"${DISTRO_CODENAME}" != X'precise' ]; then
            export AMAVISD_VERSION='2.7'
        fi
    fi
    export AMAVISD_BIN='/usr/sbin/amavisd-new'
    export AMAVISD_CONF_DIR='/etc/amavis/conf.d'
    export AMAVISD_CONF='/etc/amavis/conf.d/50-user'
    export AMAVISD_DKIM_CONF='/etc/amavis/conf.d/50-user'
    export AMAVISD_RC_SCRIPT_NAME='amavis'
    export AMAVISD_LDAP_SCHEMA_NAME='amavis.schema'
    export AMAVISD_VIRUSMAILS_DIR='/var/lib/amavis/virusmails'

elif [ X"${DISTRO}" == X"GENTOO" ]; then
    export AMAVISD_VERSION='2.7'

    export AMAVISD_BIN='/usr/sbin/amavisd'
    export AMAVISD_LDAP_SCHEMA_NAME='amavisd-new.schema'

    export AMAVISD_CONF='/etc/amavisd.conf'

    export AMAVISD_DKIM_CONF="${AMAVISD_CONF}"
    export AMAVISD_MYHOME='/var/amavis'
    export AMAVISD_QUARANTINEDIR="${AMAVISD_MYHOME}/quarantine"
    export AMAVISD_TEMPDIR="${AMAVISD_MYHOME}/tmp"

elif [ X"${DISTRO}" == X"FREEBSD" ]; then
    export AMAVISD_VERSION='2.7'

    # Override global setting: user/group.
    export AMAVISD_SYS_USER='vscan'
    export AMAVISD_SYS_GROUP='vscan'

    export AMAVISD_BIN='/usr/local/sbin/amavisd'
    export AMAVISD_CONF='/usr/local/etc/amavisd.conf'
    export AMAVISD_DKIM_CONF='/usr/local/etc/amavisd.conf'
    export AMAVISD_LDAP_SCHEMA_NAME='amavisd-new.schema'

    # Override location of command 'altermime'
    export ALTERMIME_BIN='/usr/local/bin/altermime'

elif [ X"${DISTRO}" == X'OPENBSD' ]; then
    export AMAVISD_VERSION='2.7'
    export AMAVISD_SYS_USER='_vscan'
    export AMAVISD_SYS_GROUP='_vscan'

    export AMAVISD_BIN='/usr/local/sbin/amavisd'
    export AMAVISD_CONF='/etc/amavisd.conf'
    export AMAVISD_DKIM_CONF='/etc/amavisd.conf'
    export AMAVISD_LDAP_SCHEMA_NAME='amavisd.schema'

    export AMAVISD_DKIM_DIR='/var/amavisd/dkim'

    # Override location of command 'altermime'
    export ALTERMIME_BIN='/usr/local/bin/altermime'

fi

if [ X"${AMAVISD_VERSION}" == X'2.7' ]; then
    export AMAVISD_DB_MYSQL_TMPL="${SAMPLE_DIR}/amavisd/amavisd-2.7.0.mysql"
    export AMAVISD_DB_PGSQL_TMPL="${SAMPLE_DIR}/amavisd/amavisd-2.7.0.pgsql"
else
    export AMAVISD_DB_MYSQL_TMPL="${SAMPLE_DIR}/amavisd/amavisd.mysql"
    export AMAVISD_DB_PGSQL_TMPL="${SAMPLE_DIR}/amavisd/amavisd.pgsql"
fi

# Syslog setting, 'YES' or 'NO'
export AMAVISD_SEPERATE_LOG='NO'

# mynetworks
export AMAVISD_MYNETWORKS='127.0.0.0/8'
if [ X"${LOCAL_ADDRESS}" != X'127.0.0.1' ]; then
    export AMAVISD_MYNETWORKS="${AMAVISD_MYNETWORKS},${LOCAL_ADDRESS}"
fi
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.