• 35阅读
  • 0回复

DirectAdmin Freebsd 邮件的设置

离线 jack
级别: 管理员
0  发表于: 01-13 , 来自: From:江苏省常州市
In this how-to, we'll outline how to install a fresh exim binary for your system. For compatibilities reasons, we'll make this a non-static binary, as since it's compiled right on your own system, you won't have any library issues.

We'll use exim 4.76 for this example.  Change all occurances of 4.76 to the version you want to use.

wget http://files.directadmin.com/services/custombuild/exim-4.77.tar.gz
tar xvzf exim-4.77.tar.gz
cd exim-4.77/Local
wget http://www.directadmin.com/Makefile
perl -pi -e 's/^EXTRALIBS/#EXTRALIBS/' Makefile
perl -pi -e 's/HAVE_ICONV=yes/HAVE_ICONV=no/' Makefile
cd ..
make
make installThis will give you a new /usr/sbin/exim-4.77-1 binary which won't be what you want.. you'll need to rename it to /usr/sbin/exim:
cp -f /usr/sbin/exim-4.77-1 /usr/sbin/exim
chmod 4755 /usr/sbin/exim
Remember to restart exim after you're finished.







#!/bin/sh
#
# $FreeBSD: ports/mail/exim/files/exim.sh.in,v 1.2 2010/03/27 00:13:15 dougb Exp $
#

# PROVIDE: mail
# REQUIRE: LOGIN
# KEYWORD: shutdown
#       we make mail start late, so that things like .forward's are not
#       processed until the system is fully operational

#
# Add the following lines to /etc/rc.conf to enable exim:
#
#exim_enable="YES"
#
# See exim(8) for flags
#

. /etc/rc.subr

name=exim
rcvar=`set_rcvar`

command=/usr/sbin/exim
pidfile=/var/run/exim.pid
required_dirs=/var/log/exim
required_files=/usr/local/etc/exim/configure

start_precmd=start_precmd
stop_postcmd=stop_postcmd

extra_commands="reload"

start_precmd()
{
  case $sendmail_enable in
  [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
    warn "sendmail_enable should be set to NONE"
    ;;
  [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0)
    case $sendmail_submit_enable in
    [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
      warn "sendmail_submit_enable should be set to NO"
      ;;
    esac
    ;;
  [Nn][Oo][Nn][Ee])
    ;;
  esac
}

stop_postcmd()
{
  rm -f $pidfile
}

# read settings, set default values
load_rc_config $name
: ${exim_enable="NO"}
: ${exim_flags="-bd -q30m"}

run_rc_command "$1"
发帖 回复
« 返回列表
描述
快速回复