Postfix mailer and Dovecot

Revision as of 20:15, 25 June 2007 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Postfix mailer and Dovecot

__   _
  -o)/ /  (_)__  __ ____  __      Derek Winterstien
  /\\ /__/ / _ \/ // /\ \/ /      r.o.a.c.h.@.r.o.b.o.t.z...c.o.m
 _\_v __/_/_//_/\_,_/ /_/\_\      Trustix Secure Linux / Redhat Linux
..............................................................................

(A). Postfix

Postfix should be configured to start up on boot

  chkconfig Postfix on 

Make some configuration changes in postfix

  vi /etc/postfix/main.cf

Add / Modify the following

inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, $mydomain
myorigin = $mydomain


(B). Dovecot

Install from RPM or latest from source. 20:15, 25 June 2007 (CDT)20:15, 25 June 2007 (CDT)20:15, 25 June 2007 (CDT)20:15, 25 June 2007 (CDT)20:15, 25 June 2007 (CDT)20:15, 25 June 2007 (CDT)20:15, 25 June 2007 (CDT)20:15, 25 June 2007 (CDT)20:15, 25 June 2007 (CDT)20:15, 25 June 2007 (CDT)20:15, 25 June 2007 (CDT)20:15, 25 June 2007 (CDT)20:15, 25 June 2007 (CDT)20:15, 25 June 2007 (CDT)20:15, 25 June 2007 (CDT)Admin

Compiling Dovecot From Sources:

./configure
make
sudo make install

Redhat/Fedora

You will need to create a file under /etc/pam.d named dovecot with the following info:

auth    required        pam_unix.so nullok
account required        pam_unix.so


SysV Init Script for dovecot:

#!/bin/bash
#
# Init file for Dovecot on Trustix Linux
# Dovecot was compiled from source.
# Written by Derek B. Winterstien
# http://linux.dbw.org/
# Star City Linux User Group

source /etc/init.d/functions

[ -x /usr/local/sbin/dovecot ] || exit 1
[ -r /usr/local/etc/dovecot.conf ] || exit 1

RETVAL=0
prog="dovecot"
desc="dovecot daemon"

start() {
        echo -n $"Starting $desc ($prog): "
        daemon $prog
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
        return $RETVAL
}

stop() {
        echo -n $"Shutting down $desc ($prog): "
        killproc $prog
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
        return $RETVAL
}

restart() {
        stop
        start
}

reload() {
        echo -n $"Reloading $desc ($prog): "
        killproc $prog -HUP
        RETVAL=$?
        echo
        return $RETVAL
}

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        restart
        ;;
  reload)
        reload
        ;;
  condrestart)
        [ -e /var/lock/subsys/$prog ] && restart
        RETVAL=$?
        ;;
  status)
        status $prog
        RETVAL=$?
        ;;
  *)
        echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
        RETVAL=1
esac

exit $RETVAL


Last modified on 25 June 2007, at 20:15