#1  
Old 20th July 2006, 22:40
tazzisp tazzisp is offline
Junior Member
 
Join Date: Jul 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default fetchmail

Hi All
I hope someone can help.
What I want to to is download my emails from 2 emails accounts I have from 2 diffirent ISP's and from my hotmail account into a mailbox on my ISPconfig server that I have installed.

Many thanks

Tazz
Reply With Quote
Sponsored Links
  #2  
Old 21st July 2006, 14:09
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Try something like this in /etc/fetchmailrc:

Code:
# This file must be chmod 0600, owner fetchmail

# Daemon configuration
# These two are set in /etc/default/fetchmail
#set daemon        300                # Pool every 5 minutes
#set syslog                        # log through syslog facility
set postmaster  root

set no bouncemail                # avoid loss on 4xx errors
                                # on the other hand, 5xx errors get
                                # more dangerous...

##########################################################################
# Hosts to pool
##########################################################################

# Defaults ===============================================================
# Set antispam to -1, since it is far safer to use that together with
# no bouncemail
defaults:
timeout 300
antispam -1
batchlimit 100

poll <REMOTE_SERVER> protocol POP3 user "<REMOTE_USER>" there with password "<REMOTE_PASSWORT>" is <USERNAME> here
Replace the strings in <> appropriately and add one poll line for every mailbox you want to fetch from remote servers.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 21st July 2006, 14:45
fobicodam fobicodam is offline
Senior Member
 
Join Date: Apr 2006
Location: Argentina
Posts: 346
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to fobicodam
Default

Add this to the wish list, its really usefull.
Reply With Quote
  #4  
Old 7th August 2006, 10:29
wr19026 wr19026 is offline
Senior Member
 
Join Date: Jan 2006
Posts: 172
Thanks: 7
Thanked 1 Time in 1 Post
Default

Excuse my ignorance but I looked into this on Dapper (Ubuntu 6.06) and could not find the /etc/fetchmailrc file. There is however a /etc/default/fetchmail file with the content:

# This file will be used to declare some vars for fetchmail

# Declare here if we want to start fetchmail. 'yes' or 'no'
START_DAEMON=no

Do I manually have to create the /etc/fetchmailrc file? Also, I noticed that the user "fetchmail" does not exist on my machine; is it an absolute requirement that this user owns the file or can I have user root own it (and chmod the file to 0600 as suggested).
Reply With Quote
  #5  
Old 8th August 2006, 17:39
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

What's the output of
Code:
updatedb
locate fetchmail
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 8th August 2006, 17:50
fobicodam fobicodam is offline
Senior Member
 
Join Date: Apr 2006
Location: Argentina
Posts: 346
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to fobicodam
Default

FYI: the fetchmail.rc is not on fedora distribution, i had to create a new file and run fetchmail -f filename..
Reply With Quote
  #7  
Old 10th August 2006, 10:50
wr19026 wr19026 is offline
Senior Member
 
Join Date: Jan 2006
Posts: 172
Thanks: 7
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by falko
What's the output of
Code:
updatedb
locate fetchmail
?
Apologies for the late response, but here's the output:

