Postfix uses database files for access control
Postfix uses database files for access control, address rewriting and other purposes.
Here is a common example of how Postfix invokes a database:
/etc/postfix/main.cf:
virtual_alias_maps = hash:/etc/postfix/virtual
Whenever you make a change to the main.cf or master.cf file, execute the following command as root in order to refresh a running mail system:
Tags: Access, Control, database, Files, postfix
Postfix configuration files
By default, Postfix configuration files are in /etc/postfix. The two most important files are main.cf and master.cf; these files must be owned by root. Giving someone else write permission to main.cf or master.cf (or to their parent directories) means giving root privileges to that person.
In /etc/postfix/main.cf you will have to set up a minimal number of configuration parameters. Postfix configuration parameters resemble shell variables, with two important differences: the first one is that Postfix does not know about quotes like the UNIX shell does.
You specify a configuration parameter as:
/etc/postfix/main.cf:
parameter = value
and you use it by putting a “$” character in front of its name:
/etc/postfix/main.cf:
other_parameter = $parameter
You can use $parameter before it is given a value (that is the second main difference with UNIX shell variables). The Postfix configuration language uses lazy evaluation, and does not look at a parameter value until it is needed at runtime.
Tags: configuration, Files, postfix
Running CGI script from any directory
In order to force apache to allow cgi script to run, simply create a file called .htaccess inside the directory in which you wish to run the scripts. Inser this text into the file:
AddHandler cgi-script .cgi .pl
AddHandler maps the filename extensions extension to the handler handler-name. This mapping is added to any already in force, overriding any mappings that already exist for the same extension. For example, to activate CGI scripts with the file extension “.cgi”, you might use:
AddHandler cgi-script .cgi
Once that has been put into your srm.conf or httpd.conf file, any file containing the “.cgi” extension will be treated as a CGI program.
The extension argument is case-insensitive, and can be specified with or without a leading dot.
Tags: any, cgi, directory, from, Running, Script
Control the MaxClients setting in Apache
A webserver should never ever have to swap, as swapping increases the latency of each request.
You can, and should, control theĀ MaxClients* setting so that your server does not spawn so many children it starts swapping. This procedure for doing this is simple: determine the size of your average Apache process, by looking at your process list via a tool such as top
, and divide this into your total available memory, leaving some room for other processes.
*MaxClients [Maximum number of connections that will be processed simultaneously]
Tags: Apache, Control, MaxClients, Setting
CPAN - query, download and build perl modules from CPAN sites
Interactive mode:
Batch mode:
use CPAN;
autobundle, clean, install, make, recompile, test
Example:
root@laptop:~# perl -MCPAN -e shell
Terminal does not support AddHistory.
cpan shell -- CPAN exploration and modules installation (v1.9205)
ReadLine support available (maybe install Bundle::CPAN or Bundle::CPANxxl?)
cpan[1]> test
CPAN: Storable loaded ok (v2.18)
CPAN: LWP::UserAgent loaded ok (v5.819)
CPAN: Time::HiRes loaded ok (v1.9711)
I would like to connect to one of the following sites to get ‘authors/01mailrc.txt.gz’:
http://www.perl.org/CPAN/
ftp://ftp.perl.org/pub/CPAN/
Is it OK to try to connect to the Internet? [yes]
Source: Man Page - http://theoryx5.uwinnipeg.ca/CPAN/perl/lib/CPAN.html
Tags: Build, Cpan, download, Modules, Perl, query, sites