pgreetd - Perl daemon to implement Penguin Greetings internal operations
pgreetd [--verbose][--config=configuration.file]
The pgreetd
daemon runs in the background to
process the three sorts of files generated by
pgreet.pl.cgi
CGI script in the creation of
web-based ecards. pgreetd
deletes any state files
created by pgreet.pl.cgi
after a configurable
period. pgreet.d
processes any MIME files created
by pgreet.pl.cgi
. Email files that need to go out
immediately are sent out. Email that is scheduled for emailing
later in the year are queued in a directory where they are
secure. Finally, temporary files containing the data for ecards
are transferred to Berkeley DBM files for later retrieval by
pgreet.pl.cgi
. The output of the SpeedyCGI version
of the CGI script pgreet.pl.scgi
is functionally
identical to the standard CGI interface, so there is no
difference in processing from either program. Since version
0.9.7, pgreetd
also can purge the database files
of cards that have been in database for longer than
user-specified number of days.
Penguin Greetings requires Perl 5.8.x or later to be
installed. It uses additions to the standard Perl library that
were not included before 5.8. In addition, Penguin Greetings
requires the following Perl libraries be installed:
Log::Dispatch
, CGI
,
CGI::Carp
, MIME::Lite
,
Apache::Htpasswd
, Date:Pcalc
,
Config::General
, String::Checker
Digest::MD5
, Embperl
, and
I18N::AcceptLanguage
. All these modules are
available from CPAN (http://www.cpan.org) and as of version
0.9.0 can be automatically installed by the Penguin Greetings
installer Install.PL
.
pgreetd
is an application that can be run from
any location on your server such as /usr/local/sbin.
For those wishing a more systematic control of the daemon, a
UNIX System-V startup script pgreetd.sys5.sh is
provided.
However, for security and organization, pgreetd
needs a directory created as the user pgreet
in
order to store the data and configuration file. This data could
be stored with any other users or perhaps placed in a more
system specific location such as /usr/local/share.
Standard precautions for creating a pseudo-user (such a not
providing a real shell) should be followed. In the
$HOME/pgreet directory there should be two
subdirectories: data (for the DBM database files) and
conf (for the configuration files.) In addition, the
card_queue directory for email cards to be sent in the
future can be located in this directory. Wherever,
card_queue located, it should be owned by
pgreet
and access-restricted.
It is possible to specify the location of the configuration
file on the command line when invoking the daemon. However, A
location to this file can be specified by using
Install.PL
during installation and it may be more
convenient to modify the application to point to the current
location of the configuration file on your system if need
be..
pgreetd
has a large number of configurable
options in order to cope with a wide range of situations. These
options are described in the sample configuration file included
in the distribution. In order for pgreetd
to
function, the following items must be set to match your local
conditions: datadir
, confdir
,
tmpdir
, scheduled_mail_queue
,
pgreet_uid
, pgreet_gid
. These
settings will be unique to your server. At startup,
pgreetd
runs some simple diagnostic tests on the
configuration options. If case of failure, pgreetd
will terminate and log an message with the parameters that
failed their respective test(s). For more detailed diagnostics,
run the utility PgreetConfTest
which is included
with Penguin Greetings. Many of these settings are taken care
of by the Install.PL
application.
The same diagnostics are run on secondary ecard
configuration files. However, pgreetd
will not
abort but instead skip over processing ecards from any such
secondary ecard sites with ``broken'' configuration files. Once
more the PgreetConfTest
can be used to find and
fix configuration files are have errors in the configuration
variables.
There are a number of optional settings that may require
adjustment. greetd
has extensive logging
facilities. The command line option
pgreet_log_file
sets the location of the log file.
user_access
is a file containing names of email
users on this server who have permission to send out ecards
under their own login/email address instead of the pgreet user
name. This poses additional security risks, so do not enable
this feature unless your server is well secured by other means.
pgreetd
is set up for operation on LINUX systems.
It may be necessary to adjust the location of PID files or the
path to sendmail on other UNIX systems. pgreetd
also has a number of parameters to adjust the frequency with
which files are processed. These can be adjusted to reduce the
wait before cards are processed.
For more information on configuring pgreetd
see
the Penguin Greetings Adminstrators' guide included in the
Penguin Greetings distribution.
pgreetd
accepts the following command line
options.
pgreetd
more extensive.pgreet.pl.cgi
Perl CGI script
Copyright (c) 2003-2005 Edouard Lagache
This software is released under the GNU General Public License, Version 2. For more information, see the COPYING file included with this software or visit: http://www.gnu.org/copyleft/gpl.html
A temporary directory is created everytime a database is
purged of old cards. Unfortunately Perl's
File::Temp
has no mechanism to explicitly delete
these temporary directories short of terminating the program -
which isn't optimal for a daemon. Still, until there is a
change in Perl's own File::Temp
module,, if the
number of PgreetDBpurge-XXXXXX
directories starts
to annoy you, you can get rid of them by restarted the
daemon.
Edouard Lagache <pgreetdev@canebas.org>
1.0.0