Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mysqmail-courier-logger(8) [debian man page]

mysqmail-logger(8)					      System Manager's Manual						mysqmail-logger(8)

NAME
mysqmail-courier-logger - logs courier-imap traffic to a mysql database SYNOPSIS
mysqmail-courier-logger subprogram [ args ... ] DESCRIPTION
mysqmail-courier-logger reads the syslog using tail -F, and for each dovecot lines of POP3 and IMAP corresponding to a disconnection, mysq- mail-courier-logger writes the total used bandwidth corresponding to the username. Configuration is read from /etc/mysqmail.conf. mysqmail-courier-logger uses a table corresponding to this one: CREATE TABLE IF NOT EXISTS pop_access ( id varchar(32) NOT NULL default '', uid int(11) NOT NULL default '65534', gid int(11) NOT NULL default '65534', home varchar(255) NOT NULL default '', shell varchar(255) NOT NULL default '', mbox_host varchar(120) NOT NULL default '', crypt varchar(50) NOT NULL default '', passwd varchar(50) NOT NULL default '', active int(11) NOT NULL default '1', start_date date NOT NULL default '0000-00-00', expire_date date NOT NULL default '0000-00-00', quota_size int(11) NOT NULL default '0', type varchar(20) NOT NULL default 'default', memo text,du bigint(20) NOT NULL default '0', another_perso varchar(5) NOT NULL default 'no', redirect1 varchar(255) default NULL, redirect2 varchar(255) default NULL, localdeliver varchar(10) NOT NULL default 'yes', pop3_login_count int(9) NOT NULL default '0', pop3_transfered_bytes int(14) NOT NULL default '0', imap_login_count int(9) NOT NULL default '0', imap_transfered_bytes int(14) NOT NULL default '0', last_login int(14) NOT NULL default '0', PRIMARY KEY (id,mbox_host) ) TYPE=MyISAM To have mysqmail-courier-logger working, you should have issued mkfifo /var/log/courier.fifo to create the fifo and use nohup cat /var/log/courier.fifo | /usr/bin/mysqmail-courier-logger > /dev/null 2>&1 & to launch it. VERSION
This documentation describes mysqmail-courier-logger version 0.1.4. See http://gplhost.com/softwares-mysqmail.html for updates. SEE ALSO
qmail-send(3), syslog(3), logger(8) mysqmail-logger(8)

Check Out this Related Man Page

Mail::SpamAssassin::SQLBasedAddrList(3) 		User Contributed Perl Documentation		   Mail::SpamAssassin::SQLBasedAddrList(3)

NAME
Mail::SpamAssassin::SQLBasedAddrList - SpamAssassin SQL Based Auto Whitelist SYNOPSIS
my $factory = Mail::SpamAssassin::SQLBasedAddrList->new() $spamtest->set_persistent_addr_list_factory ($factory); ... call into SpamAssassin classes... SpamAssassin will call: my $addrlist = $factory->new_checker($spamtest); $entry = $addrlist->get_addr_entry ($addr, $origip); ... DESCRIPTION
A SQL based persistent address list implementation. See "Mail::SpamAssassin::PersistentAddrList" for more information. Uses DBI::DBD module access to your favorite database (tested with MySQL, SQLite and PostgreSQL) to store user auto-whitelists. The default table structure looks like this: CREATE TABLE awl ( username varchar(100) NOT NULL default '', email varchar(255) NOT NULL default '', ip varchar(16) NOT NULL default '', count int(11) NOT NULL default '0', totscore float NOT NULL default '0', signedby varchar(255) NOT NULL default '', PRIMARY KEY (username,email,signedby,ip) ) TYPE=MyISAM; Your table definition may change depending on which database driver you choose. There is a config option to override the table name. This module introduces several new config variables: user_awl_dsn user_awl_sql_username user_awl_sql_password user_awl_sql_table user_awl_sql_override_username see "Mail::SpamAssassin::Conf" for more information. new public class (Mail::SpamAssassin::SQLBasedAddrList) new () Description: This method creates a new instance of the SQLBasedAddrList factory and calls the parent's (PersistentAddrList) new method. new_checker public instance (Mail::SpamAssassin::SQLBasedAddrList) new_checker (\% $main) Description: This method is called to setup a new checker interface and return a blessed copy of itself. Here is where we setup the SQL database connection based on the config values. get_addr_entry public instance (\%) get_addr_entry (String $addr, String $signedby) Description: This method takes a given $addr and splits it between the email address component and the ip component and performs a lookup in the database. If nothing is found in the database then a blank entry hash is created and returned, otherwise an entry containing the found information is returned. If a with_awl_signer configuration option is enabled only addresses signed by the given signing identity are taken into account, or, if $signedby is undefined (or empty) only unsigned entries are considered. A key, "exists_p", is set to 1 if an entry already exists in the database, otherwise it is set to 0. add_score public instance (\%) add_score (\% $entry, Integer $score) Description: This method adds a given $score to a given $entry. If the entry was marked as not existing in the database then an entry will be inserted, otherwise a simple update will be performed. NOTE: This code uses a self referential SQL call (ie set foo = foo + 1) which is supported by most modern database backends, but not everything calling itself a SQL database. remove_entry public instance () remove_entry (\% $entry) Description: This method removes a given $entry from the database. If the ip portion of the entry address is equal to "none" then remove any perl-IP entries for this address as well. finish public instance () finish () Description: This method provides the necessary cleanup for the address list. _unpack_addr private instance (String, String) _unpack_addr(string $addr) Description: This method splits an autowhitelist address into it's two components, email and ip address. perl v5.16.3 2011-06-06 Mail::SpamAssassin::SQLBasedAddrList(3)
Man Page