Add script to create votings.
[usenet/usevote.git] / UVconfig.pm
CommitLineData
ac7e2c54
TH
1# UVconfig: Reads config files and tests configuration
2# Used by all components
3
4package UVconfig;
5
6use strict;
7use Net::Domain qw(hostname hostfqdn hostdomain);
8use UVmessage;
9use vars qw(@ISA @EXPORT $VERSION $usevote_version %config %messages
10 @rules @groups $bdsg_regexp $bdsg2_regexp %ids %functions);
11
12require Exporter;
13@ISA = qw(Exporter);
14@EXPORT = qw($usevote_version %config %messages @rules @groups
15 $bdsg_regexp $bdsg2_regexp %ids %functions);
16
17# Module version
18$VERSION = "0.18";
19
20# Usevote version
0618b624 21$usevote_version = "UseVoteGer 4.11";
ac7e2c54
TH
22
23sub read_config {
24
25 my ($cfgfile, $redir_errors) = @_;
26
27 # Default configuration options (overwritten in usevote.cfg)
28 %config = (votefile => "votes",
29 votename => "unkonfiguriertes Usevote",
30 resultfile => "ergebnis.alle",
31 rulefile => "usevote.rul",
32 badaddrfile => "mailpatterns.cfg",
33 messagefile => "messages.cfg",
34 idfile => "scheinkennungen",
35 requestfile => "anforderung",
36 errorfile => "errors.log",
37 lockfile => "usevote.lock",
38 replyto => 0,
39 personal => 0,
40 proportional => 0,
41 bdsg => 0,
42 onestep => 0,
43 multigroup => 0,
44 voteack => 1,
45 voteaccount => "<> (unkonfiguriertes Usevote)",
46 mailfrom => "<> (unkonfiguriertes Usevote)",
47 envelopefrom => "<>",
0618b624 48 mailboxtype => "mbox",
ac7e2c54
TH
49 mailstart => "^From ",
50 archivedir => "fertig",
51 tmpdir => "tmp",
52 templatedir => "templates",
53 formats => "UVformats.pm",
54 domailfile => "tmp/domail",
55 controlfile => "tmp/ack.control",
56 mailcmd => "sendmail -oi -oem",
57 mailcc => "",
58 sleepcmd => "sleep 1",
59 clearcmd => "clear",
60 pager => "less",
61 pop3 => 0,
62 pop3server => "localhost",
63 pop3port => 110,
64 pop3user => "default",
65 pop3pass => "default",
66 pop3delete => 0,
67 pop3uidlcache => "uidlcache",
68 pop3server_req => "localhost",
69 pop3port_req => 110,
70 pop3user_req => "default",
71 pop3pass_req => "default",
72 pop3delete_req => 0,
73 pop3uidlcache_req => "uidlcache_req",
74 pop3server_bounce => "localhost",
75 pop3port_bounce => 110,
76 pop3user_bounce => "default",
77 pop3pass_bounce => "default",
78 pop3delete_bounce => 0,
79 pop3uidlcache_bounce => 'uidlcache_bounce',
80 smtp => 0,
81 smtpserver => 'localhost',
82 smtpport => 25,
83 smtphelo => hostfqdn(),
84 fqdn => hostfqdn(),
85 smtpauth => 0,
86 smtpuser => '',
87 smtppass => '',
88