.\"                                      Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH FREEPOPSD 1 "October 27, 2007"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh        disable hyphenation
.\" .hy        enable hyphenation
.\" .ad l      left justify
.\" .ad b      justify to both left and right margins
.\" .nf        disable filling
.\" .fi        enable filling
.\" .br        insert line break
.\" .sp <n>    insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
freepopsd \- FreePOPs daemon
.SH SYNOPSIS
.B freepopsd
.RI [ options ]
.br
.SH DESCRIPTION
This manual page documents briefly the
.B freepopsd
daemon.
.PP
\fBfreepopsd\fP is a program that converts your local requests to its
pop3 daemon to remote http requests to supported web mails.
.SH OPTIONS
.TP
\fB \-p \fRport, \fB\-\-port \fRport
Starts freepopsd on that port. Default is 2000.
.TP
\fB \-t \fRmax, \fB\-\-threads \fRmax
Allows max simultneous connections. Default is 5.
.TP
\fB \-b \fRaddr, \fB\-\-bind \fRaddr
Binds over addr instead INADDR_ANY (0.0.0.0). addr must be a character string 
containing an IPv4 network address in the dotted-quad format, 
"ddd.ddd.ddd.ddd" or a host name.
.TP
\fB \-l \fIlogfacility, \fB\-\-logmode \fIlogfacility
Can be used to specify the logging facility. \fIlogfacility\fR can be 
\fIstdout\fR
for stdout (the default), \fIsyslog\fR to use the logging daemon or 
a valid filename to log to this file.
.TP
\fB \-d\fR, \fB\-\-daemonize
Moves the process to background releasing the tty
.TP
\fB \-n\fR, \fB\-\-no-pid-file
Don't create the pid file containing the process id in /var/run/.
.TP
\fB \-P \fRproxyaddress:proxyport, \fB\-\-proxy \fRproxyaddress:proxyport
You can specify the http proxy name and port separated by :. 
If no port is specifyed 8080 is used by default. 
You may also export some environment
variables instead of using the \fB\-P\fR switch, in priority order: HTTP_PROXY,
http_proxy, PROXY and proxy. If the proxy needs authentication
you have to use the \fB\-A\fR switch.
If you specify \fB\-P \-\fR, you will force direct connections to the web,
without using any proxy server, despite enviromental variable settings.
.TP
\fB \-A \fRusername:password, \fB\-\-auth \fRusername:password
This switches on the basic authentication method. Must be used with the 
\fB\-P\fR switch or one of its alternative forms.
.TP
\fB \-u \fRname, \fB\-\-useragent \fRname
Use this useragent in http connections. The default is "Firefox/0.8".
A valid example is mozilla's "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031024 Debian/1.5-2".
.TP
\fB \-s \fRuser.group, \fB\-\-suid \fRuser.group
This option is used to make freepopsd drop root privileges after binding.
If you run it as a normal user there is no need to use this option.
.TP
\fB \-k\fR, \fB\-\-kill
Kills a running freepopsd.
.TP
\fB \-x \fRpluginfile, \fB\-\-toxml \fRfile
Prints on standard output the XML description of the plugin or module.
.TP
\fB \-e \fRscriptfile [args...], \fB\-\-execute \fRscriptfile [args...]
This is a full bloated LUA interpreter, the executed script has access to all
freepops libraries.  The interpreter calls the main function that must get a
table of strings and return an integer. The arguments passed to freepopsd after
the script file name are put inside the table argument.  The return value is
returned from the interpreter. 
.TP
\fB \-\-fpat \fIauthtype\fR, \fB\-\-force\-proxy\-auth\-type \fIauthtype
Force the use of a specific proxy auth method. Accepted types are
\fIbasic\fR, \fIdigest\fR, \fIntlm\fR and \fIgss\fR.
.TP
\fB\-c\fR, \fB\-\-conffile \fRfile
Users the specified configuration file instead of looking in default paths like 
/etc/freepops/config.lua, ./config.lua and /usr/share/freepops/lua/config.lua
.TP
\fB\-\-statistics\-all
Enable all statistics. Results can be viewed with the monitor plugin, either
with an account like foo@monitor?command=stats or with freepopsd -e monitor host port 
password command.
.TP
\fB\-\-statistics\-session\-created
Enables statistics regarding threads created to run a plugin. See the documentation 
of \-\-statistics\-all for an explanation of how to read that statistics.
.TP
\fB\-\-statistics\-session\-ok
Enables statistics regarding sessions ended successfully. See the documentation 
of \-\-statistics\-all for an explanation of how to read that statistics.
.TP
\fB\-\-statistics\-session\-err
Enables statistics regarding sessions ended with an error. See the documentation 
of \-\-statistics\-all for an explanation of how to read that statistics.
.TP
\fB\-\-statistics\-connection\-established
Enables statistics regarding connections accepted. See the documentation 
of \-\-statistics\-all for an explanation of how to read that statistics.
.TP
\fB\-\-statistics\-cookies
Enables statistics regarding persistently stored data (usually cookies). 
See the documentation 
of \-\-statistics\-all for an explanation of how to read that statistics.
.TP
\fB\-\-statistics\-pwd-file \fRfile
Data collected by the statistics mechanism can be read using the monitor plugin.
If a password file is not specified, no password is set and everybody
connection to the freepops daemon can read such data. Write your password in a text file 
with no additional end-of-line to restrict access to that data. The password file is read 
before dropping privileges (on unix).
.TP
\fB \-h\fR, \fB\-\-help
Prints the usage message.
.TP
\fB \-v\fR, \fB\-\-verbose
Prints debug statements. Can be repeated to give more verbosity (see -vv).
.TP
\fB \-vv\fR, \fB\-v \-v\fR, \fB\-w\fR, \fB\-\-veryverbose
Prints even more debug statements, detailing most operations performed.
This is the maximum verbosity level available. Combining more parameters of this kind won't give you more.
.TP
\fB \-V\fR, \fB\-\-version
Prints the program version.
.br
.SH FILES
.TP
.I /usr/share/freepops/lua/*
Webmails access implementation
.TP
.I /etc/freepops/config.lua
Configuration file, interesting only for paths, addresses to modules binding,
and accept/reject policy on mail addresses
.SH AUTHOR
This manual page was written by Enrico Tassi <gareuselesinge@users.sourceforge.net>,
for the Debian project (but may be used by others).
