| |
Network: Fetchmail(last edit: 2000-11-22)
fetchmail - fetch mail from a POP, IMAP, or ETRN-capable server
You can specify options on the command line or in the ~/.fetchmailrc
This is what my .fetchmailrc looks like:
---
set daemon 60
poll pop3.demon.nl
uidl
protocol SDPS
username lowlife
password [Yeah wouldn't you like to know]
keep
---
uidl Is used with keep (see explanation below) and makes sure that the mail stais
on the server.
SDPS Is the pop3 protocol specific for Demon Internet
Just start fetchmail with /usr/local/bin/./fetchmail.
It then will read your fetchmail.rc file.
If you want to see your settings and some general info,
type '/usr/local/bin/fetchmail -V'
When using the 'uidl' option the file ~/.fetchids will be created which looks something
like this:
lowlife@pop3.demon.nl lowlife.964516026:12:26053:0
lowlife@pop3.demon.nl lowlife.964462564:14:05960:0
lowlife@pop3.demon.nl lowlife.964479585:14:11395:0
lowlife@pop3.demon.nl lowlife.964427817:12:05154:0
lowlife@pop3.demon.nl lowlife.964460876:12:22514:1
lowlife@pop3.demon.nl lowlife.964492210:12:09909:0
lowlife@pop3.demon.nl lowlife.964430291:12:16255:0
These are the messages I received with fetchmail and are still on the server.
Here are some usefull things from the fetchmail manual:
-k, --keep
(Keyword: keep) Keep retrieved messages on the
remote mailserver. Normally, messages are deleted
from the folder on the mailserver after they have
been retrieved. Specifying the keep option causes
retrieved messages to remain in your folder on the
mailserver. This option does not work with ETRN
-p, --protocol
(Keyword: proto[col]) Specify the protocol to use
when communicating with the remote mailserver. If
no protocol is specified, the default is AUTO.
proto may be one of the following:
Some examples:
POP3 Post Office Protocol 3
KPOP Use POP3 with Kerberos V4 preauthentication
on port 1109.
SDPS Use POP3 with Demon Internet's SDPS exten-
sions.
-d
Or the --daemon runs fetchmail in daemon mode.
You must specify a numeric argument which is a polling
interval in seconds.
In daemon mode, fetchmail puts itself in background and
runs forever, querying each specified host and then sleep-
ing for the given polling interval.
Simply invoking
fetchmail -d 900
will, therefore, poll all the hosts described in your
~/.fetchmailrc file (except those explicitly excluded with
the `skip' verb) once every fifteen minutes.
It is possible to set a polling interval in your ~/.fetch-
mailrc file by saying `set daemon ', where
is an integer number of seconds. If you do
this, fetchmail will always start in daemon mode unless
you override it with the command-line option --daemon 0 or -d0.
The --syslog option (keyword: set syslog) allows you to
redirect status and error messages emitted to the sys-
log(3) system daemon if available. Messages are logged
with an id of fetchmail, the facility LOG_MAIL, and prior-
ities LOG_ERR, LOG_ALERT or LOG_INFO. This option is
intended for logging status and error messages which indi-
cate the status of the daemon and the results while fetch-
ing mail from the server(s). Error messages for command
line options and parsing the .fetchmailrc file are still
written to stderr, or to the specified log file.
The--nosyslog option turns off use of syslog(3), assuming
it's turned on in the .fetchmailrc file, or that the -L or
--logfile option was used.
-U, --uidl
(Keyword: uidl) Force UIDL use (effective only with
POP3). Force client-side tracking of `newness' of
messages (UIDL stands for ``unique ID listing'' and
is described in RFC1725). Use with `keep' to use a
mailbox as a baby news drop for a group of users.
Keyword Opt Function
-------------------------------------------------------------
set daemon Set a background poll interval in
seconds
set no bouncemail Direct error mail to postmaster
rather than sender
set logfile Name of a file to dump error and
status messages to
set syslog Do error logging through sys-
log(3).
set nosyslog Turn off error logging through
syslog(3).
Here are the legal server options:
Keyword Opt Function
----------------------------------------------------------
via Specify DNS name of mailserver,
overriding poll name
proto[col] -p Specify protocol (case insensi-
tive): POP2, POP3, IMAP, IMAP-K4,
IMAP-GSS, APOP, KPOP
port -P Specify TCP/IP service port
auth[enticate] -A Set preauthentication type
(default `password')
timeout -t Server inactivity timeout in sec-
onds (default 300)
envelope -E Specify envelope-address header
name
no envelope Disable looking for envelope
address
uidl -U Force POP3 to use client-side
UIDLs
Here are the legal user options:
Keyword Opt Function
---------------------------------------------------------
user[name] -u Set remote user name (local user
name if name followed by `here')
pass[word] Specify remote account password
ssl Connect to server over the speci-
fied base protocol using SSL
encryption
sslcert Specify file for client side pub-
lic SSL certificate
sslkey Specify file for client side pri-
vate SSL key
folder -r Specify remote folder to query
smtphost -S Specify smtp host(s) to forward to
smtpaddress -D Specify the domain to be put in
RCPT TO lines
smtpname Specify the user and domain to be
put in RCPT TO lines
antispam -Z Specify what SMTP returns are
interpreted as spam-policy blocks
mda -m Specify MDA for local delivery
preconnect Command to be executed before each
connection
postconnect Command to be executed after each
connection
keep -k Don't delete seen messages from
server
flush -F Flush all seen messages before
querying
fetchall -a Fetch all messages whether seen or
not
rewrite Rewrite destination addresses for
reply (default)
stripcr Strip carriage returns from ends
of lines
forcecr Force carriage returns at ends of
lines
no keep -K Delete seen messages from server
(default)
no flush Don't flush all seen messages
before querying (default)
no fetchall Retrieve only new messages
(default)
no rewrite Don't rewrite headers
no stripcr Don't strip carriage returns
(default)
no forcecr Don't force carriage returns at
EOL (default)
no mimedecode Don't convert quoted-printable to
8-bit in MIME messages (default)
limit -l Set message size limit
warnings -w Set message size warning interval
fetchlimit -B Max # messages to fetch in single
connect
Click here to go back to the index.
|