/etc/init.d/fetchmail
/etc/logcheck/ignore.d.server/fetchmail
/etc/logcheck/ignore.d.workstation/fetchmail
/etc/ppp/ip-down.d/fetchmail
/etc/ppp/ip-up.d/fetchmail
/etc/rc0.d/K15fetchmail
/etc/rc1.d/K15fetchmail
/etc/rc2.d/S99fetchmail
/etc/rc3.d/S99fetchmail
/etc/rc4.d/S99fetchmail
/etc/rc5.d/S99fetchmail
/etc/rc6.d/K15fetchmail
/etc/resolvconf/update-libc.d/fetchmail
/usr/bin/fetchmail
/usr/share/doc/fetchmail
/usr/share/doc/fetchmail/changelog.Debian.gz
/usr/share/doc/fetchmail/contrib
/usr/share/doc/fetchmail/contrib/domino
/usr/share/doc/fetchmail/contrib/fetchmaildistrib
/usr/share/doc/fetchmail/contrib/fetchmail-mode.el.gz
/usr/share/doc/fetchmail/contrib/fetchmailnochda.pl.gz
/usr/share/doc/fetchmail/contrib/fetchsetup
/usr/share/doc/fetchmail/contrib/getmail
/usr/share/doc/fetchmail/contrib/gotmail
/usr/share/doc/fetchmail/contrib/gotmail.awk
/usr/share/doc/fetchmail/contrib/gotmail.conf
/usr/share/doc/fetchmail/contrib/gotmail.html.awk
/usr/share/doc/fetchmail/contrib/login
/usr/share/doc/fetchmail/contrib/logout
/usr/share/doc/fetchmail/contrib/maildaemon
/usr/share/doc/fetchmail/contrib/mailqueue.pl.gz
/usr/share/doc/fetchmail/contrib/multidrop.gz
/usr/share/doc/fetchmail/contrib/novell
/usr/share/doc/fetchmail/contrib/poptest
/usr/share/doc/fetchmail/contrib/preauth-harness
/usr/share/doc/fetchmail/contrib/README.Debian
/usr/share/doc/fetchmail/contrib/README.getmail
/usr/share/doc/fetchmail/contrib/README.gz
/usr/share/doc/fetchmail/contrib/runfetchmail.gz
/usr/share/doc/fetchmail/contrib/toprocmail
/usr/share/doc/fetchmail/contrib/zsh-completion
/usr/share/doc/fetchmail/copyright
/usr/share/doc/fetchmail/design-notes.html
/usr/share/doc/fetchmail/examples
/usr/share/doc/fetchmail/examples/fetchmailrc.example
/usr/share/doc/fetchmail/fetchmail-FAQ.html
/usr/share/doc/fetchmail/fetchmail-features.html
/usr/share/doc/fetchmail/NEWS.Debian.gz
/usr/share/doc/fetchmail/NOTES.gz
/usr/share/doc/fetchmail/OLDNEWS.gz
/usr/share/doc/fetchmail/README
/usr/share/doc/fetchmail/README.Debian.gz
/usr/share/doc/fetchmail/README.SSL.gz
/usr/share/doc/fetchmail/todo.html
/usr/share/man/man1/fetchmail.1.gz
/usr/share/man/man1/fetchmailrc.1.gz
/usr/share/vim/vim64/syntax/fetchmail.vim
/var/cache/apt/archives/fetchmail_6.3.2-2ubuntu2_i386.deb
/var/lib/dpkg/info/fetchmail.conffiles
/var/lib/dpkg/info/fetchmail.list
/var/lib/dpkg/info/fetchmail.md5sums
/var/lib/dpkg/info/fetchmail.postinst
/var/lib/dpkg/info/fetchmail.postrm
/var/lib/dpkg/info/fetchmail.preinst
/var/lib/dpkg/info/fetchmail.prerm
/var/lib/fetchmail
Reply With Quote
  #8  
Old 11th August 2006, 16:34
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

What's in /etc/init.d/fetchmail?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 12th August 2006, 09:42
wr19026 wr19026 is offline
Senior Member
 
Join Date: Jan 2006
Posts: 172
Thanks: 7
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by falko
What's in /etc/init.d/fetchmail?
#!/bin/sh
#
# Fetchmail init script
# Latest change: Do Jun 23 16:59:08 CEST 2005
#
# A fetchmailrc file containg hosts and passwords for all local users should be
# placed in /etc/fetchmailrc. Remember to make the /etc/fetchmailrc mode 600
# to avoid disclosing the users' passwords.
#
# This script will NOT start or stop fetchmail if the /etc/fetchmailrc file
# does not exist.
#

set -e

if [ ! -e /etc/fetchmailrc ]; then
exit 0
fi

