A new user interface for you! Read more...

File fetchmail-6.3.26-fix-bashisms.patch of Package fetchmail

diff -Ndur fetchmail-6.3.26/contrib/fetchsetup fetchmail-6.3.26-fix-bashisms/contrib/fetchsetup
--- fetchmail-6.3.26/contrib/fetchsetup	2013-04-23 23:00:45.000000000 +0300
+++ fetchmail-6.3.26-fix-bashisms/contrib/fetchsetup	2014-11-17 03:06:58.995333083 +0200
@@ -64,8 +64,8 @@
 echo 'username "'$USR'"' >> $HOME/.fetchmailrc
 echo 'password "'$PASS'"' >> $HOME/.fetchmailrc
 
-PROCMAIL=`type -all procmail | sed -n "1 p" | cut -d' ' -f3`
-SENDMAIL=`type -all sendmail | sed -n "1 p" | cut -d' ' -f3`
+type procmail >/dev/null 2>&1 && PROCMAIL=procmail || PROCMAIL=
+type sendmail >/dev/null 2>&1 && SENDMAIL=sendmail || SENDMAIL=
 
 if [ ! "$PROCMAIL" = "" ]; then
     echo 'mda "'$PROCMAIL -d %s'"' >> $HOME/.fetchmailrc
diff -Ndur fetchmail-6.3.26/contrib/runfetchmail fetchmail-6.3.26-fix-bashisms/contrib/runfetchmail
--- fetchmail-6.3.26/contrib/runfetchmail	2011-06-06 18:08:24.000000000 +0300
+++ fetchmail-6.3.26-fix-bashisms/contrib/runfetchmail	2014-11-17 03:17:54.596288732 +0200
@@ -90,11 +90,11 @@
 
 # Trap errors
 trap "rm -f $TMP; echo ""Exiting at user request"" ; \
-test $TIMER -eq 1 && timer -stop -id $$ >/dev/null; exit 1" \
+test $TIMER -eq 1 && timer -stop -id $$ >/dev/null; exit 1" \
 2 3 4 15
 
 # Source the user's rc file if it exists
-test -e $HOME/.runfetchmailrc && . $HOME/.runfetchmailrc
+test -e $HOME/.runfetchmailrc && . $HOME/.runfetchmailrc
 
 num_mail()
 { # This procedure tells me how many messages there are in each folder
@@ -110,7 +110,7 @@
 getmail()
 { # Fetch the mail!
 
-test $TIMER -eq 1 && timer -start -id $$ -quiet
+test $TIMER -eq 1 && timer -start -id $$ -quiet
 
 $FETCHMAIL $@
 
@@ -118,25 +118,29 @@
 echo "Now sleeping for $LATENT seconds..."
 echo -n "Zzz...Zzz...Zzz..."
 sleep $LATENT
-echo "wakeup time! <yawn>"
+echo "wakeup time! <yawn>"
 }
 
 stats()
 { # Prepare the statistics
 
 # Ensure we have a log file
-test ! -e $LOG &amp;&amp; touch $LOG  
+test ! -e $LOG && touch $LOG
 
-echo -e "\n\t\t\t   $VERSION Statistics"
-test $MAILSTAT -eq 1 &amp;&amp; mailstat -k &lt;$LOG
+echo
+echo "			   $VERSION Statistics"
+test $MAILSTAT -eq 1 && mailstat -k <$LOG
 echo ""
 num_mail $FOLDERS
-test $TIMER -eq 1 &amp;&amp; echo -e "\n`timer -stop -id $$ -quiet` have elapsed."
+if [ $TIMER -eq 1 ]; then
+	echo
+	echo "`timer -stop -id $$ -quiet` have elapsed."
+fi
 }
 
 prepmail()
 { # Let's prepare our e-mail
-cat &lt;&lt;EOF &gt;$TMP
+cat <<EOF >$TMP
 From: $LOGNAME ($VERSION)
 To: $LOGNAME
 X-Loop: $SELF
@@ -152,10 +156,10 @@
 clear
 
 # Create and secure the temporary file
-test $E_MAIL -eq 1 &amp;&amp; { cat /dev/null &gt;$TMP; chmod 600 $TMP }
+test $E_MAIL -eq 1 && { cat /dev/null >$TMP; chmod 600 $TMP; }
 
 # Prepare the e-mail before the logs are added to it
-test $E_MAIL -eq 1 &amp;&amp; prepmail
+test $E_MAIL -eq 1 && prepmail
 
 # See if we are downloading every message or not
 if test "$1" = "-every"
@@ -165,15 +169,15 @@
 fi
 
 # Fetch the mail and have the output written to stdout and (optionally) $TMP
-test $E_MAIL -eq 1 &amp;&amp; getmail $@ 2&gt;&amp;1 |tee -a $TMP || getmail $@
+test $E_MAIL -eq 1 && getmail $@ 2>&1 |tee -a $TMP || getmail $@
 
 clear
 
 # Do the same thing with the statistics
-test $E_MAIL -eq 1 &amp;&amp; stats $@ 2&gt;&amp;1 |tee -a $TMP || stats $@
+test $E_MAIL -eq 1 && stats $@ 2>&1 |tee -a $TMP || stats $@
 
 # Now send $TMP to myself and clean up the mess
-test $E_MAIL -eq 1 &amp;&amp; { cat $TMP |$SENDMAIL; rm -f $TMP }
+test $E_MAIL -eq 1 && { cat $TMP |$SENDMAIL; rm -f $TMP; }
 
 # cleanup the log file for next time
 rm -f $LOG