# # smtp-poplock.conf # # part of the smtp-poplock package # by David Harris # http://www.davideous.com/smtp-poplock/ # # # This file is in PERL CODE format! :-) # package Conf; use strict; use vars qw[ $dbfile $static_allowed_file $readfile $readfile_isfifo $access_time $logpopauth_where $parse_log_sub $readlog_pidfile $readlog_feeder_pidfile ]; # # dbfile -- # # this is the file what will be used as a database to # store the autorized hosts. # $dbfile = "/var/smtp-poplock/dbfile"; # # static_allowed_file -- # # this file defines ip addresses, one per line, which are allowed to # relay mail without having to authenticate through POP. # $static_allowed_file = "/etc/smtp-poplock.static_allowed"; # # readfile, readfile_isfifo -- # # this specifies where readlog will read the flow of log data which will # contain the POP/IMAP authentication log lines. Note: this is not just a # filename, but is the string passed to the perl open command, so you can # specify a pipe to a program, such as "tail -f /some/log/file |". # # We need to know if the readfile is a fifo (named pipe) to determine if # it should be checked by fifo-safety. So, set this to 1 if it is a fifo, # and 0 if it is not. # $readfile = "/var/smtp-poplock/fifo"; $readfile_isfifo = 1; # # access_time -- # # this is now long SMTP access will be provided after # sucessfull POP/IMAP authentication. The value is in seconds. # $access_time = 3600 * 3; # # logpopauth_where -- # # this specifies where qmail-pop3d authentications shall be logged by the # logpopauth-* programs. Note: this is not just a filename, but is the # string passed to the perl open command, so you can specify a pipe to a # program, such as "| /var/qmail/bin/splogger qmail-pop3d". # $logpopauth_where = "| /var/qmail/bin/splogger qmail-pop3d"; # # parse_log_sub -- # # if none of the internal parsers properly detect the format of your # POP3/IMAP authentication log lines, define an anonymous sub here which # takes a line and returns the authorized ip address or hostname. Or # return undef to ignore this line. Only define this function if you need # it because it will override all the internal parsing. The example is # commented out for that reason. # #$parse_log_sub = #sub { # my $line = shift; # $line =~ m/^pop3d[.*]: pop auth by the (\S+) machine$/ && return $1; # return undef; #}; # # readlog_pidfile -- # # because readlog runs as a deamon in the background we have it write # it's pid out to a file to be nice. # $readlog_pidfile = "/var/run/readlog.pid"; # # readlog_feeder_pidfile -- # # if $readfile is a perl open string which causes a program to be forked # and read from, such as "cat /tmp/bah |", then a new process is created. # The PID for this process is recorded with the filename listed here. # $readlog_feeder_pidfile = "/var/run/readlog.feeder.pid";