The Perfect Setup - Ubuntu 6.06 LTS Server

Discussion in 'HOWTO-Related Questions' started by tommytomato, Jun 9, 2007.

  1. tommytomato

    tommytomato New Member

    I've had a look for any mistakes, I cant seem to see any

    where would you reckon looking :confused:

    TT
     
  2. falko

    falko Super Moderator Howtoforge Staff

    What's in /etc/default/saslauthd and /etc/init.d/saslauthd?
     
  3. tommytomato

    tommytomato New Member

    Code:
    root@rockinghamgateway:~# cat /etc/default/saslauthd
    # This needs to be uncommented before saslauthd will be run automatically
     START=yes 
     PARAMS="-m /var/spool/postfix/var/run/saslauthd -r":
    # You must specify the authentication mechanisms you wish to use.
    # This defaults to "pam" for PAM support, but may also include
    # "shadow" or "sasldb", like this:
    # MECHANISMS="pam shadow"
    
    Code:
    cat /etc/init.d/saslauthd
    #!/bin/sh -e
    
    NAME=saslauthd
    DAEMON="/usr/sbin/${NAME}"
    DESC="SASL Authentication Daemon"
    DEFAULTS=/etc/default/saslauthd
    PWDIR=/var/run/saslauthd
    PIDFILE="/var/spool/postfix/var/run/${NAME}/saslauthd.pid"
    
    createdir() {
    # $1 = user
    # $2 = group
    # $3 = permissions (octal)
    # $4 = path to directory
            [ -d "$4" ] || mkdir -p "$4"
            chown -c -h "$1:$2" "$4"
            chmod -c "$3" "$4"
    }
    
    test -f "${DAEMON}" || exit 0
    
    # Source defaults file; edit that file to configure this script.
    if [ -e "${DEFAULTS}" ]; then
        . "${DEFAULTS}"
    fi
    
    # If we're not to start the daemon, simply exit
    if [ "${START}" != "yes" ]; then
        exit 0
    fi
    
    # If we have no mechanisms defined
    if [ "x${MECHANISMS}" = "x" ]; then
        echo "You need to configure ${DEFAULTS} with mechanisms to be used"
        exit 0
    fi
    
    # Add our mechanimsms with the necessary flag
    PARAMS="${PARAMS} -a ${MECHANISMS}"
    
    START="--start --quiet --pidfile ${PIDFILE} --startas ${DAEMON} --name ${NAME} -- ${PARAMS}"
    
    # Consider our options
    case "${1}" in
      start)
            echo -n "Starting ${DESC}: "
            dir=`dpkg-statoverride --list $PWDIR`
            test -z "$dir" || createdir $dir
            if start-stop-daemon ${START} >/dev/null 2>&1 ; then
                    echo "${NAME}."
            else
                    if start-stop-daemon --test ${START} >/dev/null 2>&1; then
                            echo "(failed)."
                            exit 1
                    else
                            echo "${DAEMON} already running."
                            exit 0
                    fi
            fi
            ;;
      stop)
            echo -n "Stopping ${DESC}: "
            if start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" \
                    --startas ${DAEMON} --retry 10 --name ${NAME} \
                    >/dev/null 2>&1 ; then
                            echo "${NAME}."
            else
                    if start-stop-daemon --test ${START} >/dev/null 2>&1; then
                            echo "(not running)."
                            exit 0
                    else
                            echo "(failed)."
                            exit 1
                    fi
            fi
            ;;
      restart|force-reload)
            $0 stop
            exec $0 start
            ;;
      *)
            echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
            exit 1
            ;;
    esac
    
    exit 0
    
    TT
     
  4. falko

    falko Super Moderator Howtoforge Staff

    /etc/default/saslauthd must look like this:

    Code:
    # This needs to be uncommented before saslauthd will be run automatically
    START=yes
    
    PARAMS="-m /var/spool/postfix/var/run/saslauthd -r"
    
    # You must specify the authentication mechanisms you wish to use.
    # This defaults to "pam" for PAM support, but may also include
    # "shadow" or "sasldb", like this:
    # MECHANISMS="pam shadow"
    
    MECHANISMS="pam"
    What's the output of
    Code:
    ls -la /var/spool/postfix/var/run
    ?
     
  5. tommytomato

    tommytomato New Member

    Code:
    root@rockinghamgateway:~# ls -la /var/spool/postfix/var/run
    total 12
    drwxr-xr-x 3 root root 4096 2007-06-23 08:05 .
    drwxr-xr-x 3 root root 4096 2007-06-23 08:05 ..
    drwxr-xr-x 2 root root 4096 2007-06-23 08:05 saslauthd
    TT
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Try a
    Code:
    chmod -R 777 /var/spool/postfix/var/run/saslauthd
    Does it work then?
     
  7. tommytomato

    tommytomato New Member

    I tried , came up with this message

    whats it mean :confused:

    TT
     
    Last edited: Jun 29, 2007
  8. tommytomato

    tommytomato New Member

    i'm trying but I'm getting these messages

    and

    has any oner else set up a GUI email cleint to send and recive mail from another PC contecting to the server in question, ( hope that makes sence :eek: )

    TT
     
  9. falko

    falko Super Moderator Howtoforge Staff

    When exactly do you see this message? :confused:
     
  10. tommytomato

    tommytomato New Member

    it came up when i tried to send mail from the tommytomato account

    TT
     
  11. falko

    falko Super Moderator Howtoforge Staff

    What's in your mail log when this happens?
     
  12. tommytomato

    tommytomato New Member

    falko

    guess what it seems to be sending mail :) I will log into my hotmail account and find out

    here is the last two logs in the mail.log

    Code:
    Jul  3 07:54:19 rockinghamgateway courierpop3login: LOGIN, user=tommytomato, ip=[::ffff:192.168.1.7]
    Jul  3 07:54:19 rockinghamgateway courierpop3login: LOGOUT, user=tommytomato, ip=[::ffff:192.168.1.7], top=0, retr=0, time=0
    root@rockinghamgateway:~# 
    
    P.S
    Yes i recive the mail in the hotmail account, will now try and send one back to sender address

    edit yep i had to open the router ports up to recive mail from the outside, but it worked.

    thanks for the support flako, is this system pretty sercue from spammers ?

    TT
     
    Last edited: Jul 3, 2007
  13. tommytomato

    tommytomato New Member

    while i'm at it falko how do i got about installing anti virus on the system

    I've set this up mainly for our family, not as a internet web site email server

    TT
     
  14. falko

    falko Super Moderator Howtoforge Staff

Share This Page