code stringlengths 1 1.96M | language stringclasses 1
value |
|---|---|
#!/usr/bin/env bash
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# Purpose: Fetch all extra packages we need to build mail server.
#---------------------------------------------------------------------
# This file is part of iRedMail, which is an open source mail server
# solution for Red Hat(R) Enterpri... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
#---------------------------------------------------------------------
# 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:... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
#---------------------------------------------------------------------
# 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:... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
#---------------------------------------------------------------------
# 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:... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
#---------------------------------------------------------------------
# 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:... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
#---------------------------------------------------------------------
# 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:... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
#---------------------------------------------------------------------
# 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:... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
#---------------------------------------------------------------------
# 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:... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
#---------------------------------------------------------------------
# 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:... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
#---------------------------------------------------------------------
# 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:... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# -------------------------------------------------------
# ------------------- phpLDAPadmin ----------------------
# -------------------------------------------------------
pla_install()
{
ECHO_INFO "Configure phpLDAPadmin (web-based LDAP... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
#---------------------------------------------------------------------
# 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:... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
#---------------------------------------------------------------------
# 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:... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
#---------------------------------------------------------------------
# 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:... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
#---------------------------------------------------------------------
# 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:... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# -------------------------------------------
# Install all optional components.
# -------------------------------------------
optional_components()
{
# Roundcubemail.
[ X"${USE_RCM}" == X"YES" ] && \
check_status_before_run rc... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# -----------------------
# Roundcube.
# -----------------------
rcm_install()
{
ECHO_INFO "Configure Roundcube webmail."
# FreeBSD: install via ports tree.
if [ X"${DISTRO}" != X"FREEBSD" ]; then
cd ${MISC_DIR}
#... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
#---------------------------------------------------------------------
# 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: y... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
#---------------------------------------------------------------------
# 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: y... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
procmail_config()
{
ECHO_INFO "Configure Procmail (MDA)."
ECHO_DEBUG "Copy ${SAMPLE_DIR}/procmailrc as ${PROCMAILRC}."
backup_file ${PROCMAILRC}
cp -f ${SAMPLE_DIR}/procmailrc ${PROCMAILRC}
ECHO_DEBUG "Add procmail as pos... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin (michaelbibby <at> gmail.com).
# Date: 2008.04.07
# ---------------------------------------------
# pypolicyd-spf.
# ---------------------------------------------
pypolicyd_spf_config()
{
ECHO_DEBUG "Install pypolicyd-spf for SPF."
cd ${MISC_DIR}
extract_... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# -----------------------------
# PostfixAdmin.
# -----------------------------
postfixadmin_install()
{
ECHO_INFO "Configure PostfixAdmin (web-based mail account management tool)."
if [ X"${DISTRO}" != X"FREEBSD" ]; then
cd ... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# Purpose: Install & config necessary packages for iRedAPD.
#---------------------------------------------------------------------
# This file is part of iRedMail, which is an open source mail server
# solution for Red Hat(R) Enterprise Lin... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# Purpose: Install & config necessary packages for iRedAdmin.
#---------------------------------------------------------------------
# This file is part of iRedMail, which is an open source mail server
# solution for Red Hat(R) Enterprise L... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
#---------------------------------------------------------------------
# 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:... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# -------------------------------------------------
# phpMyAdmin.
# -------------------------------------------------
phpmyadmin_install()
{
ECHO_INFO "Configure phpMyAdmin (web-based MySQL management tool)."
if [ X"${PHPMYADMIN_USE_... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
#---------------------------------------------------------------------
# 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:... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# ---------------------------------------------------------
# SpamAssassin.
# ---------------------------------------------------------
sa_config()
{
ECHO_INFO "Configure SpamAssassin (content-based spam filter)."
backup_file ${SA_LOC... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
#---------------------------------------------------------------------
# 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: y... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
#---------------------------------------------------------------------
# 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:... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# -------------------------------------------------------
# ---------------- User/Group: vmail --------------------
# -------------------------------------------------------
adduser_vmail()
{
ECHO_INFO "Configure User/Group: vmail."
h... | Shell |
#!/usr/bin/env bash
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
#---------------------------------------------------------------------
# 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:... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# ------------------------------
# Define some global variables.
# ------------------------------
export ROOTDIR="$(pwd)"
export CONF_DIR="${ROOTDIR}/conf"
export FUNCTIONS_DIR="${ROOTDIR}/functions"
export DIALOG_DIR="${ROOTDIR}/dialog"
export PKG_DIR=... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com )
# Date: 2008.06.11
# Purpose: Migrate ExtMail MySQL 'mailbox' table to iRedMail format.
# Migration guide wrote in Chinese:
# http://code.google.com/p/iRedMail/wiki/iRedMail_tut_Migration
# Usage:
# English:
# * Run into MySQL command lin... | Shell |
#!/bin/sh
# Filename: get_helo_count.sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# Date: 2008.10.24
# Version: 0.1
# Purpose: Get HELO identified from maillog.
# Project: iRedMail: Open Source Mail Server Solution for Red Hat
# Enterprise Linux and CentOS 5.x.
# - http://code... | Shell |
#!/bin/sh
# -------------------------------------------------------------------
# Filename: create_mail_user_MySQL.sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# Lastest update date: 2008.10.24
# Purpose: Import users to MySQL database from plain text file.
# Project: iRedMail (http://code.google.... | Shell |
#!/bin/sh
# Filename: create_mail_ldap_user.sh
# Author: Zhang Huangbin (michaelbibby#gmail.com)
# Lastest update date: 2009.02.19
# Purpose: Add new OpenLDAP user for postfix mail server.
# Shipped within iRedMail project:
# * http://iRedMail.googlecode.com/
# --------------------------- WARNING ---------------... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com )
# Date: 2008.06.11
# Purpose: Convert WinMail user mailboxs to standard IMAP directory
# structure (mailbox format).
# Migration guide wrote in Chinese:
# http://code.google.com/p/iRedMail/wiki/iRedMail_tut_Migration
# Description:
... | Shell |
#!/bin/sh
# Filename: backup_iRedMail.sh
# Author: Zhang Huangbin (michaelbibby@gmail.com)
# Purpose: Backup all mail server related software configure files.
# Project: Open Source Mail Server Solution for Red Hat Enterprise
# Linux and CentOS 5.x:
# http://code.google.com/p/iredmail/
# ----... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# ---------------------------------------
# RoundcubeMail. http://roundcube.net
# ---------------------------------------
export RCM_VERSION='0.2-stable'
export RCM_TARBALL="roundcubemail-${RCM_VERSION}.tar.gz"
export RCM_HTTPD_ROOT="${HTTPD_SERVERROOT}... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# ------------------------------------------------
# pypolicyd-spf.
# ------------------------------------------------
export PYPOLICYD_SPF_VERSION='0.6.1'
export PYPOLICYD_SPF_TARBALL="pypolicyd-spf-${PYPOLICYD_SPF_VERSION}.tar.gz"
| Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# For phpLDAPadmin.
export PLA_VERSION='1.1.0.6'
export PLA_TARBALL="phpldapadmin-${PLA_VERSION}.tar.gz"
export PLA_HTTPD_ROOT="${HTTPD_SERVERROOT}/phpldapadmin-${PLA_VERSION}"
| Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# Variables for MySQL database server and related.
export MYSQL_FRESH_INSTALLATION='YES'
# If your host is "localhost" MySQL (the commandline tool 'mysql' as well)
# always tries to use the socket connection for speeding up things. If you
# enter "127... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# Variables for pysieved.
export PYSIEVED_INI='/etc/pysieved.ini'
export PYSIEVED_BINDADDR='127.0.0.1'
export PYSIEVED_PORT='2000' # default is '2000'
# Directory to store sieve filter rule files.
export PYSIEVED_RULE_DIR='.sieve'
# We will run py... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# Variables for Postfix and related.
# Set 'message_size_limit', in 'byte'. Default is 10M.
export MESSAGE_SIZE_LIMIT='15728640'
# virtual_maildir_limit_message.
export MAILDIR_LIMIT_MESSAGE="Sorry, the user's maildir has overdrawn the disk quota, ple... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
export PHPMYADMIN_VERSION='2.11.9.4-all-languages'
export PHPMYADMIN_TARBALL="phpMyAdmin-${PHPMYADMIN_VERSION}.tar.bz2"
export PHPMYADMIN_HTTPD_ROOT="${HTTPD_SERVERROOT}/phpMyAdmin-${PHPMYADMIN_VERSION}"
export PHPMYADMIN_CONFIG_FILE="${PHPMYADMIN_HTTPD... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# Variables for OpenLDAP and related.
export OPENLDAP_ROOTDIR="/etc/openldap"
export OPENLDAP_SCHEMA_DIR="${OPENLDAP_ROOTDIR}/schema"
export OPENLDAP_CACERT_DIR="${OPENLDAP_ROOTDIR}/cacerts"
export OPENLDAP_SLAPD_CONF="${OPENLDAP_ROOTDIR}/slapd.conf"
e... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
export POSTFIXADMIN_VERSION='2.2.1.1'
export POSTFIXADMIN_TARBALL="postfixadmin-${POSTFIXADMIN_VERSION}.tar.gz"
export POSTFIXADMIN_HTTPD_ROOT="${HTTPD_SERVERROOT}/postfixadmin-${POSTFIXADMIN_VERSION}"
# Use config.local.php to store settings, so that ... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# Variables for managesieve service.
# NOTE: Please source 'conf/pysieved' first.
export MANAGESIEVE_SERVER="${PYSIEVED_BINDADDR}"
export MANAGESIEVE_PORT="${PYSIEVED_PORT}"
| Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# Variables for horde-webmail and related.
# ---- Horde WebMail ----
export HORDE_VERSION='1.2'
export HORDE_TARBALL="horde-webmail-${HORDE_VERSION}.tar.gz"
export HORDE_HTTPD_ROOT='/var/www/html/horde'
# Database setting.
export HORDE_DB_NAME="horde... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
export PROG_NAME='iRedMail'
export PROG_NAME_LOWERCASE='iredmail'
export PROG_VERSION='0.4-stable'
# -----------------
# ---- Generic ----
# -----------------
# Maildir format: mbox, Maildir.
export HOME_MAILBOX='Maildir'
# Use exist Apache, MySQL, P... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# ----------------------------------------
# For Dovecot and dovecot-sieve.
# ----------------------------------------
export DOVECOT_CONF='/etc/dovecot.conf'
export DOVECOT_LDAP_CONF='/etc/dovecot-ldap.conf'
export DOVECOT_MYSQL_CONF='/etc/dovecot-my... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# For SpamAssassin.
export SA_INIT_PRE='/etc/mail/spamassassin/init.pre'
export SA_LOCAL_CF='/etc/mail/spamassassin/local.cf'
| Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
export CLAMD_CONF='/etc/clamd.conf'
export FRESHCLAM_CONF='/etc/freshclam.conf'
export FRESHCLAM_PID_FILE='/var/run/clamav/freshclam.pid'
export FRESHCLAM_INIT_FILE_SAMPLE="${SAMPLE_DIR}/freshclam.init"
| Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# ----------------------------------------
# For SquirrelMail.
# ----------------------------------------
# Version number for core program: SquirrelMail.
export SM_VERSION='1.4.17'
export SM_TARBALL="squirrelmail-${SM_VERSION}.tar.bz2"
# -----------... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
ECHO_INFO()
{
if [ X"$1" == X"-n" ]; then
shift 1
if [ X"${TERM}" == X"xterm" -o X"${TERM}" == X"linux" -o X"${TERM}" == X"pcconsole" ]; then
echo -ne "\033[42m${INFO_FLAG}\033[0m $@"
else
echo -ne "${... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
export AMAVISD_SERVER='127.0.0.1'
export AMAVISD_CONF='/etc/amavisd.conf'
export AMAVISD_LOGFILE='/var/log/amavisd.log'
export AMAVISD_LOGROTATE_FILE="${LOGROTATE_DIR}/amavisd"
export AMAVISD_DKIM_DIR='/var/lib/dkim'
export AMAVISD_DKIM_SELECTOR='dkim'
... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# Awstats homepage: http://awstats.sf.net/
# Variables for awstats and related.
export AWSTATS_CONF_DIR='/etc/awstats'
export AWSTATS_HTTPD_CONF="${HTTPD_CONF_DIR}/awstats.conf"
export AWSTATS_HTTPD_ROOT="${HTTPD_SERVERROOT}/awstats"
# Used for apach... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# ------------------------------------------------
# Policyd.
# ------------------------------------------------
export POLICYD_CONF='/etc/policyd.conf'
export POLICYD_INIT_SCRIPT='/etc/init.d/policyd'
export POLICYD_BINDHOST='127.0.0.1' # Default valu... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
export PROCMAIL_BIN='/usr/bin/procmail'
export PROCMAILRC='/etc/procmailrc'
export PROCMAIL_LOGFILE='/var/log/procmail.log'
export PROCMAIL_LOGROTATE_FILE="${LOGROTATE_DIR}/procmail"
| Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# Variables for Apache & PHP and related.
# ---- Apache ----
# Refer to files:
# - functions/apache_php.sh
# - functions/misc.sh
export HTTPD_PORT='80'
export HTTPD_SERVERROOT='/var/www'
export HTTPD_DOCUMENTROOT="${HTTPD_SERVERROOT}/html/"
expor... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# chkconfig: 345 90 90
# description: run freshclam as daemon.
. /etc/rc.d/init.d/functions
PROG='freshclam'
FRESHCLAM_BIN='/usr/bin/freshclam'
OPTIONS='-d -c 2'
PID='/var/run/clamav/freshclam.pid'
start()
{
if [ -e ${PID} ]; then
echo -n... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# Date: 2008.09.05
# chkconfig: 345 99 99
# description: run pysieved as daemon.
. /etc/rc.d/init.d/functions
PROG='pysieved'
PYSIEVED_BIN='/usr/sbin/pysieved'
OPTIONS='-c /etc/pysieved.ini'
PID='/var/run/pysieved/pysieved.pid'
start()
{
if [ -e... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# Date: $LastChangedDate: 2008-03-02 21:11:40 +0800 (Sun, 02 Mar 2008) $
# Purpose: Fetch all extra packages we need to build mail server.
ROOTDIR="$(pwd)"
CONF_DIR="${ROOTDIR}/../conf"
. ${CONF_DIR}/global
. ${CONF_DIR}/functions
FETCH_CMD="wg... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# --------------------------------------------------
# --------------------- LDAP -----------------------
# --------------------------------------------------
# LDAP suffix.
${DIALOG} --backtitle "${DIALOG_BACKTITLE}" \
--title "LDAP suffix" \
... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# --------------------------------------------------
# ------------- SPF & DKIM -------------------------
# --------------------------------------------------
${DIALOG} --backtitle "${DIALOG_BACKTITLE}" \
--title "SPF & DKIM" \
--checklist... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# First domain name.
while : ; do
${DIALOG} --backtitle "${DIALOG_BACKTITLE}" \
--title "Your first virtual domain" \
--inputbox "\
Please specify your first virtual domain name.
EXAMPLES:
* iredmail.org
" 20 76 2>/tmp/first_domain
... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com)
# Note: config file will be sourced in 'conf/functions', check_env().
. ./conf/global
. ./conf/functions
trap "exit 255" 2
check_arch
# Initialize config file.
echo '' > ${CONFIG_FILE}
DIALOG='dialog --no-collapse'
DIALOG_BACKTITLE="${PROG_NAME}: M... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# --------------------------------------------------
# ------------------- PostfixAdmin -----------------
# --------------------------------------------------
# Username of PostfixAdmin site admin.
while :; do
${DIALOG} --backtitle "${DIALOG_BACK... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# --------------------------------------------------
# --------------------- MySQL ----------------------
# --------------------------------------------------
. ${CONF_DIR}/mysql
# MySQL root password.
while : ; do
${DIALOG} --backtitle "${DIALO... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# Set default language for webmails.
${DIALOG} --backtitle "${DIALOG_BACKTITLE}" \
--title "Choose the default language for your webmail(s)" \
--radiolist "\
Choose the default language for your webmail(s):
TIP:
* Use 'Space' key to select... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# --------------------------------------------------
# -------------------- Awstats ---------------------
# --------------------------------------------------
. ${CONF_DIR}/awstats
if [ X"${BACKEND}" == X"OpenLDAP" -o X"${BACKEND}" == X"MySQL" ]; then... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
awstats_config_basic()
{
[ -f ${AWSTATS_CONF_SAMPLE} ] && dos2unix ${AWSTATS_CONF_SAMPLE} >/dev/null 2>&1
ECHO_INFO "Generate apache config file for awstats: ${AWSTATS_HTTPD_CONF}."
backup_file ${AWSTATS_HTTPD_CONF}
cat > ${AWSTATS_HTT... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# Please refer another file: functions/backend.sh
# -------------------------------------------------------
# -------------------- MySQL ----------------------------
# -------------------------------------------------------
mysql_initialize()
{
ECH... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# -------------------------------------------------------
# ------------------- phpLDAPadmin ----------------------
# -------------------------------------------------------
pla_install()
{
cd ${MISC_DIR}
extract_pkg ${PLA_TARBALL} ${HTTPD_SERV... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# --------------------------------------------
# Amavisd-new.
# --------------------------------------------
amavisd_dkim()
{
pem_file="${AMAVISD_DKIM_DIR}/${FIRST_DOMAIN}.pem"
ECHO_INFO "Create directory to store CA files: ${AMAVISD_DKIM_DIR}... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# Configure pysieved.
pysieved_config()
{
backup_file ${PYSIEVED_INI}
ECHO_INFO "Setting up managesieve server: pysieved."
cat > ${PYSIEVED_INI} <<EOF
${CONF_MSG}
[main]
# Authentication back-end to use
auth = Dovecot
# User DB back-... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# -------------------------------------------------------
# Dovecot & dovecot-sieve.
# -------------------------------------------------------
# For dovecot SSL support.
enable_dovecot_ssl()
{
ECHO_INFO "Enable TLS support in Dovecot."
[ X"${E... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# -------------------------------------------
# Install all optional components.
# -------------------------------------------
optional_components()
{
if [ X"${USE_SM}" == X"YES" ]; then
# ------------------------------------------------
... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# -----------------------
# Roundcube.
# -----------------------
rcm_install()
{
cd ${MISC_DIR}
# Extract source tarball.
extract_pkg ${RCM_TARBALL} ${HTTPD_SERVERROOT}
ECHO_INFO "Set correct permission for Roundcubemail: ${RCM_HTTPD_R... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
install_all()
{
ALL_PKGS=''
ENABLED_SERVICES=''
DISABLED_SERVICES=''
# Apache and PHP.
if [ X"${USE_EXIST_AMP}" != X"YES" ]; then
# Apache.
ALL_PKGS="${ALL_PKGS} httpd.${ARCH} mod_ssl.${ARCH}"
# PHP.
... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
horde_install()
{
cd ${MISC_DIR}
# Extract source tarball.
extract_pkg ${HORDE_TARBALL} ${HTTPD_DOCUMENTROOT}
mv ${HTTPD_DOCUMENTROOT}/horde-webmail-${HORDE_VERSION} ${HORDE_HTTPD_ROOT}
ECHO_INFO "Set correct permission for Horde w... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
enable_procmail()
{
ECHO_INFO "Setup procmail as Mail Deliver Agent(MDA)."
ECHO_INFO "Copy ${SAMPLE_DIR}/procmailrc as ${PROCMAILRC}."
cp -f ${SAMPLE_DIR}/procmailrc ${PROCMAILRC}
ECHO_INFO "Setup Postfix transport in ${POSTFIX_FILE_MA... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# -------------------------------------------
# Misc.
# -------------------------------------------
disable_selinux()
{
ECHO_INFO "Disable SELinux."
[ -f /etc/selinux/config ] && perl -pi -e 's#^(SELINUX=)(.*)#${1}disabled#' /etc/selinux/config
... | Shell |
#!/bin/sh
# Author: Zhang Huangbin (michaelbibby <at> gmail.com).
# Date: 2008.04.07
# ---------------------------------------------
# pypolicyd-spf.
# ---------------------------------------------
pypolicyd_spf_config()
{
ECHO_INFO "Install pypolicyd-spf for SPF."
cd ${MISC_DIR}
extract_pkg ${PYPOL... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# -----------------------------
# PostfixAdmin.
# -----------------------------
postfixadmin_install()
{
cd ${MISC_DIR}
extract_pkg ${POSTFIXADMIN_TARBALL} ${HTTPD_SERVERROOT} && \
cd ${POSTFIXADMIN_HTTPD_ROOT}/ && \
patch -p0 < ${PATCH... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# --------------------------------------------
# ClamAV.
# --------------------------------------------
clamav_config()
{
ECHO_INFO "Configure ClamAV: ${CLAMD_CONF}."
perl -pi -e 's/^(TCPSocket.*)/#${1}/' ${CLAMD_CONF}
perl -pi -e 's/^(TCPA... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# -------------------------------------------------
# phpMyAdmin.
# -------------------------------------------------
phpmyadmin_install()
{
cd ${MISC_DIR}
extract_pkg ${PHPMYADMIN_TARBALL} ${HTTPD_SERVERROOT}
ECHO_INFO "Set file permissio... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# -------------------------------------------------------
# ---------------- Apache & PHP -------------------------
# -------------------------------------------------------
apache_php_config()
{
backup_file ${HTTPD_CONF}
# -------------------... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# ---------------------------------------------------------
# SpamAssassin.
# ---------------------------------------------------------
sa_config()
{
backup_file ${SA_LOCAL_CF}
ECHO_INFO "Generate new configuration file: ${SA_LOCAL_CF}."
cp... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# -------------------------------------------------------
# ---------------------- Postfix ------------------------
# -------------------------------------------------------
postfix_config_basic()
{
backup_file ${POSTFIX_FILE_MAIN_CF}
ECHO_INF... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# -------------------------------------------------------
# ------------------- OpenLDAP --------------------------
# -------------------------------------------------------
openldap_config()
{
backup_file ${OPENLDAP_SLAPD_CONF} ${OPENLDAP_LDAP_C... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# -------------------------------------------------------
# ---------------- User/Group: vmail --------------------
# -------------------------------------------------------
adduser_vmail()
{
homedir="$(dirname $(echo ${VMAIL_USER_HOME_DIR} | sed 's... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# -------------------------------------------------------
# ------------- Install and config backend. -------------
# -------------------------------------------------------
backend_install()
{
if [ X"${BACKEND}" == X"OpenLDAP" ]; then
# Ins... | Shell |
#!/bin/sh
# Author: Zhang Huangbin <michaelbibby (at) gmail.com>
# ---------------------------------------------------------
# SqruirrelMail.
# ---------------------------------------------------------
sm_install()
{
cd ${MISC_DIR}
# Extract source tarball.
extract_pkg ${SM_TARBALL} ${HTTPD_SERVERROOT}
... | Shell |
#!/bin/sh -x
# Based on the vmlinux file create the System.map file
# System.map is used by module-init tools and some debugging
# tools to retrieve the actual addresses of symbols in the kernel.
#
# Usage
# mksysmap vmlinux System.map
#####
# Generate System.map (actual filename passed as second argument)
# $NM pro... | Shell |
#!/bin/sh
# Check ncurses compatibility
# What library to link
ldflags()
{
$cc -print-file-name=libncursesw.so | grep -q /
if [ $? -eq 0 ]; then
echo '-lncursesw'
exit
fi
$cc -print-file-name=libncurses.so | grep -q /
if [ $? -eq 0 ]; then
echo '-lncurses'
exit
fi
$cc -print-file-name=libcurses.so | gre... | Shell |
#!/bin/bash
# Cross-Compiler Toolchain for ${PLATFORM}
# by Martin Decky <martin@decky.cz>
#
# GPL'ed, copyleft
#
check_error() {
if [ "$1" -ne "0" ]; then
echo
echo "Script failed: $2"
exit
fi
}
BINUTILS_VERSION="2.17"
GCC_VERSION="4.1.1"
BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz"
GCC_CORE="gcc-c... | Shell |
#!/bin/sh
# Generates a small Makefile used in the root of the output
# directory, to allow make to be started from there.
# The Makefile also allow for more convinient build of external modules
# Usage
# $1 - Kernel src directory
# $2 - Output directory
# $3 - version
# $4 - patchlevel
test ! -r $2/Makefile -o -O $... | Shell |
#!/bin/sh
# Print additional version information for non-release trees.
usage() {
echo "Usage: $0 [srctree]" >&2
exit 1
}
cd "${1:-.}" || usage
# Check for git and a git repo.
if head=`git rev-parse --verify HEAD 2>/dev/null`; then
# Do we have an untagged version?
if git name-rev --tags HEAD | grep -E '^HEAD[[:... | Shell |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.