svn path=/trunk/; revision=2408
# file, that will be used by the program "fetchmail" to connect to
# your mail domain and retrieve your mail.
# This script is linux specific, so it may not work on another system.
# file, that will be used by the program "fetchmail" to connect to
# your mail domain and retrieve your mail.
# This script is linux specific, so it may not work on another system.
-# Kent Robotti <krobotti@erols.com> (7-29-98)
+# Kent Robotti <krobot@erols.com> (3-9-99)
-echo "Remote mail site?: foo.boo.com <-Your service providers mail domain name.)"
+echo "Remote mail site?: pop.boo.com <Your service providers mail domain name>"
echo -n "Remote mail site?: "
read SITE
echo
echo -n "Remote mail site?: "
read SITE
echo
-echo "Protocol?: pop3 <-My service provider uses the 'pop3' mail protocol.)"
-echo "Protocol?: auto <-If not sure put: auto"
-echo "Choices: pop2 pop3 apop imap imap-k4 kpop rpop etrn auto"
+echo "Protocol?: pop3 <My service provider uses the 'pop3' mail protocol>"
+echo "Protocol?: auto <If not sure put: auto>"
+echo "Choices: apop auto etrn imap imap-gss imap-k4 kpop pop2 pop3 rpop sdps"
echo -n "Protocol?: "
read PROTO
echo
echo -n "Protocol?: "
read PROTO
echo
-echo "Remote username?: jerry <-My username or login is jerry.)"
+echo "Remote username?: jerry <My username or login is jerry>"
echo -n "Remote username?: "
read USR
echo
echo -n "Remote username?: "
read USR
echo
-echo "Remote password?: ? <-What's the password for?: $USR"
+echo "Remote password?: ? <What's the password for?: $USR>"
echo -n "Remote password?: "
read PASS
echo -n "Remote password?: "
read PASS
-if [ -s $HOME/.fetchmailrc ]; then
-mv $HOME/.fetchmailrc $HOME/.fetchmailrc.OLD
-fi
-
echo 'poll "'$SITE'"' > $HOME/.fetchmailrc
echo "protocol $PROTO" >> $HOME/.fetchmailrc
echo 'username "'$USR'"' >> $HOME/.fetchmailrc
echo 'password "'$PASS'"' >> $HOME/.fetchmailrc
echo 'poll "'$SITE'"' > $HOME/.fetchmailrc
echo "protocol $PROTO" >> $HOME/.fetchmailrc
echo 'username "'$USR'"' >> $HOME/.fetchmailrc
echo 'password "'$PASS'"' >> $HOME/.fetchmailrc
-ps x >/tmp/grep.tmp 2>/dev/null
+ps ax >/tmp/grep.tmp 2>/dev/null
+
+if [ -s /etc/sendmail.cf ]; then
+CF=/etc/sendmail.cf
+elif [ -s /etc/mail/sendmail.cf ]; then
+CF=/etc/mail/sendmail.cf
+fi
-if [ -s /tmp/grep.tmp ]; then
+if [ -s /tmp/grep.tmp ] && [ ! "$CF" = "" ]; then
if cat /tmp/grep.tmp | grep "sendmail: accepting" >/dev/null 2>&1 &&
if cat /tmp/grep.tmp | grep "sendmail: accepting" >/dev/null 2>&1 &&
-grep "A=procmail" /etc/sendmail.cf >/dev/null 2>&1 ; then
+grep "A=procmail" $CF >/dev/null 2>&1 ; then
cat $HOME/.fetchmailrc
if [ ! "$MAIL" = "" ]; then
cat $HOME/.fetchmailrc
if [ ! "$MAIL" = "" ]; then
-echo "Fetchmail will retrieve your mail and put it in: $MAIL"
-if [ ! -s "$MAIL" ]; then
+echo "Fetchmail will retrieve your mail and put it in:"
+echo "$MAIL"
+if [ ! -f "$MAIL" ]; then
touch $MAIL 2>/dev/null
chmod 600 $MAIL 2>/dev/null
fi
touch $MAIL 2>/dev/null
chmod 600 $MAIL 2>/dev/null
fi
echo
echo "WARNING: There's no way to know if sendmail is set up"
echo "properly for local mail delivery, so the first time you"
echo
echo "WARNING: There's no way to know if sendmail is set up"
echo "properly for local mail delivery, so the first time you"
-echo "run fetchmail, run it this way. -> ~# fetchmail -k"
+echo "run fetchmail run it this way: # fetchmail -k"
echo
echo "If the mail that fetchmail retrieves is not put in your mailbox,"
echo "you'll know that sendmail is not set up properly in the"
echo
echo "If the mail that fetchmail retrieves is not put in your mailbox,"
echo "you'll know that sendmail is not set up properly in the"
-echo "/etc/sendmail.cf file, for delivery of local mail."
+echo "$CF file for delivery of local mail."
echo
elif [ "$MDA" = "2" ]; then
echo
elif [ "$MDA" = "2" ]; then
-echo "I put that (m)ail (d)elivery (a)gent in .fetchmailrc,"
+echo "I put that (m)ail (d)elivery (a)gent in .fetchmailrc"
echo "because i found it on your system, this doesn't mean"
echo "it's correct or the one you want to use."
echo
echo "The first time you run fetchmail, you should run it"
echo "because i found it on your system, this doesn't mean"
echo "it's correct or the one you want to use."
echo
echo "The first time you run fetchmail, you should run it"
-echo "this way. -> ~# fetchmail -k"
+echo "this way: # fetchmail -k"
echo
elif [ "$MDA" = "3" ]; then
echo "I Don't know what (m)ail (d)elivery (a)gent you're going to use."
echo
elif [ "$MDA" = "3" ]; then
echo "I Don't know what (m)ail (d)elivery (a)gent you're going to use."
echo mda '"/bin/mail.local %s"'
echo
echo "The first time you run fetchmail, you should run it"
echo mda '"/bin/mail.local %s"'
echo
echo "The first time you run fetchmail, you should run it"
-echo "this way. -> ~# fetchmail -k"
+echo "this way: # fetchmail -k"