test -f /etc/default/fetchmail || exit 0
. /etc/default/fetchmail
if [ ! "x$START_DAEMON" = "xyes" ]; then
echo "Edit /etc/default/fetchmail to start fetchmail"
exit 0
fi

# Defaults
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/fetchmail
USER=fetchmail

CONFFILE=/etc/fetchmailrc
OPTIONS="-f $CONFFILE"
PIDFILE="`getent passwd $USER | awk -F: '{ print $6 }'`/.fetchmail.pid"
UIDL=/var/lib/fetchmail/.fetchmail-UIDL-cache

test -f $DAEMON || exit 0
test -r $CONFFILE || exit 0

. /lib/lsb/init-functions

if [ "$1" = "start" ]; then
if [ ! -r $CONFFILE ] ; then
echo "$CONFFILE not found."
echo "can not start fetchmail daemon... consider disabling the script"
exit 0
fi
fi



# sanity checks (saves on MY sanity :-P )
if ! id $USER >/dev/null 2>&1; then
if [ "$USER" = "fetchmail" ]; then
# The fetchmail user might have been removed when the fetchmail-common
# package is purged. We have to re-add it here so the system-wide
# daemon will run.

adduser --system --ingroup nogroup --home /var/lib/fetchmail \
--shell /bin/sh --disabled-password fetchmail >/dev/null 2>&1 || true
# work around possible adduser bug, see #119366
[ -d /var/lib/fetchmail ] || mkdir -p /var/lib/fetchmail
chmod 700 /var/lib/fetchmail
chown -h -R fetchmail:nogroup /var/lib/fetchmail
else
log_failure_msg "$USER user does not exist!"
exit 1
fi
fi

# add daemon option if user hasn't already specified it
if ! grep -qs '^[[:space:]]*set[[:space:]]\+daemon[[:space:]]' "$CONFFILE"; then
OPTIONS="$OPTIONS -d 300"
fi

# add syslog option unless user specified "set no syslog".
if ! grep -qs '^[[:space:]]*set[[:space:]]\+no[[:space:]]\+syslog' "$CONFFILE"; then
OPTIONS="$OPTIONS --syslog"
fi

# support for ephemeral /var/run
#if [ "${PIDFILE%/*}" = "/var/run/fetchmail" ] && [ ! -d ${PIDFILE%/*} ]; then
# mkdir /var/run/fetchmail
# chown -h $USER:nogroup /var/run/fetchmail
# chmod 700 /var/run/fetchmail
#fi

# sanity check
#if [ ! -d ${PIDFILE%/*} ]; then
# echo "$0: directory ${PIDFILE%/*} does not exist!"
# exit 1
#fi

# If the user is going to use a UIDL cache, try to find a better place for the
# UIDL cache than root's homedir. Also create $UIDL if it doesn't exist,
# because the daemon won't have the permission.
if ! grep -qs idfile "$CONFFILE" && [ -d /var/lib/fetchmail ]; then
OPTIONS="$OPTIONS -i $UIDL"
touch $UIDL
chown -h $USER $UIDL
chmod 0600 $UIDL
fi

# Makes sure certain files/directories have the proper owner
if [ "`stat -c '%U %a' $CONFFILE 2>/dev/null`" != "$USER 600" ]; then
chown -h $USER $CONFFILE
chmod -f 0600 $CONFFILE
fi

