LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Mail Quickstart? (https://www.linuxquestions.org/questions/slackware-14/mail-quickstart-133309/)

gonzo_the_great 01-10-2004 02:37 AM

Mail Quickstart?
 
Any quick setup advice for mail under Slackware?

I've been running Slack from 8.1 to 9.0 as my desktop system and my
firewall/server, and though I've managed to patiently shed gui for
everything else, mail is still being done with netscape. It seems
like Mutt and an MTA (as far as I understand them) would be much more
fun; but setting up mail still seems like quantum physics to me. Is
it actually possible to get mail operating under run level 3?!

I've read through Mail-Administrator-HOWTO, Mail-User-HOWTO, and the
chapter on mail setup in O'Reilly's ``Running Linux'', but these all
refer to different technologies. Slack's /etc/rc.d/ files make it
look like the system wants to run sendmail (as an MTA?) by default.
But how do I configure? If the answer is ``do man sendmail'', then
I think I might put it off another couple of years.

Is mail really as complex as it seems, or have I just missed that
crucial HOWTO? Is there just one configuration file and two commands
that I happen to not know about?

Thanks in advance.

linuxJaver 01-10-2004 03:14 AM

I was like u untill yesterday, not so correct untill half week ago.

Know wut do I do with sendmail ?
cd /var/log/packages
ls -la sendmail*
removepkg sendmail-....

Then I installed postfix from http://www.postfix.com
Get the source-tarball, extract into /usr/local/src
cd /usr/local/src/postfix-...
read the INSTALL
<<need to create user postfix, group postfix,postdrop>>
make makefile
make
make install
<<during make install u can easily let it choose it's defaults>>

With a little configuration on /etc/postfix/main.cf u ll be able to send mail to yahoo account already. See man postfix, how to start, then have a look into /var/log/maillog to see the error u must correct, it won't be hard. after one or todays u ll say bye bye forever to sendmail. I regreted why not do that earlier .. :D

dirstyGuy 01-10-2004 03:56 AM

I've modified the rc.sendmail to be rc.postfix, if some body interested:
-----------------------------------------------------------------------------
Code:

#!/bin/sh
# /etc/rc.d/rc.postfix, make a symbolic link from rc.sendmail to it
# Start/stop/restart postfix.

SCRIPT=`basename $0`
PFX=/usr/sbin/postfix

postfix_check() {
  [ -x $PFX ] && postfix check
}

# Force delivery: attempt to deliver every message in the deferred
# mail queue. Normally, delivery of delayed mail happen at regular
# intervals, the interval doubling after each failed attempt.
postfix_flush() {
  [ -x $PFX ] && postfix flush
}

# Reload: reread configuration files. Running processes terminated
# at their earliest convenience.
postfix_reload() {
  [ -x $PFX ] && postfix reload
}

# Start postfix, also do a configuration check
postfix_start() {
  if [ -x $PFX ]; then
    echo "Starting postfix mail system with MAIL_VERBOSE 1"
    $PFX -v start
    # Run each Postfix daemon under a debugger control as specified
    # via the debugger_command parameter, set MAIL_DEBUG environment
    # $PFX -D start
  fi
}

# Stop postfix orderly, running processes allowed to terminate
# at their earliest convenience
postfix_stop() {
  [ -x $PFX ] && postfix stop
}

# Stop abruptly, running processes signaled to stop immediately
postfix_abort() {
  [ -x $PFX ] && postfix abort
  # killall postfix
}

# Restart postfix:
postfix_restart() {
  postfix_stop
  sleep 1
  postfix_start
}

# This is usefull for filtering the important infos out from /var/log/maillog
postfix_status() {
  echo -e "\n\tegrep '(reject|warning|error|fatal|panic):' /var/log/maillog"
  egrep '(reject|warning|error|fatal|panic):' /var/log/maillog
}

case "$1" in
  'status')  postfix_status ;;
  'check')  postfix_check ;;
  'flush')  postfix_flush ;;
  'reload')  postfix_reload ;;
  'start')  postfix_start ;;
  'stop')    postfix_stop ;;
  'abort')  postfix_abort ;;
  'restart') postfix_restart ;;
  *) echo -e "\n\tUSAGE: $SCRIPT check|flush|reload|start|stop|abort|restart\n"
esac


gonzo_the_great 01-15-2004 07:41 PM

Thanks guys! It took me a while to get back to the problem, but Postfix built and installed without a hitch (I just love the feeling of getting that 0 return value after the first shot at ``make''!), and I'm underway. The rc.postfix is a really nice idea, dirstyGuy.

dirstyGuy 01-15-2004 09:22 PM

The functionality "rc.postfix status" is cool for checking for errors while u r configuring on /etc/postfix/main.cf. Have to feed some informations about ur hostname,domain, create the aliases.db then it should be good supposed ur DNS is already configured with valid MX-records..

To have slack run it at boot time, look at /etc/rc.d/rc.M, I modified it to run rc.postfix:

Code:

at /etc/rc.d/rc.M line 179
# Start the sendmail daemon:
if [ -x /etc/rc.d/rc.potsfix ]; then
  . /etc/rc.d/rc.postfix start
elif [ -x /etc/rc.d/rc.sendmail ]; then
  . /etc/rc.d/rc.sendmail start
fi



All times are GMT -5. The time now is 04:18 PM.