Mainpage
Searchform
History
Versions
Categories
Contents
Deutsch
SuSE Linux: Versions since 4.4
fetchmail: Version 3.3 pl 1 - 4.3.3
fetchmail
(package
pop
, series n
).
The advantage of using fetchmail
and not the older
popclient
is that your password is not shown in the
process table. Only your mail server and the POP3 client exchange
the password, which is stored in a file on your local host.
Your mail server is mail.provider.de
. You have two accounts
there, asterix
and obelix
. They are called
eva
and maria
on your local machine.
Their respective passwords on the mail server are adam
and josef
.
/root/.fetchmailrc
containing the following:
poll mail.provider.de protocol POP3 user asterix password adam is eva poll mail.provider.de protocol POP3 user obelix password josef is mariaThis file should only be readable by the user who fetches incoming mail, as it contains the plaintext passwords. To accomplish this execute the following:
chmod 600 /root/.fetchmailrc
fetchmail -v --keep -a >> /var/log/fetchmailOption
--keep
tells the server not to delete fetched
messages. We strongly advise you to use this option for testing.
/var/log/fetchmail
will contain messages from fetchmail,
without option -v
only minimal logging will be done.
fetchmail -a >> /var/log/fetchmail
crontab -e
) entry for fetching mails
daily at 2:00 am:
0 2 * * * /usr/bin/fetchmail -a >> /var/log/fetchmail
#! /bin/sh # Copyright (c) 1996 S.u.S.E. GmbH Fuerth, Germany. All rights reserved. # # Author: kfr@suse.de # # /sbin/init.d/fetchmail # # plese edit /root/.fetchmailrc . /etc/rc.config case "$1" in start) echo "Starting fetchmail-daemon" /usr/bin/fetchmail -d 900 -a -L /var/log/fetchmail ;; stop) echo -n "Shutting down fetchmail-daemon" /usr/bin/fetchmail -quit echo ;; *) echo "Usage: $0 {start|stop}" exit 1 esac exit 0You should make this script executable and create the links for the corresponding runlevels:
cd /sbin/init.d chmod +x fetchmail cd /sbin/init.d/rc2.d ln -s ../fetchmail S06fetchmail ln -s ../fetchmail K39fetchmail
/etc/ppp/ip-up
:
#!/bin/sh # (c) '97, S.u.S.E. GmbH, Fuerth, Germany # Klaus Franken # 23.09.97 BASENAME=`basename $0` INTERFACE=$1 DEVICE=$2 SPEED=$3 LOCALIP=$4 REMOTEIP=$5 case "$BASENAME" in ip-up) /usr/bin/fetchmail -a >> /var/log/fetchmail ;; ip-down) ;; *) ;; esac
For multidrop mode it is important wether your provider just leaves the destination address alone or replaces it e.g. with the address of the POP3 account.
fetchmail
can then just forward the messages to
sendmail
. Fetchmail only has to know its local domain
names, e.g. if your domain is domain.de
then your
.fetchmailrc
might look like this:
poll mail.provider.de protocol POP3 localdomains domain.de user asterix password adam is *There is nothing special about using
sendmail
with
fetchmail
, local aliases can be defined in
/etc/aliases
; non-deliverable mails will usually be
send to postmaster
(which in most cases is an alias for
root
).
One way to accomplish this is to create a local user (e.g.
mailer
), which processes all incoming mail using his
~/.procmailrc
to deliver mail to the correct users.
See also:
Keywords: FETCHMAIL, POP3, SENDMAIL, MAIL, PPP, ISDN
Categories:
Email
, Applications
Feedback welcome: Send Mail to kfr@suse.de (Please give the following subject: SDB-fetchmail
)
Mainpage
Searchform
History
Versions
Categories
Contents
Deutsch