SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

BotDetect - Real-Time Bot Detection API
 
 

MAN page from Old RedHat 5.X fetchpop-1.9-1.i386.rpm

fetchpop

Section: Misc. Reference Manual Pages (1L)
Index 

NAME

fetchpop - client to retrieve mail from pop3 server. 

SYNOPSIS

fetchpop[-v] [-k | -q] [-x] [-c]
fetchpop[-d] [-a | -g msg ID] [-t limit] [-r] [-b] [-e msg ID] [-f alternative rcfile] [-m | -p | -o alternative mailbox] [-l log file]

 

DESCRIPTION

The fetchpop program retrieves mail from a remote host using the POP3 mailtransfer protocol as described in RFC1225 and RFC1081.

By default, fetchpop retrieves new unread mail and appends it to your mailboxfile using information specified in the file$HOME/.fetchhost.If the environment variable$MAILis set, fetchpop appends to the file named. Otherwise it appends the mail to MAILSPOOLDIR/$USER.The retrieved messages will be appended to the mail folder file withan exclusive write lock, which means that the mailbox is protectedfrom other processes writing to it while a fetchpop session ismodifying it. If there are more than one mail host that you want toretrieve mail from, the-f flag can be used. Check theFILESandOPTIONSsections for information.

For shell scripts users, check the SCRIPT USERS section for information. 

OPTIONS

-v
Show version and identification information as well as compile-timeconfiguration. This mode displays the value ofMINSLEEPSECOND (the minimum of the sleep time users may set), and whatMAILSPOOLDIR is set to, and whether -m and -p flags are enabled or disabled, and the preference of logging method.In this mode no mail is retrieved.
-q, -k
Kill the fetchpop daemon process.
-d
Use to run fetchpop as a daemon process. In this mode, fetchpop will connect tothe pop server, retrieve mail, sleep for some number of seconds, and thenrepeat, using information specified in the$HOME/.fetchhost file or the file specified with the -f option. Without the-d flag, fetchpopwill run in foreground and exit immediately after retrieving mail.
-a
Retrieve all mail found in your mailbox on the remote mail server. Bydefault, fetchpop retrieves only new unread messages and skips read messages.See theLIMITATIONSsection for discussion.
-c
Check how many new messages and how many total messages are waiting on theremote server. In this mode fetchpop won't actually retrieve mail.
-g
Get (retrieve) a specific message. The argument is the message ID numberin POP3 server. Be careful to use the -g flag to fetch a new message, sincefetchpop assumes that only messages that are greater than the last readmessage number are new messages.
-b
Rewrite From, Cc, Bcc, and Reply-To headers. If this option is on, whenmail is fetched these headers are scanned for email IDs that are local tothe POP server host, that is do not contain a @ and hostname. These localIDs get @ and the hostname from $HOME/.fetchhost appended to them, so youcan reply to them without having to edit the headers. Note: this optiondoes not mix well with sendmail delivery, as mail with its headersrewritten this way will just be shipped right back to the POP host!
-t
Tell fetchpop to retrieve only the given number of lines for each message.The number must be positive. All the header lines will be retrieved no matterwhat value is given.
-r
Remove messages in your mailbox on the remote mail server after fetching them.Normally, messages are kept in the mailbox on the mail server. Specifying-r causes the retrieved messages to be deleted from your mailbox on the remote mailserver.
-x
Delete all the old messages from your mailbox on the remote mail server.In this mode, fetchpop does not delete new unread messages and does notretrieve mail.
-e
Delete(eliminate) a specific message. The argument is the message ID numberin POP3 server.
-f
Specify an alternative config file, other than $HOME/.fetchhost. It isused to retrieve mail from another mail host.
-o
Write the fetched messages to the mailbox file specified as argument. Themailbox file that is being written by fetchpop will be write-locked, to preventmailbox corruption. The options-o -or-o stdouthave special meanings. The retrieved messages will be sent to thestandard output device. Using default and-ois fasterthan using MDA. Mail filtering tools and the $HOME/.forward file will not work with -oanddefault, though.
-l
Specifies that the fetchpopsession is to be logged in the file named.It is meant to be used with -d flag for debugging. Check the log file preference with-v option.

 

EXTRA OPTIONS

These options below might not be available depending on how thefetchpop was compiled. You can check this with the-voption. When these options are used, the retrieved mail is deliveredby local mail delivery agent, instead of appended to the$MAILmailbox. These flags are useful when you do mail filtering. -o cannot be used with these flags.
-m
uses one of deliver, sendmail or mail as a MDA. Check with-vflag to see what the MDA for fetchpop is set to.
-p
uses procmail/formail as mail delivery and formatting tool. Good, if you have procmail anddo intensive mail filtering.
 