case "$1" in
start)
if test -e $PIDFILE ; then
pid=`cat $PIDFILE | sed -e 's/\s.*//'`
if kill -0 $pid ; then
echo "Fetchmail already running with pid $pid (or stale pidfile)."
exit 0
fi
fi
log_begin_msg "Starting mail retrieval agent..."
start-stop-daemon -S -o -q -p $PIDFILE -x $DAEMON -u $USER -a /bin/su -- -c "$DAEMON $OPTIONS" $USER
log_end_msg $?
;;
stop)
if ! test -e $PIDFILE ; then
echo "Pidfile not found! Is fetchmail running?"
exit 0
fi
log_begin_msg "Stopping mail retrieval agent..."
start-stop-daemon -K -o -q -p $PIDFILE -x $DAEMON -u $USER
log_end_msg $?
;;
force-reload|restart)
sh $0 stop
sh $0 start
;;
try-restart)
if start-stop-daemon -S -t -q -p $PIDFILE -x $DAEMON -u $USER >/dev/null; then
exit 0
fi
$0 restart
;;
awaken)
log_begin_msg "Awakening mail retrieval agent..."
if [ -r $PIDFILE ]; then
su -c $DAEMON $USER <&- >/dev/null 2>&1
log_end_msg 0
exit 0
else
log_end_msg 1
exit 1
fi
;;
debug-run)
log_success_msg "Initiating debug run of system-wide fetchmail service..." 1>&2
log_success_msg "script will be run in debug mode, all output to forced to" 1>&2
log_success_msg "stdout. This is not enough to debug failures that only" 1>&2
log_success_msg "happen in daemon mode." 1>&2
log_success_msg "You might want to direct output to a file, and tail -f it." 1>&2
if [ "$2" = "strace" ]; then
log_success_msg "(running debug mode under strace. See strace(1) for options)" 1>&2
log_success_msg "WARNING: strace output may contain security-sensitive info, such as" 1>&2
log_success_msg "passwords; please clobber them before sending the strace file to a" 1>&2
log_success_msg "public bug tracking system, such as Debian's." 1>&2
fi
log_success_msg "Stopping the service..." 1>&2
"$0" stop
log_success_msg "exit status of service stop was: $?"
log_success_msg "RUNUSER is $USER"
log_success_msg "OPTIONS would be $OPTIONS"
log_success_msg "Starting service in nodetach mode, hit ^C (SIGINT/intr) to finish run..." 1>&2
if [ "$2" = "strace" ] ; then
shift
shift
[ $# -ne 0 ] && log_success_msg "(strace options are: -tt $@)" 1>&2
su -c "/usr/bin/strace -tt $@ $DAEMON $OPTIONS --nosyslog --nodetach -v -v" $USER <&- 2>&1 && true
else
su -c "$DAEMON $OPTIONS --nosyslog --nodetach -v -v" $USER <&- 2>&1 && true
fi
log_success_msg "End of service run. Exit status was: $?"
exit 0
;;
*)
log_success_msg "Usage: /etc/init.d/fetchmail {start|stop|restart|force-reload|awaken|debug-run}"
log_success_msg " start - starts system-wide fetchmail service"
log_success_msg " stop - stops system-wide fetchmail service"
log_success_msg " restart, force-reload - starts a new system-wide fetchmail service"
log_success_msg " awaken - tell system-wide fetchmail to start a poll cycle immediately"
log_success_msg " debug-run [strace [strace options...]] - start a debug run of the"
log_success_msg " system-wide fetchmail service, optionally running it under strace"
exit 1
;;
esac

exit 0

# vim:ts=4:sw=4:
Reply With Quote
  #10  
Old 13th August 2006, 19:33
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
 
Default

Quote:
Originally Posted by wr19026
if [ ! -e /etc/fetchmailrc ]; then
exit 0
fi
You must create /etc/fetchmailrc if it doesn't exist, otherwise fetchmail won't start.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
fetchmail + procmail + spamassassin setup help thelorax Installation/Configuration 2 7th July 2006 10:24
Cyrus, Fetchmail and Postfix [CentOS] d3m0nic Installation/Configuration 0 6th February 2006 19:23
Fetchmail and/or Alternatives alienbob Installation/Configuration 9 20th December 2005 11:29
CommonName mismatch (fetchmail) stiffmeister Server Operation 1 2nd June 2005 16:33
fetchmail configuration lola Installation/Configuration 1 11th May 2005 10:57


All times are GMT +2. The time now is 00:11.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.