EXAMPLE

fetchpopfetchpop -xfetchpop -d -l ~/fetch.logfetchpop -c -f  ~/.anotherhostfetchpop -o - -t 10 -g 1fetchpop -dp -l ~/fetch.log fetchpop -dprl ~/fetch.logfetchpop -dr -o /var/spool/mail/me -l ~/.log  orwhatever

 

FILES

$HOME/.fetchhost
When this file does not exist, fetchpop will prompt for the host, login information and sleep_time interactively, and create the $HOME/.fetchhost file for you. $HOME/.fetchpopconsists of 4 fields, separated by spaces:
pop_server_name login_name password sleeptime_in_seconds
pop_server_nameis the name of the host from which mail is to be retrieved.login_nameandpasswordare your login and password on the pop mail server. These 2 fields are encrypted with simple conversion method.sleeptime_in_secondssets how long fetchpop will wait between mail checks when run as a daemonprocess. Because it contains password information, $HOME/.fetchhost gotpermission 600. The fetchpop startup will ask you to remove the $HOME/.fetchhostfile if it has the wrong permission or is in the wrong format, and will makethe new $HOME/.fetchhost for you next time you run fetchpop.

This rule applies to the file supplied with-f flag, also.

$HOME/.lockfetch-$HOSTNAME
Whenfetchpopruns as a daemon process, it creates a lock file.lockfetch-$HOSTNAMEcontaining the PID of the session. When you use -qflag, fetchpopis killed and this file is removed. Note that you cannot run morethan one fetchpop daemon, but you can run as many non-daemon fetchpopsessions as you want.

 

SCRIPT USERS

fetchpopworks nicely with shell scripts, such as dip, ppp-on and rc.local.Simply add a line to invoke the fetchpop daemon. For example (using GNUsu(1) under Linux):

        su user -l -c "fetchpop -d -r -l ~/fetch.log"

for a user name 'user'. Before you use this command on a non-Linux system,check the behavior of your su command. You need it to either set$MAILfor the user's environment or leave it unset; if it sets the variablefor root, mail will go to root's box. If your su has a -l option itmay help. Otherwise you can use-oflag with a full path to your mailbox; or you can use the -m flag orprocmail -p flag. Refer tosu(1)for more information about your su command.

Also keep in mind that when fetchpop runs as a daemon process, it creates .lockfetch-$HOSTNAME file under user home directory. The fetchpop daemon will not run when it sees that the .lockfetch-$HOSTNAMEfile exists. The lock will be removed when the-qflag is used. So, you might want to put 'su user -c "fetchpop -q"' in theshutdown procedure of your connection, such as dipoff, ppp-off, and etc.See also theENVIRONMENT section.

 

EXIT CODES

fetchpopdoes not return meaningful exit codes, since it is meant to be used as adaemon. fetchpop daemon never exits unless it is killed by -qflag. Basically, 0 is returned when there is no error. Otherwise, !0 (not 0)is returned.

 

ENVIRONMENT

MAIL
the full pathname for the mailbox that fetchpopappends the mail to.If$MAILis not set, MAILSPOOLDIR/$USER is used, where MAILSPOOLDIR is determined by compile-time configuration and $USER is a real user. When -o, -p, or -m flag is used,fetchpop does not use this environment variable.

 

LIMITATION

Some sites use old POP3 mail servers that are poorly implemented. In suchservers, POP3 LAST and QUIT command is not working as described in RFC 1225,causing all the messages in the remote server to be seen as new. Always use fetchpop with the -r flag on these servers.

 

COPYRIGHT

The fetchpop code is under GPL. You can freely use, redistribute, modify and enhance it as long as you acknowledge Seung-Hong Oh as the original author.If you modify fetchpop, send me a copy of it.

 

BUGS

No known bugs.

If you find bugs, please send reports to ohAATTcis.ohio-state.edu.

 

AUTHOR

fetchpopwas written by Seung-Hong Oh <http://www.cis.ohio-state.edu/~oh>

Please send comments, suggestion, complaints, bug fixes, and portingexperiences to me, including the version number of fetchpop in your mail.

 

SEE ALSO

RFC 1225, sendmail(8), deliver(8), fcntl(2), flock(2), lockf(3), su(1), procmail(1), formail(1).


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXTRA OPTIONS
EXAMPLE
FILES
SCRIPT USERS
EXIT CODES
ENVIRONMENT
LIMITATION
COPYRIGHT
BUGS
AUTHOR
SEE ALSO

This document was created byman2html,using the manual pages.
 
ICM Bot detect detector