postfix-cluebringer-2.0.10/0000755000175000017500000000000011312351142015414 5ustar nikolainikolaipostfix-cluebringer-2.0.10/CHANGELOG0000644000175000017500000022215111312347456016646 0ustar nikolainikolai------------------------------------------------------------------------ r496 | nkukard | 2009-12-14 06:20:23 +0000 (Mon, 14 Dec 2009) | 2 lines * Bumped version to 2.0.10a ------------------------------------------------------------------------ r485 | nkukard | 2009-11-24 12:52:30 +0000 (Tue, 24 Nov 2009) | 3 lines * If we encounter an invalid IP in the greylisting whitelist, throw a warning not a hard error - Robert Anderson ------------------------------------------------------------------------ r484 | nkukard | 2009-11-24 10:59:24 +0000 (Tue, 24 Nov 2009) | 2 lines * Cleaned up INSTALL doc and config file ------------------------------------------------------------------------ r483 | nkukard | 2009-11-16 07:36:23 +0000 (Mon, 16 Nov 2009) | 3 lines * Better handling of CIDR's in parseCIDR() - Rober Anderson ------------------------------------------------------------------------ r482 | nkukard | 2009-11-10 11:20:28 +0000 (Tue, 10 Nov 2009) | 2 lines * Protocol constant fix ------------------------------------------------------------------------ r481 | nkukard | 2009-10-14 09:14:57 +0000 (Wed, 14 Oct 2009) | 2 lines * Version bump to 2.0.9a ------------------------------------------------------------------------ r479 | nkukard | 2009-08-21 08:14:23 +0000 (Fri, 21 Aug 2009) | 3 lines * Default to unix logging to be compatibile with most installations as native is not yet supported - v2.1.x defaults to native ------------------------------------------------------------------------ r478 | nkukard | 2009-08-14 06:08:50 +0000 (Fri, 14 Aug 2009) | 2 lines * More flexible configuration of logging ------------------------------------------------------------------------ r475 | nkukard | 2009-07-16 10:53:17 +0000 (Thu, 16 Jul 2009) | 2 lines * Sender IP is a CIDR mask, not a network mask ------------------------------------------------------------------------ r474 | nkukard | 2009-07-15 12:12:05 +0000 (Wed, 15 Jul 2009) | 11 lines * Fixes for greylisting portion of web interface, which is slighlty broken. - by Tomoyuki Murakami I have noticed that setting greylisting preferences from webui updates (or reset) things in-correctly. For instance, GreylistUnAuthValidity cannot set any seconds. AWL After Percentage always reset to nothing (not NULL) and, so on. Here is a patch to quick fix. ------------------------------------------------------------------------ r473 | nkukard | 2009-07-05 15:05:01 +0000 (Sun, 05 Jul 2009) | 2 lines * Pulled in r472 from trunk, indentation fixup ------------------------------------------------------------------------ r471 | nkukard | 2009-06-29 07:25:52 +0000 (Mon, 29 Jun 2009) | 2 lines * Fixed logging issues when protocol attributes are invalid ------------------------------------------------------------------------ r467 | nkukard | 2009-06-22 12:11:26 +0000 (Mon, 22 Jun 2009) | 3 lines * Allow DBDo() to take parameters, this fixes bugs with all queries utilizing ?'s as placeholders - Thanks Peter Kiem ------------------------------------------------------------------------ r466 | nkukard | 2009-06-22 08:45:17 +0000 (Mon, 22 Jun 2009) | 2 lines * Use Timestamp and not UnixTimestamp ------------------------------------------------------------------------ r465 | nkukard | 2009-06-21 20:47:41 +0000 (Sun, 21 Jun 2009) | 3 lines * Fixed tempfail inversion - Closes bug #14 ------------------------------------------------------------------------ r464 | nkukard | 2009-06-19 06:50:29 +0000 (Fri, 19 Jun 2009) | 2 lines * Remove more table prefixes that crept in ------------------------------------------------------------------------ r463 | nkukard | 2009-06-19 06:08:26 +0000 (Fri, 19 Jun 2009) | 2 lines * Table prefixes are not supported in v2.0.x yet ------------------------------------------------------------------------ r461 | nkukard | 2009-06-01 06:03:27 +0000 (Mon, 01 Jun 2009) | 2 lines * Added support for OK in access control module ------------------------------------------------------------------------ r460 | nkukard | 2009-06-01 05:32:46 +0000 (Mon, 01 Jun 2009) | 2 lines * Fixed bug when handling .something.example.com style reverse dns names ------------------------------------------------------------------------ r441 | nkukard | 2009-05-20 10:26:39 +0000 (Wed, 20 May 2009) | 3 lines * Remember to closeCuror() before we start doing embedded queries, some versions of PHP don't like this - Thanks Eugene Krapivin ------------------------------------------------------------------------ r440 | nkukard | 2009-05-17 19:23:18 +0000 (Sun, 17 May 2009) | 2 lines * Fixed AUTHORS ------------------------------------------------------------------------ r437 | nkukard | 2009-05-09 07:59:10 +0000 (Sat, 09 May 2009) | 2 lines * Fixed logging lines being displayed when they were disabled ------------------------------------------------------------------------ r436 | nkukard | 2009-05-09 06:59:21 +0000 (Sat, 09 May 2009) | 2 lines * Small copyright fixes ------------------------------------------------------------------------ r433 | nkukard | 2009-05-08 06:58:39 +0000 (Fri, 08 May 2009) | 2 lines * Bump svn branch to 2.0.8a ------------------------------------------------------------------------ r431 | nkukard | 2009-05-05 07:56:44 +0000 (Tue, 05 May 2009) | 2 lines * Copyright update ------------------------------------------------------------------------ r430 | nkukard | 2009-04-08 08:27:59 +0000 (Wed, 08 Apr 2009) | 2 lines * Fixed bug where getPolicy was being called in the amavisd-policyd module with incorrect parameters. This was triggered when recipeits changed because of aliases or similar and the alias is not found in the session data stored during the Postfix RCPT checks. ------------------------------------------------------------------------ r428 | nkukard | 2009-03-29 12:48:09 +0000 (Sun, 29 Mar 2009) | 2 lines * Fixed spurious "REJECT" in CheckHelo module ------------------------------------------------------------------------ r426 | nkukard | 2009-03-28 16:10:51 +0000 (Sat, 28 Mar 2009) | 2 lines * Install cbpolicyd in sbin and cbpadmin in bin ------------------------------------------------------------------------ r425 | nkukard | 2009-03-28 15:16:46 +0000 (Sat, 28 Mar 2009) | 2 lines * Fixed Amavis support, the last Received: header was being accessed in the wrong way ------------------------------------------------------------------------ r424 | nkukard | 2009-03-24 10:25:55 +0000 (Tue, 24 Mar 2009) | 2 lines * No feedback from testers, assuming this patch fixes the greylisting race condition ------------------------------------------------------------------------ r423 | nkukard | 2009-02-28 20:37:01 +0000 (Sat, 28 Feb 2009) | 2 lines * Add support for RFC3848 headers in amavis plugin ------------------------------------------------------------------------ r416 | nkukard | 2009-02-18 09:55:20 +0000 (Wed, 18 Feb 2009) | 2 lines * Made old and new Config::IniFiles work ------------------------------------------------------------------------ r411 | nkukard | 2009-02-14 14:19:01 +0000 (Sat, 14 Feb 2009) | 2 lines * Fixed up Config::IniFiles usage, this fixes breakage introduced with functionality changes in newer versions ------------------------------------------------------------------------ r410 | nkukard | 2009-02-09 12:19:04 +0000 (Mon, 09 Feb 2009) | 2 lines * Fixed Postfix quota being overwritten ------------------------------------------------------------------------ r409 | nkukard | 2009-01-07 16:32:14 +0000 (Wed, 07 Jan 2009) | 3 lines * Fixed default naming of the cluebringer database in the webui config to be inline with the other config file * Added note that the Postfix support in the webui is unsupported ------------------------------------------------------------------------ r408 | nkukard | 2009-01-06 07:03:37 +0000 (Tue, 06 Jan 2009) | 2 lines * Bump branch to 2.0.7a ------------------------------------------------------------------------ r406 | nkukard | 2009-01-06 06:53:09 +0000 (Tue, 06 Jan 2009) | 2 lines * Commit of resources required to build a .rpm ------------------------------------------------------------------------ r405 | nkukard | 2009-01-02 16:16:28 +0000 (Fri, 02 Jan 2009) | 2 lines * Fixed bug in quotas where non-existant counters were being used ------------------------------------------------------------------------ r386 | nkukard | 2008-11-11 20:45:40 +0000 (Tue, 11 Nov 2008) | 2 lines * Fixed the rest of the options in greylisting not working with inherit option set ------------------------------------------------------------------------ r385 | nkukard | 2008-11-11 20:09:10 +0000 (Tue, 11 Nov 2008) | 2 lines * Fixed same inherit bug for percentages ------------------------------------------------------------------------ r384 | nkukard | 2008-11-11 19:57:21 +0000 (Tue, 11 Nov 2008) | 2 lines * Fixed changing of use autowhitelist/blacklist to work properly with changing to "Inherit" ------------------------------------------------------------------------ r382 | nkukard | 2008-11-11 19:32:27 +0000 (Tue, 11 Nov 2008) | 2 lines * Fixed disabling of greylisting, it showed up always as inherited and not disabled ------------------------------------------------------------------------ r375 | nkukard | 2008-11-10 20:16:56 +0000 (Mon, 10 Nov 2008) | 2 lines * Added requirement of Mail::SPF for SPF support ------------------------------------------------------------------------ r374 | nkukard | 2008-11-10 19:42:33 +0000 (Mon, 10 Nov 2008) | 3 lines * Added requirement for database server * Added requirement for PHP v5 ------------------------------------------------------------------------ r373 | nkukard | 2008-11-10 05:33:09 +0000 (Mon, 10 Nov 2008) | 2 lines * Fixed bug where non-SASL authenticated email was being matched by the $* specification ------------------------------------------------------------------------ r371 | nkukard | 2008-10-30 09:47:45 +0000 (Thu, 30 Oct 2008) | 2 lines * Fixed bug where the last quota limit was reported as the one generating a verdict regardless of which one before it actually did ------------------------------------------------------------------------ r370 | nkukard | 2008-10-30 09:44:53 +0000 (Thu, 30 Oct 2008) | 3 lines * Sucked in r369 from trunk, reversion of r327 - We already output logs regarding the verdict, no use doing it again ------------------------------------------------------------------------ r365 | nkukard | 2008-10-17 06:30:23 +0000 (Fri, 17 Oct 2008) | 2 lines * Fix error beign displayed when policy priority is 0 ------------------------------------------------------------------------ r364 | nkukard | 2008-10-17 06:20:53 +0000 (Fri, 17 Oct 2008) | 2 lines * Initialize recipient data to an empty hash, we may not even get any recipient data and we don't want this to be undefined ------------------------------------------------------------------------ r363 | nkukard | 2008-10-17 06:18:47 +0000 (Fri, 17 Oct 2008) | 2 lines * Ignore recipient data in the DB if its null ------------------------------------------------------------------------ r362 | nkukard | 2008-10-17 05:58:56 +0000 (Fri, 17 Oct 2008) | 2 lines * Make the CIDR value for IP specifications optional, an IP without it now defaults to /32 ------------------------------------------------------------------------ r360 | nkukard | 2008-10-01 08:56:29 +0000 (Wed, 01 Oct 2008) | 2 lines * Bumped version to 2.0.6a ------------------------------------------------------------------------ r358 | nkukard | 2008-09-30 18:19:47 +0000 (Tue, 30 Sep 2008) | 3 lines Pulled in r350 from trunk * Updated links in pages to new website urls ------------------------------------------------------------------------ r357 | nkukard | 2008-09-30 18:06:46 +0000 (Tue, 30 Sep 2008) | 3 lines Pulled in r356 from trunk * Clarified that policy priorities are prcessed in an ascending fashion, 0 being highest priority (first), 100 being the lowest (last). ------------------------------------------------------------------------ r344 | nkukard | 2008-09-28 11:48:26 +0000 (Sun, 28 Sep 2008) | 3 lines Pulled in r343 from trunk * Better loadable module handling for cbpadmin ------------------------------------------------------------------------ r341 | nkukard | 2008-09-28 08:11:35 +0000 (Sun, 28 Sep 2008) | 2 lines * Check the return codes from removing database entries more carefully ------------------------------------------------------------------------ r340 | nkukard | 2008-09-28 07:41:58 +0000 (Sun, 28 Sep 2008) | 2 lines * Fixed error message when deleting policies ------------------------------------------------------------------------ r338 | nkukard | 2008-09-27 22:03:49 +0000 (Sat, 27 Sep 2008) | 2 lines * Fixed module logging in main cbpolicyd server ------------------------------------------------------------------------ r336 | nkukard | 2008-09-27 21:01:10 +0000 (Sat, 27 Sep 2008) | 2 lines * Fixed logging when Quotas which are not matched ------------------------------------------------------------------------ r334 | nkukard | 2008-09-27 20:28:37 +0000 (Sat, 27 Sep 2008) | 2 lines * Added comment with mysql DB config in to amavisd-policyd integration module ------------------------------------------------------------------------ r333 | nkukard | 2008-09-27 20:21:45 +0000 (Sat, 27 Sep 2008) | 3 lines Pulled in r332 from trunk * Removed stray file ------------------------------------------------------------------------ r328 | nkukard | 2008-09-27 16:55:15 +0000 (Sat, 27 Sep 2008) | 3 lines Pulled in r327 from trunk * Fixed logging of verdict in quotas module ------------------------------------------------------------------------ r324 | nkukard | 2008-09-27 16:35:14 +0000 (Sat, 27 Sep 2008) | 2 lines * no_quota should read no_verdict in Quotas module ------------------------------------------------------------------------ r323 | nkukard | 2008-09-26 18:36:50 +0000 (Fri, 26 Sep 2008) | 7 lines Pulled in r315 - Quotas: * Fixed type on 'size' * Fixed typo in debug message * Fixed bug where end-of-data state was not being processed ------------------------------------------------------------------------ r322 | nkukard | 2008-09-26 18:33:45 +0000 (Fri, 26 Sep 2008) | 4 lines Pulled in r314 from trunk - * Removed stray files ------------------------------------------------------------------------ r321 | nkukard | 2008-09-26 18:30:53 +0000 (Fri, 26 Sep 2008) | 4 lines Pulled in r316 from trunk - * Fixed stray comma in Quotas module ------------------------------------------------------------------------ r313 | nkukard | 2008-09-20 18:35:55 +0000 (Sat, 20 Sep 2008) | 3 lines * Fixed bug in Quotas module where if all limits were disabled a temporary 450 result was generated - Thanks J. Duggan ------------------------------------------------------------------------ r312 | nkukard | 2008-09-11 05:23:52 +0000 (Thu, 11 Sep 2008) | 2 lines * Add more debugging info to amavisd module so we can catch the received line if its not parsable ------------------------------------------------------------------------ r311 | nkukard | 2008-09-09 16:05:33 +0000 (Tue, 09 Sep 2008) | 2 lines * Backported database portability fixes from trunk ------------------------------------------------------------------------ r310 | nkukard | 2008-09-09 15:53:25 +0000 (Tue, 09 Sep 2008) | 2 lines * Fixed use of short PHP tags email address to be used as sender in protocols data validation functions ------------------------------------------------------------------------ r207 | nkukard | 2008-03-18 14:43:03 +0000 (Tue, 18 Mar 2008) | 2 lines * Use count(*) instead of count(ID) ------------------------------------------------------------------------ r206 | nkukard | 2008-03-18 13:59:58 +0000 (Tue, 18 Mar 2008) | 3 lines * Fixed up debug message format a bit * Added protocol data validation ------------------------------------------------------------------------ r205 | nkukard | 2008-03-18 13:20:07 +0000 (Tue, 18 Mar 2008) | 2 lines * Sanitized the HTTP response codes for Bizanga ------------------------------------------------------------------------ r204 | nkukard | 2008-03-18 12:59:10 +0000 (Tue, 18 Mar 2008) | 2 lines * close cursor when we done with it ------------------------------------------------------------------------ r203 | nkukard | 2008-03-18 12:52:49 +0000 (Tue, 18 Mar 2008) | 2 lines * Store ProtocolTransport in session data ------------------------------------------------------------------------ r202 | nkukard | 2008-03-18 12:16:39 +0000 (Tue, 18 Mar 2008) | 3 lines * Fixed uninitialized errors while doing a cleanup * Fixed typo in tracking.pm ------------------------------------------------------------------------ r201 | nkukard | 2008-03-18 11:51:06 +0000 (Tue, 18 Mar 2008) | 3 lines * Added index to tracking table for those databases which support indexes * Removed requirement on ID column for tracking of smtp sessions ------------------------------------------------------------------------ r200 | nkukard | 2008-03-18 11:49:23 +0000 (Tue, 18 Mar 2008) | 2 lines * Removed ID column from tracking table ------------------------------------------------------------------------ r199 | nkukard | 2008-03-18 11:43:14 +0000 (Tue, 18 Mar 2008) | 2 lines * Removed requirement for ID auto-increment column ------------------------------------------------------------------------ r198 | nkukard | 2008-03-18 11:28:48 +0000 (Tue, 18 Mar 2008) | 2 lines * Major schema change, remove the auto-incrementing ID column ------------------------------------------------------------------------ r197 | nkukard | 2008-03-18 11:22:54 +0000 (Tue, 18 Mar 2008) | 3 lines * Added support for database specific tracking key length * Added support for indexes, some databases don't like indexes?? (sqlite) ------------------------------------------------------------------------ r196 | nkukard | 2008-03-18 09:50:11 +0000 (Tue, 18 Mar 2008) | 2 lines * Added some error checking and cleaned up commandline usage ------------------------------------------------------------------------ r195 | nkukard | 2008-03-18 09:41:44 +0000 (Tue, 18 Mar 2008) | 2 lines * Added bypass_timeout, this delays the destruction of the child and database reconnection ------------------------------------------------------------------------ r194 | nkukard | 2008-03-18 09:13:48 +0000 (Tue, 18 Mar 2008) | 2 lines * Fixed database bypass mode, we were looking in the [server] section and not in the [database] section ------------------------------------------------------------------------ r193 | nkukard | 2008-03-18 08:57:20 +0000 (Tue, 18 Mar 2008) | 2 lines * Removed stray debugging info ------------------------------------------------------------------------ r192 | nkukard | 2008-03-18 08:54:53 +0000 (Tue, 18 Mar 2008) | 5 lines * Major schema change: - Removed Authenticated column - Added Tries column, this counts how many ties a greylisting entry is tried and fails - Added Count column, this counts how many mails pass through after being authenticated ------------------------------------------------------------------------ r191 | nkukard | 2008-03-18 08:11:28 +0000 (Tue, 18 Mar 2008) | 2 lines * Fixed some logging bugs ------------------------------------------------------------------------ r190 | nkukard | 2008-03-17 19:46:38 +0000 (Mon, 17 Mar 2008) | 2 lines * Fixed database connection issues with new BYPASS code ------------------------------------------------------------------------ r189 | nkukard | 2008-03-17 18:50:29 +0000 (Mon, 17 Mar 2008) | 2 lines * Added closing of cursor when we're done with it, this should solve some LAMP issues ------------------------------------------------------------------------ r188 | nkukard | 2008-03-17 18:11:30 +0000 (Mon, 17 Mar 2008) | 3 lines * Fixed multiple logging bugs * Standardized logging ------------------------------------------------------------------------ r187 | nkukard | 2008-03-17 18:10:25 +0000 (Mon, 17 Mar 2008) | 2 lines * Added database bypass_mode option, you can now tempfail or defer based on database failure ------------------------------------------------------------------------ r186 | nkukard | 2008-03-17 16:42:11 +0000 (Mon, 17 Mar 2008) | 2 lines * Updated amavisd plugin to new framework ------------------------------------------------------------------------ r185 | nkukard | 2008-03-17 16:40:30 +0000 (Mon, 17 Mar 2008) | 2 lines * Fixed using non-existent logging mechanism ------------------------------------------------------------------------ r184 | nkukard | 2008-03-17 16:39:28 +0000 (Mon, 17 Mar 2008) | 2 lines * Fixed logging in tracking module, mostly relating to external plugins ------------------------------------------------------------------------ r183 | nkukard | 2008-03-17 15:43:12 +0000 (Mon, 17 Mar 2008) | 2 lines * Added config variable log_detail which you can use to specify extreme detail to show in debugging for a specific module/section of policyd ------------------------------------------------------------------------ r182 | nkukard | 2008-03-17 14:00:18 +0000 (Mon, 17 Mar 2008) | 4 lines * Fixed error... Use of uninitialized value in concatenation (.) or string at cbp/protocols/Bizanga.pm line 215. - Thanks Geert ------------------------------------------------------------------------ r181 | nkukard | 2008-03-17 12:56:32 +0000 (Mon, 17 Mar 2008) | 3 lines * More debugging info * Fixed bug where we were not getting a policy for HTTP protocols ------------------------------------------------------------------------ r180 | nkukard | 2008-03-17 12:46:52 +0000 (Mon, 17 Mar 2008) | 2 lines * Added whacks of debugging info ------------------------------------------------------------------------ r179 | nkukard | 2008-03-17 11:39:19 +0000 (Mon, 17 Mar 2008) | 3 lines * Major change, renamed policy acls to policy members. This is less confusing. * Schema changed, renamed policy_acls to policy_members ------------------------------------------------------------------------ r178 | nkukard | 2008-03-17 09:30:46 +0000 (Mon, 17 Mar 2008) | 3 lines * Better protocol module handling, don't panic and die if we cannot identify the first line straight away * Cosmetic fix in system.pm ------------------------------------------------------------------------ r177 | nkukard | 2008-03-17 09:29:08 +0000 (Mon, 17 Mar 2008) | 3 lines * Fixed bug with uninitalized SessionData * Fixed bug when HTTP protocols are not recognised (spelling mistake) ------------------------------------------------------------------------ r176 | nkukard | 2008-03-17 09:28:11 +0000 (Mon, 17 Mar 2008) | 2 lines * Remove extra newline at end of HTTP protocol ------------------------------------------------------------------------ r175 | nkukard | 2008-03-17 09:26:53 +0000 (Mon, 17 Mar 2008) | 2 lines * Added some debugging to Postfix protocol to predict if it may be Postfix protocol or not ------------------------------------------------------------------------ r174 | nkukard | 2008-03-17 09:25:00 +0000 (Mon, 17 Mar 2008) | 2 lines * Better Bizanga protocol matching ------------------------------------------------------------------------ r173 | nkukard | 2008-03-16 20:48:45 +0000 (Sun, 16 Mar 2008) | 2 lines * Added some extra debug to catch some potential bugs ------------------------------------------------------------------------ r172 | nkukard | 2008-03-16 20:46:32 +0000 (Sun, 16 Mar 2008) | 2 lines * Fixed returns in Greylisting, this should be the new framework ------------------------------------------------------------------------ r171 | nkukard | 2008-03-16 16:19:58 +0000 (Sun, 16 Mar 2008) | 2 lines * XHML 1.0 Strict fixes ------------------------------------------------------------------------ r170 | nkukard | 2008-03-16 16:10:20 +0000 (Sun, 16 Mar 2008) | 2 lines * Add <> to tracking of sessions ------------------------------------------------------------------------ r169 | nkukard | 2008-03-16 09:42:19 +0000 (Sun, 16 Mar 2008) | 2 lines * Added some debugging info to tracking.pm to try catch uninitialized data bug ------------------------------------------------------------------------ r168 | nkukard | 2008-03-16 09:37:30 +0000 (Sun, 16 Mar 2008) | 2 lines * Skip SPF if we have no local explanation ------------------------------------------------------------------------ r167 | nkukard | 2008-03-15 23:29:20 +0000 (Sat, 15 Mar 2008) | 2 lines * Fixed typo in variable name ------------------------------------------------------------------------ r166 | nkukard | 2008-03-15 23:24:35 +0000 (Sat, 15 Mar 2008) | 2 lines * Fixed whitelisting in CheckHelo and Greylisting ------------------------------------------------------------------------ r165 | nkukard | 2008-03-15 23:23:34 +0000 (Sat, 15 Mar 2008) | 2 lines * Add parsed client address to session data ------------------------------------------------------------------------ r164 | nkukard | 2008-03-15 22:34:00 +0000 (Sat, 15 Mar 2008) | 2 lines * Fixed some debugging ------------------------------------------------------------------------ r163 | nkukard | 2008-03-15 22:32:55 +0000 (Sat, 15 Mar 2008) | 2 lines * Try 15 second timeout on resolving SPF, some queries took minutes due to SERVFAIL which generated very high load ------------------------------------------------------------------------ r162 | nkukard | 2008-03-15 17:45:22 +0000 (Sat, 15 Mar 2008) | 2 lines * Bizanga PASS should be code 200 not 503 ------------------------------------------------------------------------ r160 | nkukard | 2008-03-15 15:28:05 +0000 (Sat, 15 Mar 2008) | 2 lines * Fixed web interface with changes in schema over the past week ------------------------------------------------------------------------ r159 | nkukard | 2008-03-15 15:20:38 +0000 (Sat, 15 Mar 2008) | 2 lines * Removed some debugging info ------------------------------------------------------------------------ r158 | nkukard | 2008-03-15 14:59:52 +0000 (Sat, 15 Mar 2008) | 2 lines * Forgot to add protocol constants file ------------------------------------------------------------------------ r157 | nkukard | 2008-03-15 14:57:02 +0000 (Sat, 15 Mar 2008) | 2 lines * Fixed Bizanga response generation, perl seems to like this better ------------------------------------------------------------------------ r156 | nkukard | 2008-03-15 14:46:15 +0000 (Sat, 15 Mar 2008) | 2 lines * Ported all modules over to new protocol-neutral framework ------------------------------------------------------------------------ r155 | nkukard | 2008-03-15 14:40:27 +0000 (Sat, 15 Mar 2008) | 3 lines * Checkin of protocol updates * Renamed HTTP to Bizanga ------------------------------------------------------------------------ r154 | nkukard | 2008-03-15 14:39:18 +0000 (Sat, 15 Mar 2008) | 2 lines * Fixed IP arithmatic in policies.pm ... this looks better ------------------------------------------------------------------------ r153 | nkukard | 2008-03-15 14:38:16 +0000 (Sat, 15 Mar 2008) | 2 lines * Fix byte-order in translation of IP's to unsigned long integers and visa versa ------------------------------------------------------------------------ r152 | nkukard | 2008-03-14 08:13:13 +0000 (Fri, 14 Mar 2008) | 2 lines * Differentiate tracking based on protocol transport ------------------------------------------------------------------------ r151 | nkukard | 2008-03-14 08:12:05 +0000 (Fri, 14 Mar 2008) | 4 lines * Various cosmetic fixes * Changed _Policy to Policy in session data hash * Fixed a spelling mistake or two ------------------------------------------------------------------------ r150 | nkukard | 2008-03-14 08:10:20 +0000 (Fri, 14 Mar 2008) | 2 lines * Parse HTTP GET into request hash & set protocol transport ------------------------------------------------------------------------ r149 | nkukard | 2008-03-14 08:09:09 +0000 (Fri, 14 Mar 2008) | 2 lines * Set protocol transport for Postfix ------------------------------------------------------------------------ r148 | nkukard | 2008-03-13 20:10:40 +0000 (Thu, 13 Mar 2008) | 2 lines * Added protocol parser for HTTP requests ------------------------------------------------------------------------ r147 | nkukard | 2008-03-13 19:20:53 +0000 (Thu, 13 Mar 2008) | 3 lines * Added support for protocol plugins * Rewrote the network IO handling in cbpolicyd, no more use of alarms, rather use select() ------------------------------------------------------------------------ r146 | nkukard | 2008-03-13 19:18:34 +0000 (Thu, 13 Mar 2008) | 2 lines * Added postfix and HTTP protocol plugins ------------------------------------------------------------------------ r145 | nkukard | 2008-03-12 20:43:08 +0000 (Wed, 12 Mar 2008) | 2 lines * Lowercase SASL username aswell ------------------------------------------------------------------------ r144 | nkukard | 2008-03-12 19:36:44 +0000 (Wed, 12 Mar 2008) | 2 lines * Fixed parseCIDR function, there was a typo breaking everyhing! ------------------------------------------------------------------------ r143 | nkukard | 2008-03-12 18:54:16 +0000 (Wed, 12 Mar 2008) | 2 lines * Fixed support for SenderIP: syntax in CheckHelo and Greylisting module ------------------------------------------------------------------------ r142 | nkukard | 2008-03-12 18:47:59 +0000 (Wed, 12 Mar 2008) | 2 lines * Fixed typo ------------------------------------------------------------------------ r141 | nkukard | 2008-03-12 18:46:49 +0000 (Wed, 12 Mar 2008) | 2 lines * Fixed up CheckHelo column Address, renamed it to Source as it supports various kinds of formats (or will in future) ------------------------------------------------------------------------ r140 | nkukard | 2008-03-12 18:26:05 +0000 (Wed, 12 Mar 2008) | 2 lines * Skip over modules without checks defined ------------------------------------------------------------------------ r139 | nkukard | 2008-03-12 18:23:21 +0000 (Wed, 12 Mar 2008) | 2 lines * Fixed bugs regarding debugging and foreground mode ------------------------------------------------------------------------ r138 | nkukard | 2008-03-12 18:14:33 +0000 (Wed, 12 Mar 2008) | 2 lines * Updated readme with core module priority ------------------------------------------------------------------------ r137 | nkukard | 2008-03-12 18:13:43 +0000 (Wed, 12 Mar 2008) | 2 lines * Added cleanup functionality ------------------------------------------------------------------------ r136 | nkukard | 2008-03-12 17:49:52 +0000 (Wed, 12 Mar 2008) | 2 lines * Added basic cleanup functionality, this should more than likely need to be refined based on the limits period ------------------------------------------------------------------------ r135 | nkukard | 2008-03-12 17:47:56 +0000 (Wed, 12 Mar 2008) | 2 lines * Added cleanup functionality ------------------------------------------------------------------------ r134 | nkukard | 2008-03-12 15:41:34 +0000 (Wed, 12 Mar 2008) | 2 lines * Added admin tool, the main purpose of this tool at the moment is to do the DB cleanup ------------------------------------------------------------------------ r133 | nkukard | 2008-03-12 15:40:34 +0000 (Wed, 12 Mar 2008) | 2 lines * Removed redundant function ------------------------------------------------------------------------ r132 | nkukard | 2008-03-12 15:38:57 +0000 (Wed, 12 Mar 2008) | 2 lines * Added core module, this is for system functions used in a modular fashion (ie. the cleanup tool) ------------------------------------------------------------------------ r131 | nkukard | 2008-03-12 15:37:28 +0000 (Wed, 12 Mar 2008) | 2 lines * Added version module to be shared between commandline tools ------------------------------------------------------------------------ r130 | nkukard | 2008-03-12 15:23:48 +0000 (Wed, 12 Mar 2008) | 4 lines * Fixed background vs. foreground issues in cbpolicyd * Fixed defaults * Added --fg for forced foreground operation ------------------------------------------------------------------------ r129 | nkukard | 2008-03-12 11:51:28 +0000 (Wed, 12 Mar 2008) | 3 lines * List of hosts for checkhelo and greylisting exceptions - Please feel free to post nominations to developers mailing list! ------------------------------------------------------------------------ r128 | nkukard | 2008-03-12 07:38:17 +0000 (Wed, 12 Mar 2008) | 3 lines * Fixed daemonization, cbpolicyd is now daemonized by default * Set a few config defaults in cbpolicyd ------------------------------------------------------------------------ r127 | nkukard | 2008-03-12 06:51:00 +0000 (Wed, 12 Mar 2008) | 3 lines * Fixed auto-whitelisting, it would of worked in the opposite way as expected * Cosmetic fixes ------------------------------------------------------------------------ r126 | nkukard | 2008-03-11 19:23:02 +0000 (Tue, 11 Mar 2008) | 2 lines * Updated index page ------------------------------------------------------------------------ r125 | nkukard | 2008-03-11 19:00:07 +0000 (Tue, 11 Mar 2008) | 2 lines * Honor the % specified in the Greylisting rule properly, its % of total triplets, not unauthenticated vs. authenticated ------------------------------------------------------------------------ r123 | nkukard | 2008-03-11 17:45:09 +0000 (Tue, 11 Mar 2008) | 2 lines * Stop processing modules if we have a verdict ------------------------------------------------------------------------ r122 | nkukard | 2008-03-11 17:35:03 +0000 (Tue, 11 Mar 2008) | 3 lines * Fixed auto-whitelisting and auto-blacklisting * Updated TODO with a good greylisting idea from Xpoint ------------------------------------------------------------------------ r121 | nkukard | 2008-03-11 17:02:34 +0000 (Tue, 11 Mar 2008) | 3 lines * Fixed multiple SQL query errors * Some cosmetic fixes ------------------------------------------------------------------------ r120 | nkukard | 2008-03-11 16:25:09 +0000 (Tue, 11 Mar 2008) | 2 lines * Fixed problems when changing a checkhelo, "UNKNOWN" was displayed instead of "No" ------------------------------------------------------------------------ r119 | nkukard | 2008-03-11 15:26:02 +0000 (Tue, 11 Mar 2008) | 2 lines * Added TXT file with some module priorities ------------------------------------------------------------------------ r118 | nkukard | 2008-03-11 15:24:44 +0000 (Tue, 11 Mar 2008) | 2 lines * Added greylisting webui ------------------------------------------------------------------------ r117 | nkukard | 2008-03-11 15:23:42 +0000 (Tue, 11 Mar 2008) | 2 lines * Fixed label on tab at top of page ------------------------------------------------------------------------ r116 | nkukard | 2008-03-11 15:20:00 +0000 (Tue, 11 Mar 2008) | 3 lines * Fixed missing track by 'Policy' option * Cleaned up quotas deleting ------------------------------------------------------------------------ r115 | nkukard | 2008-03-11 14:59:15 +0000 (Tue, 11 Mar 2008) | 2 lines * Added greylisting sql tables ------------------------------------------------------------------------ r114 | nkukard | 2008-03-11 14:57:42 +0000 (Tue, 11 Mar 2008) | 3 lines * Added greylisting support * Updated config file example and cleaned it up a bit ------------------------------------------------------------------------ r113 | nkukard | 2008-03-11 14:53:57 +0000 (Tue, 11 Mar 2008) | 3 lines * Added defer support to cbpolicyd * Updated TODO ------------------------------------------------------------------------ r112 | nkukard | 2008-03-11 14:51:27 +0000 (Tue, 11 Mar 2008) | 2 lines * Reduce address field to 64 characters instead of 255 ------------------------------------------------------------------------ r111 | nkukard | 2008-03-11 14:50:43 +0000 (Tue, 11 Mar 2008) | 3 lines * Various code cleanups * Added priority to each module ------------------------------------------------------------------------ r110 | nkukard | 2008-03-11 14:49:09 +0000 (Tue, 11 Mar 2008) | 4 lines * Use parseCIDR * Various code cleanups * Added module priority ------------------------------------------------------------------------ r109 | nkukard | 2008-03-11 14:47:39 +0000 (Tue, 11 Mar 2008) | 2 lines * Added parsing of CIDR support, this code is repeated in numerous places ------------------------------------------------------------------------ r108 | nkukard | 2008-03-11 14:44:50 +0000 (Tue, 11 Mar 2008) | 3 lines * Call getPolicy function with SASL information * Small cosmetic fixes in amavis plugin ------------------------------------------------------------------------ r107 | nkukard | 2008-03-11 14:34:26 +0000 (Tue, 11 Mar 2008) | 4 lines * Added SASL support to policy library * Fixed bug in parsing in policy rules regarding email address specifications * Some small regex cleanups ------------------------------------------------------------------------ r106 | nkukard | 2008-03-06 09:22:41 +0000 (Thu, 06 Mar 2008) | 2 lines * Minor bugfixes and cosmetic changes to webui ------------------------------------------------------------------------ r105 | nkukard | 2008-03-05 12:08:52 +0000 (Wed, 05 Mar 2008) | 2 lines * Fixed various record removal issues ------------------------------------------------------------------------ r104 | nkukard | 2008-03-05 11:18:36 +0000 (Wed, 05 Mar 2008) | 3 lines * Added some checks in cbpolicyd for failed session data functions * Removed some debugging from tracking.pm ------------------------------------------------------------------------ r103 | nkukard | 2008-03-05 11:10:25 +0000 (Wed, 05 Mar 2008) | 2 lines * Ported amavisd module to new framework ------------------------------------------------------------------------ r102 | nkukard | 2008-03-05 11:08:51 +0000 (Wed, 05 Mar 2008) | 2 lines * Major changes to entire framework, this new framework allows tracking of email through policyd v2 and into a 3rd-party module ------------------------------------------------------------------------ r101 | nkukard | 2008-03-05 11:05:58 +0000 (Wed, 05 Mar 2008) | 3 lines * Fixed bug with disabled postfix aliases * Remvoed debug information from amavis-add ------------------------------------------------------------------------ r100 | nkukard | 2008-03-05 11:02:27 +0000 (Wed, 05 Mar 2008) | 2 lines * Added message tacking module ------------------------------------------------------------------------ r99 | nkukard | 2008-03-01 20:01:47 +0000 (Sat, 01 Mar 2008) | 3 lines * Updated TODO * Fixed typo in CheckSPF module ------------------------------------------------------------------------ r98 | nkukard | 2008-03-01 19:58:19 +0000 (Sat, 01 Mar 2008) | 2 lines * Make SPF reason for rejection include link and be more pretty ------------------------------------------------------------------------ r97 | nkukard | 2008-03-01 19:17:09 +0000 (Sat, 01 Mar 2008) | 2 lines * Added Amavis always_bcc option as Interception/BCC To ------------------------------------------------------------------------ r96 | nkukard | 2008-03-01 18:15:27 +0000 (Sat, 01 Mar 2008) | 2 lines * Disable postfix integration by default ------------------------------------------------------------------------ r95 | nkukard | 2008-03-01 18:12:11 +0000 (Sat, 01 Mar 2008) | 2 lines * Added main.cf_snippet ------------------------------------------------------------------------ r94 | nkukard | 2008-03-01 18:11:33 +0000 (Sat, 01 Mar 2008) | 3 lines * Added removing of child table columns on some of the modules * Added displaying of SQL errors on error ------------------------------------------------------------------------ r93 | nkukard | 2008-03-01 16:37:22 +0000 (Sat, 01 Mar 2008) | 2 lines * added some error checking to some of the webui ------------------------------------------------------------------------ r92 | nkukard | 2008-03-01 15:55:08 +0000 (Sat, 01 Mar 2008) | 2 lines * Check if we must add a SPF header when the domain doesn't have a SPF record ------------------------------------------------------------------------ r91 | nkukard | 2008-03-01 15:40:57 +0000 (Sat, 01 Mar 2008) | 2 lines * Fixed referential integrity bug reported by xpoint on irc ------------------------------------------------------------------------ r90 | nkukard | 2008-03-01 15:31:59 +0000 (Sat, 01 Mar 2008) | 2 lines * Catch invalid HELO's seeping through the cracks ------------------------------------------------------------------------ r89 | nkukard | 2008-03-01 15:15:44 +0000 (Sat, 01 Mar 2008) | 2 lines * Use plain local_explanation and not Dumper() ------------------------------------------------------------------------ r88 | nkukard | 2008-03-01 15:14:34 +0000 (Sat, 01 Mar 2008) | 3 lines * Use ; in rejections instead of , * Don't do SPF check on <> ------------------------------------------------------------------------ r87 | nkukard | 2008-03-01 15:10:51 +0000 (Sat, 01 Mar 2008) | 2 lines * Use ; instead of , in the rejection messages ------------------------------------------------------------------------ r86 | nkukard | 2008-03-01 15:04:39 +0000 (Sat, 01 Mar 2008) | 3 lines * Compare database values using text comparison instead of numeric * Added some debug info to SPF ------------------------------------------------------------------------ r85 | nkukard | 2008-03-01 13:30:51 +0000 (Sat, 01 Mar 2008) | 2 lines * Removed comments at bottom of config file ------------------------------------------------------------------------ r83 | nkukard | 2008-03-01 11:27:08 +0000 (Sat, 01 Mar 2008) | 2 lines * Updated install howto ------------------------------------------------------------------------ r82 | nkukard | 2008-03-01 11:13:36 +0000 (Sat, 01 Mar 2008) | 2 lines * Added short install howto ------------------------------------------------------------------------ r81 | nkukard | 2008-02-29 20:19:20 +0000 (Fri, 29 Feb 2008) | 2 lines * Added CheckSPF module to cbpolicyd ------------------------------------------------------------------------ r80 | nkukard | 2008-02-29 19:27:50 +0000 (Fri, 29 Feb 2008) | 2 lines * Added web interface for CheckSPF module ------------------------------------------------------------------------ r79 | nkukard | 2008-02-28 14:51:20 +0000 (Thu, 28 Feb 2008) | 3 lines * Added CheckHelo module to backend * Various small fixes to Quotas and AccessControl ------------------------------------------------------------------------ r78 | nkukard | 2008-02-28 14:46:17 +0000 (Thu, 28 Feb 2008) | 2 lines * Added HELO/EHLO checks to webui ------------------------------------------------------------------------ r77 | nkukard | 2008-02-24 15:17:06 +0000 (Sun, 24 Feb 2008) | 2 lines * Fixed configuration for postfix distribution lists to use new table naming scheme ------------------------------------------------------------------------ r76 | nkukard | 2008-02-23 10:50:23 +0000 (Sat, 23 Feb 2008) | 2 lines * Added contributed postfix config ------------------------------------------------------------------------ r75 | nkukard | 2008-02-23 10:34:52 +0000 (Sat, 23 Feb 2008) | 2 lines * Finished support for optional postfix addon to web interface ------------------------------------------------------------------------ r74 | nkukard | 2008-02-16 12:46:48 +0000 (Sat, 16 Feb 2008) | 2 lines * Added postfix transport & mailbox creation support .... this will be more than likely split off into another project as it does not belong in cluebringer ------------------------------------------------------------------------ r73 | nkukard | 2008-02-07 13:32:41 +0000 (Thu, 07 Feb 2008) | 3 lines * Added patch to add policy changing to amavisd-new * Updated amavis custom module and removed most debugging ------------------------------------------------------------------------ r72 | nkukard | 2008-02-05 15:10:34 +0000 (Tue, 05 Feb 2008) | 2 lines * Quite a few fixups to the amavisd plugin module, it still doesn't support merging of certain options (wip). ------------------------------------------------------------------------ r71 | nkukard | 2008-02-05 15:05:16 +0000 (Tue, 05 Feb 2008) | 3 lines * This commit should add Amavisd-new integration into the web interface * Various fixups ------------------------------------------------------------------------ r70 | nkukard | 2008-02-03 17:07:25 +0000 (Sun, 03 Feb 2008) | 2 lines * Changed amavis table to add _rules ------------------------------------------------------------------------ r69 | nkukard | 2008-01-28 19:31:38 +0000 (Mon, 28 Jan 2008) | 3 lines * Preliminary contributed module for policyd => amavis integration - This will allow for all amavisd features to be available on a per policyd-policy basis, among other things just think about only scanning email for spam if its from a freemail provider, or even setting spam scores especially on freemail providers sending to commonly spammed email addies. The limits are endless. ------------------------------------------------------------------------ r68 | nkukard | 2008-01-28 19:28:12 +0000 (Mon, 28 Jan 2008) | 2 lines * Removed DBFreeRes where its not required ------------------------------------------------------------------------ r67 | nkukard | 2008-01-28 19:26:45 +0000 (Mon, 28 Jan 2008) | 2 lines * Removed DBFreeRes where its not needed ------------------------------------------------------------------------ r66 | nkukard | 2008-01-28 19:25:41 +0000 (Mon, 28 Jan 2008) | 2 lines * Added database schema for amavis integration ------------------------------------------------------------------------ r65 | nkukard | 2008-01-24 11:33:32 +0000 (Thu, 24 Jan 2008) | 2 lines * We use PDO, not MDB2 now ------------------------------------------------------------------------ r64 | nkukard | 2008-01-24 08:30:04 +0000 (Thu, 24 Jan 2008) | 2 lines * Added customizable returns to quotas being exceeded ------------------------------------------------------------------------ r63 | nkukard | 2008-01-24 07:35:42 +0000 (Thu, 24 Jan 2008) | 3 lines * Fixed deleting of quotas, remove limits and limit tracking * Small code fixes & cleanups ------------------------------------------------------------------------ r62 | nkukard | 2008-01-23 20:49:18 +0000 (Wed, 23 Jan 2008) | 2 lines * Avoid colum name clashing in mysql ------------------------------------------------------------------------ r61 | nkukard | 2008-01-23 19:35:29 +0000 (Wed, 23 Jan 2008) | 3 lines * WebUI - Commit of the remainding of the quota support ------------------------------------------------------------------------ r60 | nkukard | 2008-01-23 17:41:42 +0000 (Wed, 23 Jan 2008) | 2 lines * Various schema changes ------------------------------------------------------------------------ r59 | nkukard | 2008-01-23 16:24:52 +0000 (Wed, 23 Jan 2008) | 5 lines * WebUI - Added support for Quotas - Added support for AccessControl - Lots of changes regarding compliance with the relevant specs ------------------------------------------------------------------------ r57 | nkukard | 2008-01-21 20:06:23 +0000 (Mon, 21 Jan 2008) | 5 lines * Added support for policies * Added support for policy acls * Added support for policy groups * Added support for policy group members ------------------------------------------------------------------------ r56 | nkukard | 2008-01-21 20:02:47 +0000 (Mon, 21 Jan 2008) | 2 lines * Added comment to policy acls ------------------------------------------------------------------------ r55 | nkukard | 2008-01-19 19:18:30 +0000 (Sat, 19 Jan 2008) | 2 lines * WebUI: Adding of policies now work ------------------------------------------------------------------------ r54 | nkukard | 2008-01-19 16:25:43 +0000 (Sat, 19 Jan 2008) | 2 lines * Added webui framework ------------------------------------------------------------------------ r53 | nkukard | 2008-01-17 13:50:52 +0000 (Thu, 17 Jan 2008) | 2 lines * Added wishlist ------------------------------------------------------------------------ r52 | nkukard | 2008-01-17 13:49:12 +0000 (Thu, 17 Jan 2008) | 2 lines * Quotas: Added support to track based on policy ------------------------------------------------------------------------ r51 | nkukard | 2008-01-17 13:26:17 +0000 (Thu, 17 Jan 2008) | 2 lines * Added logging to maillog ------------------------------------------------------------------------ r50 | nkukard | 2008-01-17 13:24:01 +0000 (Thu, 17 Jan 2008) | 3 lines * Fixed up the allowed configuration options * Added support to log to maillog ------------------------------------------------------------------------ r49 | nkukard | 2008-01-17 13:21:48 +0000 (Thu, 17 Jan 2008) | 3 lines * Added missing configuration options & some comments - Updated site with more verbose description ------------------------------------------------------------------------ r48 | nkukard | 2008-01-17 09:11:53 +0000 (Thu, 17 Jan 2008) | 2 lines * Don't use #, use /* */ in sql ------------------------------------------------------------------------ r46 | nkukard | 2008-01-16 17:53:51 +0000 (Wed, 16 Jan 2008) | 2 lines * Version bump before snapshot ------------------------------------------------------------------------ r45 | nkukard | 2008-01-16 11:15:13 +0000 (Wed, 16 Jan 2008) | 2 lines * Added script to convert tsql files into mysql, pgsql and sqlite format ------------------------------------------------------------------------ r44 | nkukard | 2008-01-16 10:30:08 +0000 (Wed, 16 Jan 2008) | 3 lines * Fixed mysql and pgsql conversion scripts - Thanks xpoint ------------------------------------------------------------------------ r43 | nkukard | 2008-01-16 10:06:03 +0000 (Wed, 16 Jan 2008) | 2 lines * Added quotas support ------------------------------------------------------------------------ r42 | nkukard | 2008-01-16 10:03:33 +0000 (Wed, 16 Jan 2008) | 3 lines * cbpolicyd: Track recipients so we can see who's getting the message in EOM * database/core: Added SQL table for the recipient tracking ------------------------------------------------------------------------ r41 | nkukard | 2008-01-16 10:00:21 +0000 (Wed, 16 Jan 2008) | 2 lines * Commented out access control example ------------------------------------------------------------------------ r40 | nkukard | 2008-01-16 09:58:31 +0000 (Wed, 16 Jan 2008) | 3 lines * Removed debug info * Various cosmetic fixes ------------------------------------------------------------------------ r39 | nkukard | 2008-01-16 09:57:25 +0000 (Wed, 16 Jan 2008) | 2 lines * Removed stray use ------------------------------------------------------------------------ r38 | nkukard | 2008-01-16 09:56:22 +0000 (Wed, 16 Jan 2008) | 2 lines * Export IP arithmatic functions ------------------------------------------------------------------------ r35 | nkukard | 2008-01-11 07:47:42 +0000 (Fri, 11 Jan 2008) | 8 lines Policies: * Remove debuggin info from policy engine * Push policies into an array hashed by policy AccessControl: * Basic implementation ------------------------------------------------------------------------ r34 | nkukard | 2008-01-10 12:16:39 +0000 (Thu, 10 Jan 2008) | 2 lines * Added simple access control schema ------------------------------------------------------------------------ r33 | nkukard | 2008-01-10 12:15:41 +0000 (Thu, 10 Jan 2008) | 2 lines * Added simple db creation script ------------------------------------------------------------------------ r32 | nkukard | 2008-01-10 12:13:27 +0000 (Thu, 10 Jan 2008) | 2 lines * Sanitized the default policies ------------------------------------------------------------------------ r31 | nkukard | 2008-01-10 11:45:06 +0000 (Thu, 10 Jan 2008) | 4 lines * Checked in system module * Checked in policiesm odule * Checked in caching module ------------------------------------------------------------------------ r30 | nkukard | 2008-01-08 20:45:03 +0000 (Tue, 08 Jan 2008) | 6 lines * Added config module * Removed modules.pm, don't need this anymore * Added DBI layers to support embedded transactions * Removed ltable.pm, we'll use direct DB access from now on * Updated config file ------------------------------------------------------------------------ r29 | nkukard | 2008-01-08 15:35:05 +0000 (Tue, 08 Jan 2008) | 4 lines * Removed feature moduels for now * Added database schema for new policy support * Added schema for policy based quotas support ------------------------------------------------------------------------ r28 | nkukard | 2008-01-07 08:18:58 +0000 (Mon, 07 Jan 2008) | 2 lines * Renamed schemas dir to database ------------------------------------------------------------------------ r27 | nkukard | 2007-12-17 11:25:38 +0000 (Mon, 17 Dec 2007) | 2 lines * Commit of my work so far ------------------------------------------------------------------------ r26 | nkukard | 2007-12-08 18:58:56 +0000 (Sat, 08 Dec 2007) | 2 lines * Added immediate requirements for contract sponsoring development ------------------------------------------------------------------------ r25 | nkukard | 2007-06-26 19:28:57 +0000 (Tue, 26 Jun 2007) | 2 lines * Various changes & fixups ------------------------------------------------------------------------ r24 | nkukard | 2007-06-24 21:57:54 +0000 (Sun, 24 Jun 2007) | 4 lines * Reworked databae handling * Reworked feature & database modules * Fixed up logging a bit ------------------------------------------------------------------------ r23 | nkukard | 2007-06-22 21:59:51 +0000 (Fri, 22 Jun 2007) | 3 lines * If a database fails to initialize, don't use it * Addd getStatus() function to backend database and ltable layer ------------------------------------------------------------------------ r22 | nkukard | 2007-06-22 06:15:12 +0000 (Fri, 22 Jun 2007) | 2 lines * More major changes ------------------------------------------------------------------------ r21 | nkukard | 2007-06-17 22:06:25 +0000 (Sun, 17 Jun 2007) | 3 lines * Semi-working lookup abstraction layer * Added schmas/mysql/helo.sql schema ------------------------------------------------------------------------ r20 | nkukard | 2007-06-17 00:19:50 +0000 (Sun, 17 Jun 2007) | 2 lines * Semi working database/table abstraction layer ------------------------------------------------------------------------ r19 | nkukard | 2007-06-16 21:27:00 +0000 (Sat, 16 Jun 2007) | 4 lines * Preliminary work on database table support [code is currently broken and will not run] ------------------------------------------------------------------------ r18 | nkukard | 2007-06-16 10:00:25 +0000 (Sat, 16 Jun 2007) | 2 lines * Renamed features to feature ------------------------------------------------------------------------ r17 | nkukard | 2007-06-16 09:59:02 +0000 (Sat, 16 Jun 2007) | 2 lines * Preliminary checkin, moved features into features directory ------------------------------------------------------------------------ r16 | nkukard | 2007-06-12 08:35:46 +0000 (Tue, 12 Jun 2007) | 2 lines * Added TODO for per recipient whitelists & blacklists ------------------------------------------------------------------------ r15 | nkukard | 2007-06-09 22:25:30 +0000 (Sat, 09 Jun 2007) | 2 lines * Fixed up logging ------------------------------------------------------------------------ r14 | nkukard | 2007-06-09 20:57:25 +0000 (Sat, 09 Jun 2007) | 2 lines * Better config support, preparing for some sort of abstraction the modules can use ------------------------------------------------------------------------ r13 | nkukard | 2007-06-09 20:02:13 +0000 (Sat, 09 Jun 2007) | 2 lines * Added skeleton for helo based blacklisting/whitelisting ... etc ------------------------------------------------------------------------ r12 | nkukard | 2007-06-09 07:14:50 +0000 (Sat, 09 Jun 2007) | 3 lines * Added reversing of sending server IP check * Reworked handling of resolution results of FQDN HELO check ------------------------------------------------------------------------ r11 | nkukard | 2007-06-09 00:11:12 +0000 (Sat, 09 Jun 2007) | 2 lines * Check for valid DNS records when verifying HELO/EHLO ------------------------------------------------------------------------ r10 | nkukard | 2007-06-09 00:06:28 +0000 (Sat, 09 Jun 2007) | 2 lines * Added DNS checking of HELO/EHLO ------------------------------------------------------------------------ r9 | nkukard | 2007-06-08 23:26:37 +0000 (Fri, 08 Jun 2007) | 3 lines * Added FIXME's for helo fqdn check module * Possibly bypass HELO checks for sasl users ------------------------------------------------------------------------ r8 | nkukard | 2007-06-08 23:22:26 +0000 (Fri, 08 Jun 2007) | 3 lines * Misc bugfixes * Working FQDN HELO checking ------------------------------------------------------------------------ r7 | nkukard | 2007-06-08 21:40:35 +0000 (Fri, 08 Jun 2007) | 2 lines * Added time to greylisting ------------------------------------------------------------------------ r6 | nkukard | 2007-06-08 21:33:43 +0000 (Fri, 08 Jun 2007) | 2 lines * Fixed typo in module result handling ------------------------------------------------------------------------ r5 | nkukard | 2007-06-08 21:30:05 +0000 (Fri, 08 Jun 2007) | 2 lines * Fixed typo in greylisting module ------------------------------------------------------------------------ r4 | nkukard | 2007-06-08 21:27:18 +0000 (Fri, 08 Jun 2007) | 4 lines * Added module logging function * Log what we see in greylisting * Lowercase sender & recipient ------------------------------------------------------------------------ r3 | nkukard | 2007-06-08 19:10:58 +0000 (Fri, 08 Jun 2007) | 3 lines * Fixed up syslog levels * Log to syslog in main program, instead of STDOUT ------------------------------------------------------------------------ r2 | nkukard | 2007-06-08 18:43:41 +0000 (Fri, 08 Jun 2007) | 2 lines * Added some stuff to work off of ------------------------------------------------------------------------ r1 | nkukard | 2007-06-08 15:30:40 +0000 (Fri, 08 Jun 2007) | 2 lines * Added main svn structure ------------------------------------------------------------------------ postfix-cluebringer-2.0.10/database/0000755000175000017500000000000011312351140017156 5ustar nikolainikolaipostfix-cluebringer-2.0.10/database/greylisting.tsql0000644000175000017500000001015411177770474022454 0ustar nikolainikolai# Greylisting module schema # Copyright (C) 2009, AllWorldIT # Copyright (C) 2008, LinuxRulz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. /* Greylisting */ /* NULL means to inherit */ CREATE TABLE greylisting ( ID @SERIAL_TYPE@, PolicyID @SERIAL_REF_TYPE@, Name VARCHAR(255) NOT NULL, /* General greylisting settings */ UseGreylisting SMALLINT, /* Actually use greylisting */ GreylistPeriod @BIG_INTEGER@, /* Period in seconds to greylist for */ /* Record tracking */ Track VARCHAR(255) NOT NULL, /* Format: : SenderIP - This takes a bitmask to mask the IP with, A good default is /24 */ /* Bypass greylisting: sender+recipient level */ GreylistAuthValidity @BIG_INTEGER@, /* Period for which last authenticated greylist entry is valid for. This effectively bypasses greylisting for the second email a sender sends a recipient. */ GreylistUnAuthValidity @BIG_INTEGER@, /* Same as above but for unauthenticated entries */ /* Auto-whitelisting: sending server level */ UseAutoWhitelist SMALLINT, /* Use auto-whitelisting */ AutoWhitelistPeriod @BIG_INTEGER@, /* Period to look back to find authenticated triplets */ AutoWhitelistCount @BIG_INTEGER@, /* Count of authenticated triplets after which we auto-whitelist */ AutoWhitelistPercentage @BIG_INTEGER@, /* Percentage of at least Count triplets that must be authenticated before auto-whitelisting. This changes the behaviour or Count */ /* Auto-blacklisting: sending server level */ UseAutoBlacklist SMALLINT, /* Use auto-blacklisting */ AutoBlacklistPeriod @BIG_INTEGER@, /* Period to look back to find unauthenticated triplets */ AutoBlacklistCount @BIG_INTEGER@, /* Count of authenticated triplets after which we auto-whitelist */ AutoBlacklistPercentage @BIG_INTEGER@, /* Percentage of at least Count triplets that must be authenticated before auto-whitelisting. This changes the behaviour or Count */ Comment VARCHAR(1024), Disabled SMALLINT NOT NULL DEFAULT '0', FOREIGN KEY (PolicyID) REFERENCES policies(ID) ) @CREATE_TABLE_SUFFIX@; /* Whitelisted */ CREATE TABLE greylisting_whitelist ( ID @SERIAL_TYPE@, Source VARCHAR(255) NOT NULL, /* Either CIDR a.b.c.d, a.b.c.d/x, or reversed host*-*.whatever.com */ Comment VARCHAR(1024), Disabled SMALLINT NOT NULL DEFAULT '0', UNIQUE (Source) ) @CREATE_TABLE_SUFFIX@; /* Auto-whitelistings */ CREATE TABLE greylisting_autowhitelist ( ID @SERIAL_TYPE@, TrackKey VARCHAR(@TRACK_KEY_LEN@) NOT NULL, Added @BIG_INTEGER@ NOT NULL, LastSeen @BIG_INTEGER@ NOT NULL, Comment VARCHAR(1024), UNIQUE (TrackKey) ) @CREATE_TABLE_SUFFIX@; /* Auto-blacklistings */ CREATE TABLE greylisting_autoblacklist ( ID @SERIAL_TYPE@, TrackKey VARCHAR(@TRACK_KEY_LEN@) NOT NULL, Added @BIG_INTEGER@ NOT NULL, Comment VARCHAR(1024), UNIQUE (TrackKey) ) @CREATE_TABLE_SUFFIX@; /* Greylist triplet tracking table */ CREATE TABLE greylisting_tracking ( TrackKey VARCHAR(@TRACK_KEY_LEN@) NOT NULL, /* The address really, masked with whatever */ Sender VARCHAR(255) NOT NULL, Recipient VARCHAR(255) NOT NULL, FirstSeen @BIG_INTEGER@ NOT NULL, LastUpdate @BIG_INTEGER@ NOT NULL, Tries @BIG_INTEGER@ NOT NULL, /* Authentication tries */ Count @BIG_INTEGER@ NOT NULL, /* Authenticated count */ UNIQUE(TrackKey,Sender,Recipient) ) @CREATE_TABLE_SUFFIX@; CREATE INDEX greylisting_tracking_idx1 ON greylisting_tracking (LastUpdate,Count); postfix-cluebringer-2.0.10/database/access_control.tsql0000644000175000017500000000233311177770474023115 0ustar nikolainikolai# AccessControl module schema # Copyright (C) 2009, AllWorldIT # Copyright (C) 2008, LinuxRulz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. /* Plain and simple access control */ CREATE TABLE access_control ( ID @SERIAL_TYPE@, PolicyID @SERIAL_REF_TYPE@, Name VARCHAR(255) NOT NULL, Verdict VARCHAR(255), Data TEXT, Comment VARCHAR(1024), Disabled SMALLINT NOT NULL DEFAULT '0', FOREIGN KEY (PolicyID) REFERENCES policies(ID) ) @CREATE_TABLE_SUFFIX@; /* INSERT INTO access_control (PolicyID,Verdict,Data) VALUES (5,'REJECT','POP,SNAPPLE,CRAK'); */ postfix-cluebringer-2.0.10/database/convert-tsql0000755000175000017500000000541211177770474021577 0ustar nikolainikolai#!/bin/bash # Database translation/creation script # Copyright (C) 2009, AllWorldIT # Copyright (C) 2008, LinuxRulz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. database="$1" file="$2" # Display usage info display_usage() { echo "Usage: $0 " echo echo "Valid database types:" echo " mysql4 - For MySQL v4" echo " mysql - For MySQL v5" echo " pgsql - For PostgreSQL" echo " sqlite - For SQLite v3" echo exit } # Check we have our params if [ -z "$database" -o -z "$file" ] then display_usage fi # Check file exists if [ ! -f "$file" ] then echo "ERROR: Cannot open file '$file'" exit 1 fi # Check what we converting for case "$database" in "mysql4") sed \ -e 's/@PRELOAD@/SET FOREIGN_KEY_CHECKS=0;/' \ -e 's/@POSTLOAD@/SET FOREIGN_KEY_CHECKS=1;/' \ -e 's/@CREATE_TABLE_SUFFIX@/TYPE=InnoDB CHARACTER SET latin1 COLLATE latin1_bin/' \ -e 's/@SERIAL_TYPE@/SERIAL/' \ -e 's/@BIG_INTEGER@/BIGINT UNSIGNED/' \ -e 's/@TRACK_KEY_LEN@/255/' \ -e 's/@SERIAL_REF_TYPE@/BIGINT UNSIGNED/' < "$file" ;; "mysql") sed \ -e 's/@PRELOAD@/SET FOREIGN_KEY_CHECKS=0;/' \ -e 's/@POSTLOAD@/SET FOREIGN_KEY_CHECKS=1;/' \ -e 's/@CREATE_TABLE_SUFFIX@/TYPE=InnoDB CHARACTER SET latin1 COLLATE latin1_bin/' \ -e 's/@SERIAL_TYPE@/SERIAL/' \ -e 's/@BIG_INTEGER@/BIGINT UNSIGNED/' \ -e 's/@TRACK_KEY_LEN@/512/' \ -e 's/@SERIAL_REF_TYPE@/BIGINT UNSIGNED/' < "$file" ;; "pgsql") sed \ -e 's/@PRELOAD@/SET CONSTRAINTS ALL DEFERRED;/' \ -e 's/@POSTLOAD@//' \ -e 's/@CREATE_TABLE_SUFFIX@//' \ -e 's/@SERIAL_TYPE@/SERIAL PRIMARY KEY/' \ -e 's/@BIG_INTEGER@/INT8/' \ -e 's/@TRACK_KEY_LEN@/512/' \ -e 's/@SERIAL_REF_TYPE@/INT8/' < "$file" ;; "sqlite") sed \ -e 's/@PRELOAD@//' \ -e 's/@POSTLOAD@//' \ -e 's/@CREATE_TABLE_SUFFIX@//' \ -e 's/@SERIAL_TYPE@/INTEGER PRIMARY KEY AUTOINCREMENT/' \ -e 's/@BIG_INTEGER@/INT8/' \ -e 's/@TRACK_KEY_LEN@/512/' \ -e 's/@SERIAL_REF_TYPE@/INT8/' < "$file" ;; *) echo "ERROR: Invalid database type '$database'" exit 1 ;; esac postfix-cluebringer-2.0.10/database/quotas.tsql0000644000175000017500000000561511177770474021436 0ustar nikolainikolai# Quotas module schema # Copyright (C) 2009, AllWorldIT # Copyright (C) 2008, LinuxRulz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. /* Main quotas table, this defines the period the quota is over and how to track it */ CREATE TABLE quotas ( ID @SERIAL_TYPE@, PolicyID @SERIAL_REF_TYPE@, Name VARCHAR(255) NOT NULL, /* Tracking Options */ Track VARCHAR(255) NOT NULL, /* Format: : SenderIP - This takes a bitmask to mask the IP with. A good default is /24 Sender & Recipient - Either "user@domain" (default), "user@" or "@domain" for the entire email addy or email addy domain respectively. */ /* Period over which this policy is valid, this is in seconds */ Period @BIG_INTEGER@, Verdict VARCHAR(255), Data TEXT, Comment VARCHAR(1024), Disabled SMALLINT NOT NULL DEFAULT '0', FOREIGN KEY (PolicyID) REFERENCES policies(ID) ) @CREATE_TABLE_SUFFIX@; INSERT INTO quotas (PolicyID,Name,Track,Period,Verdict) VALUES (5,'Recipient quotas','Recipient:user@domain',3600,'REJECT'); INSERT INTO quotas (PolicyID,Name,Track,Period,Verdict) VALUES (5,'Quota on all /24s','SenderIP:/24',3600,'REJECT'); /* Limits for the quota */ CREATE TABLE quotas_limits ( ID @SERIAL_TYPE@, QuotasID @SERIAL_REF_TYPE@, Type VARCHAR(255), /* "MessageCount" or "MessageCumulativeSize" */ CounterLimit @BIG_INTEGER@, Comment VARCHAR(1024), Disabled SMALLINT NOT NULL DEFAULT '0', FOREIGN KEY (QuotasID) REFERENCES quotas(ID) ) @CREATE_TABLE_SUFFIX@; INSERT INTO quotas_limits (QuotasID,Type,CounterLimit) VALUES (1,'MessageCount',10); INSERT INTO quotas_limits (QuotasID,Type,CounterLimit) VALUES (1,'MessageCumulativeSize',8000); INSERT INTO quotas_limits (QuotasID,Type,CounterLimit) VALUES (2,'MessageCount',12); /* This table is used for tracking the quotas */ CREATE TABLE quotas_tracking ( QuotasLimitsID @SERIAL_REF_TYPE@, TrackKey VARCHAR(@TRACK_KEY_LEN@), /* Last time this record was update */ LastUpdate @BIG_INTEGER@, /* NULL means not updated yet */ Counter NUMERIC(10,4), UNIQUE (QuotasLimitsID,TrackKey), FOREIGN KEY (QuotasLimitsID) REFERENCES quotas_limits(ID) ) @CREATE_TABLE_SUFFIX@; CREATE INDEX quotas_tracking_idx1 ON quotas_tracking (LastUpdate); postfix-cluebringer-2.0.10/database/core.tsql0000644000175000017500000001105411177770474021044 0ustar nikolainikolai# Core schema # Copyright (C) 2009, AllWorldIT # Copyright (C) 2008, LinuxRulz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @PRELOAD@ /* Priorities... 0 - System policy priority (fallthrough) 1-50 - System policies 50-100 - Custom policies */ /* Policies */ CREATE TABLE policies ( ID @SERIAL_TYPE@, Name VARCHAR(255) NOT NULL, Priority SMALLINT NOT NULL, Description TEXT, Disabled SMALLINT NOT NULL DEFAULT '0' ) @CREATE_TABLE_SUFFIX@; INSERT INTO policies (Name,Priority,Description) VALUES ('Default',0,'Default System Policy'); INSERT INTO policies (Name,Priority,Description) VALUES ('Default Outbound',10,'Default Outbound System Policy'); INSERT INTO policies (Name,Priority,Description) VALUES ('Default Inbound',10,'Default Inbound System Policy'); INSERT INTO policies (Name,Priority,Description) VALUES ('Default Internal',20,'Default Internal System Policy'); INSERT INTO policies (Name,Priority,Description) VALUES ('Test',50,'Test policy'); /* Member list for policies */ CREATE TABLE policy_members ( ID @SERIAL_TYPE@, PolicyID @SERIAL_REF_TYPE@, /* Format of key: NULL = any a.b.c.d/e = IP address with optional /e @domain = domain specification, %xyz = xyz group, abc@domain = abc user specification all options support negation using ! */ Source TEXT, Destination TEXT, Comment VARCHAR(1024), Disabled SMALLINT NOT NULL DEFAULT '0', FOREIGN KEY (PolicyID) REFERENCES policies(ID) ) @CREATE_TABLE_SUFFIX@; /* Default System Policy */ INSERT INTO policy_members (PolicyID,Source,Destination) VALUES (1,NULL,NULL); /* Default Outbound System Policy */ INSERT INTO policy_members (PolicyID,Source,Destination) VALUES (2,'%internal_ips,%internal_domains','!%internal_domains'); /* Default Inbound System Policy */ INSERT INTO policy_members (PolicyID,Source,Destination) VALUES (3,'!%internal_ips,!%internal_domains','%internal_domains'); /* Default Internal System Policy */ INSERT INTO policy_members (PolicyID,Source,Destination) VALUES (4,'%internal_ips,%internal_domains','%internal_domains'); /* Test Policy */ INSERT INTO policy_members (PolicyID,Source,Destination) VALUES (5,'@example.net',NULL); /* Groups usable in ACL */ CREATE TABLE policy_groups ( ID @SERIAL_TYPE@, Name VARCHAR(255) NOT NULL, Disabled SMALLINT NOT NULL DEFAULT '0', Comment VARCHAR(1024), UNIQUE (Name) ) @CREATE_TABLE_SUFFIX@; INSERT INTO policy_groups (Name) VALUES ('internal_ips'); INSERT INTO policy_groups (Name) VALUES ('internal_domains'); /* Group members */ CREATE TABLE policy_group_members ( ID @SERIAL_TYPE@, PolicyGroupID @SERIAL_REF_TYPE@, /* Format of member: a.b.c.d/e = ip, @domain = domain, %xyz = xyz group, abc@domain = abc user */ Member VARCHAR(255) NOT NULL, Disabled SMALLINT NOT NULL DEFAULT '0', Comment VARCHAR(1024), FOREIGN KEY (PolicyGroupID) REFERENCES policy_groups(ID) ) @CREATE_TABLE_SUFFIX@; INSERT INTO policy_group_members (PolicyGroupID,Member) VALUES (1,'10.0.0.0/8'); INSERT INTO policy_group_members (PolicyGroupID,Member) VALUES (2,'@example.org'); INSERT INTO policy_group_members (PolicyGroupID,Member) VALUES (2,'@example.com'); /* Message session tracking */ CREATE TABLE session_tracking ( Instance VARCHAR(255), QueueID VARCHAR(255), Timestamp BIGINT NOT NULL, ClientAddress VARCHAR(64), ClientName VARCHAR(255), ClientReverseName VARCHAR(255), Protocol VARCHAR(255), EncryptionProtocol VARCHAR(255), EncryptionCipher VARCHAR(255), EncryptionKeySize VARCHAR(255), SASLMethod VARCHAR(255), SASLSender VARCHAR(255), SASLUsername VARCHAR(255), Helo VARCHAR(255), Sender VARCHAR(255), Size @BIG_INTEGER@, RecipientData TEXT, /* Policy state information */ UNIQUE (Instance) ) @CREATE_TABLE_SUFFIX@; CREATE INDEX session_tracking_idx1 ON session_tracking (QueueID,ClientAddress,Sender); CREATE INDEX session_tracking_idx2 ON session_tracking (Timestamp); postfix-cluebringer-2.0.10/database/whitelists/0000755000175000017500000000000011312351140021355 5ustar nikolainikolaipostfix-cluebringer-2.0.10/database/whitelists/checkhelo-whitelistings.txt0000644000175000017500000000302711177770474026770 0ustar nikolainikolai# HELO Whitelists # Copyright (C) 2009, AllWorldIT # Copyright (C) 2008, LinuxRulz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 127.0.0.0/8 Local loopback address 192.168.0.0/16 Private range 10.0.0.0/8 Private range 172.16.0.0/12 Private range # Helo exceptions, mostly more than 1 server behind an IP 196.207.32.0/24 Vodacom South Africa mailservers behind single IP 24.71.223.10 SHAW.CA - Residential 1, behind single IP 64.59.128.220 SHAW.CA - Business 1, behind single IP 64.59.134.9 SHAW.CA - Residential 2, behind single IP 196.2.16.0/24 Mweb South Africa, behind single IP 196.211.173.234 Internet Solutions South Africa, mailserves behind single IP 196.25.30.66 saoutsourcing.com - Servers behind single IP 207.46.51.80 Bigfish.com - Servers behind single IP 216.32.180.0/22 Bigfish.com - Servers behind single IP 213.199.154.10 Bigfish.com - Servers behind single IP postfix-cluebringer-2.0.10/database/whitelists/parse-checkhelo-whitelist0000755000175000017500000000176611177770474026414 0ustar nikolainikolai#!/bin/bash # Script to convert help whitelist text file into SQL # Copyright (C) 2009, AllWorldIT # Copyright (C) 2008, LinuxRulz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ( grep -v '^\s*#' | \ sed -re "s/^(\S+)\s+(.+)/INSERT INTO checkhelo_whitelist (Source,Comment,Disabled) VALUES ('SenderIP:\1','\2',0);/" ) < checkhelo-whitelistings.txt postfix-cluebringer-2.0.10/database/whitelists/parse-greylisting-whitelist0000755000175000017500000000176511177770474027026 0ustar nikolainikolai#!/bin/bash # Script to convert greylisting whitelist text file into SQL # Copyright (C) 2009, AllWorldIT # Copyright (C) 2008, LinuxRulz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ( grep -v '^\s*#' | \ sed -re "s/^(\S+)\s+(.+)/INSERT INTO greylisting_whitelist (Source,Comment,Disabled) VALUES ('\1','\2',0);/" ) < greylist-whitelistings.txt postfix-cluebringer-2.0.10/database/whitelists/greylist-whitelistings.txt0000644000175000017500000000464711177770474026716 0ustar nikolainikolai# Greylisting Whitelists # Copyright (C) 2009, AllWorldIT # Copyright (C) 2008, LinuxRulz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. SenderIP:127.0.0.0/8 Local loopback address SenderIP:192.168.0.0/16 Private range SenderIP:10.0.0.0/8 Private range SenderIP:172.16.0.0/12 Private range # Servers that don't like greylisting SenderIP:12.5.136.141 Southwest Airlines (unique sender, no retry) SenderIP:12.5.136.142 Southwest Airlines (unique sender, no retry) SenderIP:12.5.136.143 Southwest Airlines (unique sender, no retry) SenderIP:12.5.136.144 Southwest Airlines (unique sender, no retry) SenderIP:63.169.44.143 Southwest Airlines (unique sender, no retry) SenderIP:63.169.44.144 Southwest Airlines (unique sender, no retry) SenderIP:12.107.209.244 kernel.org mailing lists (high traffic, unique sender per mail) SenderIP:64.124.204.39 moveon.org (unique sender per attempt) SenderIP:64.125.132.254 collab.net (unique sender per attempt) SenderIP:66.135.209.0/24 Ebay (for time critical alerts) SenderIP:66.218.66.0/24 Yahoo Groups servers (common pool, no retry) SenderIP:66.218.67.0/24 Yahoo Groups servers (common pool, no retry) SenderIP:66.218.69.0/24 Yahoo Groups servers (common pool, no retry) SenderIP:66.94.237.0/24 Yahoo Groups servers (common pool, no retry) SenderIP:204.107.120.10 Ameritrade (no retry) SenderIP:207.115.63.0/24 Prodigy (broken software that retries continually with no delay) SenderIP:205.206.231.0/24 SecurityFocus.com (unique sender per attempt) SenderIP:209.132.176.174 Sourceware.org mailing lists (high traffic, unique sender per mail) SenderIP:211.29.132.0/24 optusnet.com.au (wierd retry pattern and more than 48hrs) SenderIP:213.136.52.31 Mysql.com (unique sender) SenderIP:217.158.50.178 AXKit mailing list (unique sender per attempt) postfix-cluebringer-2.0.10/database/amavis.tsql0000644000175000017500000001003711177770474021374 0ustar nikolainikolai# Amavis module schema # Copyright (C) 2009, AllWorldIT # Copyright (C) 2008, LinuxRulz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. /* Amavisd-new integration for Policyd */ CREATE TABLE amavis_rules ( ID @SERIAL_TYPE@, PolicyID @SERIAL_REF_TYPE@, Name VARCHAR(255) NOT NULL, /* Mode of operation (the _m columns): This is done with the _m column names 0 - Inherit 1 - Merge (only valid for lists) 2 - Overwrite */ /* Bypass options */ bypass_virus_checks SMALLINT, bypass_virus_checks_m SMALLINT NOT NULL DEFAULT '0', bypass_banned_checks SMALLINT, bypass_banned_checks_m SMALLINT NOT NULL DEFAULT '0', bypass_spam_checks SMALLINT, bypass_spam_checks_m SMALLINT NOT NULL DEFAULT '0', bypass_header_checks SMALLINT, bypass_header_checks_m SMALLINT NOT NULL DEFAULT '0', /* Anti-spam options: NULL = inherit */ spam_tag_level FLOAT, spam_tag_level_m SMALLINT NOT NULL DEFAULT '0', spam_tag2_level FLOAT, spam_tag2_level_m SMALLINT NOT NULL DEFAULT '0', spam_tag3_level FLOAT, spam_tag3_level_m SMALLINT NOT NULL DEFAULT '0', spam_kill_level FLOAT, spam_kill_level_m SMALLINT NOT NULL DEFAULT '0', spam_dsn_cutoff_level FLOAT, spam_dsn_cutoff_level_m SMALLINT NOT NULL DEFAULT '0', spam_quarantine_cutoff_level FLOAT, spam_quarantine_cutoff_level_m SMALLINT NOT NULL DEFAULT '0', spam_modifies_subject SMALLINT, spam_modifies_subject_m SMALLINT NOT NULL DEFAULT '0', spam_tag_subject VARCHAR(255), /* _SCORE_ is the score, _REQD_ is the required score */ spam_tag_subject_m SMALLINT NOT NULL DEFAULT '0', spam_tag2_subject VARCHAR(255), spam_tag2_subject_m SMALLINT NOT NULL DEFAULT '0', spam_tag3_subject VARCHAR(255), spam_tag3_subject_m SMALLINT NOT NULL DEFAULT '0', /* General checks: NULL = inherit */ max_message_size BIGINT, /* in Kbyte */ max_message_size_m SMALLINT NOT NULL DEFAULT '0', banned_files TEXT, banned_files_m SMALLINT NOT NULL DEFAULT '0', /* Whitelist & blacklist */ sender_whitelist TEXT, sender_whitelist_m SMALLINT NOT NULL DEFAULT '0', sender_blacklist TEXT, sender_blacklist_m SMALLINT NOT NULL DEFAULT '0', /* Admin notifications */ notify_admin_newvirus VARCHAR(255), notify_admin_newvirus_m SMALLINT NOT NULL DEFAULT '0', notify_admin_virus VARCHAR(255), notify_admin_virus_m SMALLINT NOT NULL DEFAULT '0', notify_admin_spam VARCHAR(255), notify_admin_spam_m SMALLINT NOT NULL DEFAULT '0', notify_admin_banned_file VARCHAR(255), notify_admin_banned_file_m SMALLINT NOT NULL DEFAULT '0', notify_admin_bad_header VARCHAR(255), notify_admin_bad_header_m SMALLINT NOT NULL DEFAULT '0', /* Quarantine options */ quarantine_virus VARCHAR(255), quarantine_virus_m SMALLINT NOT NULL DEFAULT '0', quarantine_banned_file VARCHAR(255), quarantine_banned_file_m SMALLINT NOT NULL DEFAULT '0', quarantine_bad_header VARCHAR(255), quarantine_bad_header_m SMALLINT NOT NULL DEFAULT '0', quarantine_spam VARCHAR(255), quarantine_spam_m SMALLINT NOT NULL DEFAULT '0', /* Interception options */ bcc_to VARCHAR(255), bcc_to_m SMALLINT NOT NULL DEFAULT '0', Comment VARCHAR(1024), Disabled SMALLINT NOT NULL DEFAULT '0', FOREIGN KEY (PolicyID) REFERENCES policies(ID) ) @CREATE_TABLE_SUFFIX@; INSERT INTO amavis_rules ( PolicyID, Name, max_message_size,max_message_size_m, bypass_banned_checks, bypass_banned_checks_m ) VALUES ( 1, 'Default system amavis policy', 100000,2, 1,2 ); postfix-cluebringer-2.0.10/database/checkspf.tsql0000644000175000017500000000237211177770474021705 0ustar nikolainikolai# CheckSPF module schema # Copyright (C) 2009, AllWorldIT # Copyright (C) 2008, LinuxRulz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. /* SPF checking */ /* NULL means to inherit */ CREATE TABLE checkspf ( ID @SERIAL_TYPE@, PolicyID @SERIAL_REF_TYPE@, Name VARCHAR(255) NOT NULL, /* Do we want to use SPF? 1 or 0 */ UseSPF SMALLINT, /* Reject when SPF fails */ RejectFailedSPF SMALLINT, /* Add SPF header */ AddSPFHeader SMALLINT, Comment VARCHAR(1024), Disabled SMALLINT NOT NULL DEFAULT '0', FOREIGN KEY (PolicyID) REFERENCES policies(ID) ) @CREATE_TABLE_SUFFIX@; postfix-cluebringer-2.0.10/database/checkhelo.tsql0000644000175000017500000000603211177770474022041 0ustar nikolainikolai# CheckHelo module schema # Copyright (C) 2009, AllWorldIT # Copyright (C) 2008, LinuxRulz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. /* Helo checking */ /* NULL means to inherit */ CREATE TABLE checkhelo ( ID @SERIAL_TYPE@, PolicyID @SERIAL_REF_TYPE@, Name VARCHAR(255) NOT NULL, /* Blacklisting, we want to reject people impersonating us */ UseBlacklist SMALLINT, /* Checks blacklist table */ BlacklistPeriod @BIG_INTEGER@, /* Period to keep the host blacklisted for, if not set or 0 the check will be live */ /* Random helo prevention */ UseHRP SMALLINT, /* Use helo randomization prevention */ HRPPeriod @BIG_INTEGER@, /* Period/window we check for random helo's */ HRPLimit @BIG_INTEGER@, /* Our limit for the number of helo's is this */ /* RFC compliance options */ RejectInvalid SMALLINT, /* Reject invalid HELO */ RejectIP SMALLINT, /* Reject if HELO is an IP */ RejectUnresolvable SMALLINT, /* Reject unresolvable HELO */ Comment VARCHAR(1024), Disabled SMALLINT NOT NULL DEFAULT '0', FOREIGN KEY (PolicyID) REFERENCES policies(ID) ) @CREATE_TABLE_SUFFIX@; /* Blacklisted HELO's */ CREATE TABLE checkhelo_blacklist ( ID @SERIAL_TYPE@, Helo VARCHAR(255) NOT NULL, Comment VARCHAR(1024), Disabled SMALLINT NOT NULL DEFAULT '0', UNIQUE (Helo) ) @CREATE_TABLE_SUFFIX@; INSERT INTO checkhelo_blacklist (Helo,Comment) VALUES ('127.0.0.1','Blacklist hosts claiming to be 127.0.0.1'); INSERT INTO checkhelo_blacklist (Helo,Comment) VALUES ('[127.0.0.1]','Blacklist hosts claiming to be [127.0.0.1]'); INSERT INTO checkhelo_blacklist (Helo,Comment) VALUES ('localhost','Blacklist hosts claiming to be localhost'); INSERT INTO checkhelo_blacklist (Helo,Comment) VALUES ('localhost.localdomain','Blacklist hosts claiming to be localhost.localdomain'); /* Whitelisted CIDR's */ CREATE TABLE checkhelo_whitelist ( ID @SERIAL_TYPE@, Source VARCHAR(@TRACK_KEY_LEN@) NOT NULL, /* Valid format is: SenderIP:a.b.c.d[/e] */ Comment VARCHAR(1024), Disabled SMALLINT NOT NULL DEFAULT '0', UNIQUE (Source) ) @CREATE_TABLE_SUFFIX@; /* Helo tracking table */ CREATE TABLE checkhelo_tracking ( Address VARCHAR(64) NOT NULL, Helo VARCHAR(255) NOT NULL, LastUpdate @BIG_INTEGER@ NOT NULL, UNIQUE (Address,Helo) ) @CREATE_TABLE_SUFFIX@; CREATE INDEX checkhelo_tracking_idx1 ON checkhelo_tracking (LastUpdate); postfix-cluebringer-2.0.10/LICENSE0000644000175000017500000004310310632321535016431 0ustar nikolainikolai GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. postfix-cluebringer-2.0.10/cbp/0000755000175000017500000000000011312351137016164 5ustar nikolainikolaipostfix-cluebringer-2.0.10/cbp/dbilayer.pm0000644000175000017500000001223211177770474020337 0ustar nikolainikolai# Database independent layer module # Copyright (C) 2009, AllWorldIT # Copyright (C) 2008, LinuxRulz # Copyright (C) 2005-2007 Nigel Kukard # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. package cbp::dbilayer; use strict; use warnings; use cbp::config; use DBI; my $internalError = ""; sub internalErr { my $error = $internalError; $internalError = ""; return $error; } # Initialize class and return a fully connected object sub Init { my $server = shift; my $dbconfig = $server->{'cbp'}->{'database'}; # Check if we created my $dbh = cbp::dbilayer->new($dbconfig->{'DSN'},$dbconfig->{'Username'},$dbconfig->{'Password'}); return undef if (!defined($dbh)); return $dbh; } # Constructor sub new { my ($class,$dsn,$username,$password) = @_; # Iternals my $self = { _dbh => undef, _error => undef, _dsn => undef, _username => undef, _password => undef, _in_transaction => undef, }; # Set database parameters if (defined($dsn)) { $self->{_dsn} = $dsn; $self->{_username} = $username; $self->{_password} = $password; } else { $internalError = "Invalid DSN given"; return undef; } # Create... bless $self, $class; return $self; } # Return current error message # Args: none sub Error { my ($self) = @_; my $err = $self->{_error}; # Reset error $self->{_error} = ""; # Return error return $err; } # Return connection to database # Args: none sub connect { my ($self) = @_; $self->{_dbh} = DBI->connect($self->{_dsn}, $self->{_username}, $self->{_password}, { 'AutoCommit' => 1, 'PrintError' => 0, 'FetchHashKeyName' => 'NAME_lc' }); # Connect to database if we have to, check if we ok if (!$self->{_dbh}) { $self->{_error} = "Error connecting to database: $DBI::errstr"; return -1; } # Apon connect we are not in a transaction $self->{_in_transaction} = 0; return 0; } # Check database connection # Args: none sub _check { my $self = shift; # If we not in a transaction try connect if ($self->{_in_transaction} == 0) { # Try ping if (!$self->{_dbh}->ping()) { # Disconnect & reconnect $self->{_dbh}->disconnect(); $self->connect(); } } } # Return database selection results... # Args: sub DBSelect { my $query = shift; # Prepare query my $sth; if (!($sth = $dbh->select($query))) { setError("Error executing select: ".$dbh->Error()); return undef; } return $sth; } # Perform a command # Args: sub DBDo { my ($command,@params) = @_; # Prepare query my $sth; if (!($sth = $dbh->do($command,@params))) { setError("Error executing command '$command': ".$dbh->Error()); return undef; } return $sth; } # Function to get last insert id # Args: sub DBLastInsertID { my ($table,$column) = @_; my $res; if (!($res = $dbh->lastInsertID(undef,undef,$table,$column))) { setError("Error getting last inserted id: ".$dbh->Error()); return undef; } return $res; } # Function to begin a transaction # Args: none sub DBBegin { my $res; if (!($res = $dbh->begin())) { setError("Error beginning transaction: ".$dbh->Error()); return undef; } return $res; } # Function to commit a transaction # Args: none sub DBCommit { my $res; if (!($res = $dbh->commit())) { setError("Error committing transaction: ".$dbh->Error()); return undef; } return $res; } # Function to rollback a transaction # Args: none sub DBRollback { my $res; if (!($res = $dbh->rollback())) { setError("Error rolling back transaction: ".$dbh->Error()); return undef; } return $res; } # Function to quote a database variable # Args: sub DBQuote { my $stuff = shift; return $dbh->quote($stuff); } # Function to cleanup DB query # Args: sub DBFreeRes { my $sth = shift; if ($sth) { $sth->finish(); } } # # Value Added Functions # # Return how many results came up from the specific SELECT query # Args:
Are you very sure?
No HELO/EHLO check selected
exec("DELETE FROM checkhelo WHERE ID = ".$db->quote($_POST['checkhelo_id'])); if ($res) { ?>
HELO/EHLO check deleted
Error deleting HELO/EHLO check!
errorInfo()) ?>
HELO/EHLO check not deleted, aborted by user
Invocation error, no HELO/EHLO ID
Invalid invocation
postfix-cluebringer-2.0.10/webui/postfix-transports-change.php0000644000175000017500000001077111177770474024430 0ustar nikolainikolai array( "Back to Transports" => "postfix-transports-main.php" ), )); # Display change screen if ($_POST['frmaction'] == "change") { # Check a transport was selected if (isset($_POST['postfix_transport_id'])) { # Prepare statement $stmt = $db->prepare('SELECT ID, DomainName, Type, Transport, Disabled FROM transports WHERE ID = ?'); ?>
execute(array($_POST['postfix_transport_id'])); $row = $stmt->fetchObject(); ?>
type == "1") { ?>
Old Value New Value
Domain Name domainname ?>
Type type == "0") { echo "Virtual"; } elseif ($row->type == "1") { echo "SMTP"; } ?>
Data transport ?>
Disabled disabled ? 'yes' : 'no' ?>

No policy selected
quote($_POST['postfix_transport_type'])); } if (!empty($_POST['postfix_transport_data'])) { # smtp $transport = $_POST['postfix_transport_data']; $ptransport = "smtp:$transport"; array_push($updates ,"Transport = ".$db->quote($transport)); array_push($updates ,"PTransport = ".$db->quote($ptransport)); } if (isset($_POST['postfix_transport_disabled']) && $_POST['postfix_transport_disabled'] != "") { array_push($updates ,"Disabled = ".$db->quote($_POST['postfix_transport_disabled'])); } # Check if we have updates if (sizeof($updates) > 0) { $updateStr = implode(', ',$updates); $res = $db->exec("UPDATE transports SET $updateStr WHERE ID = ".$db->quote($_POST['postfix_transport_id'])); if ($res) { ?>
Postfix transport updated
Error updating Postfix transport!
errorInfo()) ?>
No changes made to Postfix transport
Invalid invocation
postfix-cluebringer-2.0.10/webui/policy-group-member-add.php0000644000175000017500000000525211177770474023716 0ustar nikolainikolai array( "Back to groups" => "policy-group-main.php", "Back to members" => "policy-group-member-main.php?policy_group_id=".$_POST['policy_group_id'], ), )); if ($_POST['frmaction'] == "add") { ?>
Member
Comment
prepare("INSERT INTO policy_group_members (PolicyGroupID,Member,Comment,Disabled) VALUES (?,?,?,1)"); $res = $stmt->execute(array( $_POST['policy_group_id'], $_POST['policy_group_member_member'], $_POST['policy_group_member_comment'] )); if ($res) { ?>
Policy group member created
Failed to create policy group member
errorInfo()) ?>
Invalid invocation
postfix-cluebringer-2.0.10/webui/policy-member-main.php0000644000175000017500000000676711177770474022774 0ustar nikolainikolai array( "Back to policies" => "policy-main.php" ), )); # Check a policy was selected if (isset($_REQUEST['policy_id'])) { ?> prepare('SELECT Name FROM policies WHERE ID = ?'); $policy_stmt->execute(array($_REQUEST['policy_id'])); $row = $policy_stmt->fetchObject(); $policy_stmt->closeCursor(); ?>
Policy: name ?>
Action

prepare('SELECT ID, Source, Destination, Disabled FROM policy_members WHERE PolicyID = ?'); $res = $stmt->execute(array($_REQUEST['policy_id'])); $i = 0; # Loop with rows while ($row = $stmt->fetchObject()) { ?> closeCursor(); ?>
Source Destination Disabled
source) ? 'any' : $row->source ?> destination) ? 'any' : $row->destination ?> disabled ? 'yes' : 'no' ?>

Invalid invocation
postfix-cluebringer-2.0.10/webui/includes/0000755000175000017500000000000011312351140020333 5ustar nikolainikolaipostfix-cluebringer-2.0.10/webui/includes/header.php0000644000175000017500000001026511177770474022330 0ustar nikolainikolai Policyd Web Administration >
    $value) { ?>
postfix-cluebringer-2.0.10/webui/includes/db.php0000644000175000017500000000315711177770474021467 0ustar nikolainikolai false )); $dbh->setAttribute(PDO::ATTR_CASE,PDO::CASE_LOWER); } catch (PDOException $e) { die("Error connecting to Policyd v2 DB: " . $e->getMessage()); } return $dbh; } # Connect to postfix DB function connect_postfix_db() { global $DB_POSTFIX_DSN; global $DB_POSTFIX_USER; global $DB_POSTFIX_PASS; try { $dbh = new PDO($DB_POSTFIX_DSN, $DB_POSTFIX_USER, $DB_POSTFIX_PASS, array( PDO::ATTR_PERSISTENT => false )); $dbh->setAttribute(PDO::ATTR_CASE,PDO::CASE_LOWER); } catch (PDOException $e) { die("Error connecting to Postfix DB: " . $e->getMessage()); } return $dbh; } # vim: ts=4 ?> postfix-cluebringer-2.0.10/webui/includes/config.php0000644000175000017500000000066311131154416022324 0ustar nikolainikolai postfix-cluebringer-2.0.10/webui/includes/tooltipdata.php0000644000175000017500000002205211177770474023421 0ustar nikolainikolai postfix-cluebringer-2.0.10/webui/includes/footer.php0000644000175000017500000000260711177770474022377 0ustar nikolainikolai
XHTML 1.0 Valid Logo CSS 2.0 Valid Logo Level Tripple-A Conformance
postfix-cluebringer-2.0.10/webui/includes/tooltips.php0000644000175000017500000000203111177770474022745 0ustar nikolainikolai Tooltip postfix-cluebringer-2.0.10/webui/amavis-delete.php0000644000175000017500000000474311177770474022016 0ustar nikolainikolai array( "Back to Amavis" => "amavis-main.php", ), )); # Display delete confirm screen if ($_POST['frmaction'] == "delete") { # Check a amavis rule was selected if (isset($_POST['amavis_id'])) { ?>
Are you very sure?
No Amavis rule selected
exec("DELETE FROM amavis_rules WHERE ID = ".$db->quote($_POST['amavis_id'])); if ($res) { ?>
Amavis rule deleted
Error deleting Amavis rule!
errorInfo()) ?>
Amavis rule not deleted, aborted by user
Invocation error, no Amavis rule ID
Invalid invocation
postfix-cluebringer-2.0.10/webui/checkhelo-whitelist-add.php0000644000175000017500000000527411177770474023763 0ustar nikolainikolai array( "Back to whitelist" => "checkhelo-whitelist-main.php" ), )); if ($_POST['frmaction'] == "add") { ?>
Source
Comment
Source cannot be empty
prepare("INSERT INTO checkhelo_whitelist (Source,Comment,Disabled) VALUES (?,?,1)"); $res = $stmt->execute(array( $_POST['whitelist_type'] . ":" . $_POST['whitelist_source'], $_POST['whitelist_comment'] )); if ($res) { ?>
HELO/EHLO whitelist created
Failed to create HELO/EHLO whitelisting
errorInfo()) ?>
Invalid invocation
postfix-cluebringer-2.0.10/webui/checkhelo-blacklist-main.php0000644000175000017500000000551511177770474024111 0ustar nikolainikolai
Action

query($sql); while ($row = $res->fetchObject()) { ?> closeCursor(); ?>
HELO/EHLO Disabled
helo ?> disabled ? 'yes' : 'no' ?>

postfix-cluebringer-2.0.10/webui/postfix-mailboxes-change.php0000644000175000017500000001260711177770474024174 0ustar nikolainikolai array( "Back to Mailboxes" => "postfix-mailboxes-main.php" ), )); # Display change screen if ($_POST['frmaction'] == "change") { # Check a mailbox was selected if (isset($_POST['postfix_mailbox_id'])) { # Prepare statement $stmt = $db->prepare(' SELECT ID, Mailbox, Quota, Name, BCC, Comment, Disabled FROM mailboxes WHERE ID = ? '); ?>
execute(array($_POST['postfix_mailbox_id'])); $row = $stmt->fetchObject(); $stmt->closeCursor(); ?>
Old Value New Value
Mailbox mailbox ?>
Name name ?>
Password *encrypted*
Quota (in Mbyte) quota ?> (0 = unlimited)
BCC bcc ?>
Comment comment ?>
Disabled disabled ? 'yes' : 'no' ?>

No mailbox selected
quote($_POST['postfix_mailbox_name'])); } if (!empty($_POST['postfix_mailbox_password'])) { # Encrypt password $password = "{MD5}".base64_encode(pack("H*", md5($_POST['postfix_mailbox_password']))); array_push($updates,"Password = ".$db->quote($password)); } if (isset($_POST['postfix_mailbox_quota'])) { if (!empty($_POST['postfix_mailbox_quota'])) { $quota = $db->quote($_POST['postfix_mailbox_quota']); array_push($updates,"Quota = ".$quota); } } if (!empty($_POST['postfix_mailbox_bcc'])) { array_push($updates,"BCC = ".$db->quote($_POST['postfix_mailbox_bcc'])); } if (!empty($_POST['postfix_mailbox_comment'])) { array_push($updates,"Comment = ".$db->quote($_POST['postfix_mailbox_comment'])); } if (isset($_POST['postfix_mailbox_disabled']) && $_POST['postfix_mailbox_disabled'] != "") { array_push($updates,"Disabled = ".$db->quote($_POST['postfix_mailbox_disabled'])); } # Check if we have updates if (sizeof($updates) > 0) { $updateStr = implode(', ',$updates); $res = $db->exec("UPDATE mailboxes SET $updateStr WHERE ID = ".$db->quote($_POST['postfix_mailbox_id'])); if ($res) { ?>
Mailbox updated
Error updating mailbox!
errorInfo()) ?>
No changes made to Postfix mailbox
Invalid invocation
postfix-cluebringer-2.0.10/webui/postfix-mailboxes-add.php0000644000175000017500000001010511177770474023466 0ustar nikolainikolai array( "Back to Mailboxes" => "postfix-mailboxes-main.php", ), )); if ($_POST['frmaction'] == "add") { ?>
Email Address @
Name
Password
Quota (in Mbyte) (0 = unlimited)
BCC
Comment
prepare('SELECT ID, DomainName, Type, Transport, Disabled FROM transports WHERE ID = ?'); $res = $stmt->execute(array($_POST['postfix_transport_id'])); $row = $stmt->fetchObject(); $mailbox = $_POST['postfix_mailbox_address'] . '@' . $row->domainname; $stmt = $db->prepare("INSERT INTO mailboxes (TransportID,Address,Mailbox,Password,Quota,Name,BCC,Comment,Disabled) VALUES (?,?,?,?,?,?,?,?,0)"); # Encrypt password $password = "{MD5}".base64_encode(pack("H*", md5($_POST['postfix_mailbox_password']))); $res = $stmt->execute(array( $_POST['postfix_transport_id'], $_POST['postfix_mailbox_address'], $mailbox, $password, $_POST['postfix_mailbox_quota'], $_POST['postfix_mailbox_name'], $_POST['postfix_mailbox_bcc'], $_POST['postfix_mailbox_comment'], )); if ($res) { ?>
Mailbox created
Failed to create mailbox
errorInfo()) ?>
Invalid invocation
postfix-cluebringer-2.0.10/webui/quotas-limits-delete.php0000644000175000017500000000525711177770474023352 0ustar nikolainikolai array( "Back to quotas" => "quotas-main.php", "Back to limits" => "quotas-limits-main.php?quota_id=".$_REQUEST['quota_id'], ), )); # Display delete confirm screen if ($_POST['frmaction'] == "delete") { # Check a quota limit was selected if (isset($_POST['quota_limit_id'])) { ?>
Are you very sure?
No quota limit selected
exec("DELETE FROM quotas_limits WHERE ID = ".$db->quote($_POST['quota_limit_id'])); if ($res) { ?>
Quota limit deleted
Error deleting quota limit!
errorInfo()) ?>
Quota limit not deleted, aborted by user
Invocation error, no quota limit ID
Invalid invocation
postfix-cluebringer-2.0.10/webui/amavis-main.php0000644000175000017500000000563111177770474021475 0ustar nikolainikolai
Action

query($sql); while ($row = $res->fetchObject()) { ?> closeCursor(); ?>
Policy Name Disabled
policyname ?> name ?> disabled ? 'yes' : 'no' ?>

postfix-cluebringer-2.0.10/webui/policy-group-member-delete.php0000644000175000017500000000550711177770474024433 0ustar nikolainikolai array( "Back to groups" => "policy-group-main.php", "Back to members" => "policy-group-member-main.php?policy_group_id=".$_POST['policy_group_id'], ), )); # Display delete confirm screen if ($_POST['frmaction'] == "delete") { # Check a policy group member was selected if (isset($_POST['policy_group_member_id'])) { ?>
Are you very sure?
No policy group member selected
exec("DELETE FROM policy_group_members WHERE ID = ".$db->quote($_POST['policy_group_member_id'])); if ($res) { ?>
Policy group member deleted
Error deleting policy group member!
errorInfo()) ?>
Policy group member not deleted, aborted by user
Invocation error, no policy group member ID
Invalid invocation
postfix-cluebringer-2.0.10/webui/checkhelo-whitelist-main.php0000644000175000017500000000552011177770474024151 0ustar nikolainikolai
Action

query($sql); while ($row = $res->fetchObject()) { ?> closeCursor(); ?>
Source Disabled
source ?> disabled ? 'yes' : 'no' ?>

postfix-cluebringer-2.0.10/webui/postfix-mailboxes-main.php0000644000175000017500000000540611177770474023672 0ustar nikolainikolai
Action

query($sql); while ($row = $res->fetchObject()) { ?>
Mailbox Quota Name Disabled
mailbox ?> quota ?> name ?> disabled ? 'yes' : 'no' ?>

postfix-cluebringer-2.0.10/webui/quotas-add.php0000644000175000017500000001207411177770474021334 0ustar nikolainikolai array( "Back to quotas" => "quotas-main.php" ), )); if ($_POST['frmaction'] == "add") { ?>
Name
Track
Period
Link to policy
Verdict
Data
Comment
Policy ID cannot be empty
Name cannot be empty
Verdict cannot be empty
prepare("INSERT INTO quotas (PolicyID,Name,Track,Period,Verdict,Data,Comment,Disabled) VALUES (?,?,?,?,?,?,?,1)"); $res = $stmt->execute(array( $_POST['quota_policyid'], $_POST['quota_name'], $quotaTrack, $_POST['quota_period'], $_POST['quota_verdict'], $_POST['quota_data'], $_POST['quota_comment'] )); if ($res) { ?>
Quota created
Failed to create quota
errorInfo()) ?>
Invalid invocation
postfix-cluebringer-2.0.10/webui/postfix-distgroups-member-delete.php0000644000175000017500000000565011177770474025676 0ustar nikolainikolai array( "Back to groups" => "postfix-group-main.php", "Back to members" => "postfix-distgroups-member-main.php?postfix_group_id=".$_POST['postfix_group_id'], ), )); # Display delete confirm screen if ($_POST['frmaction'] == "delete") { # Check a postfix group member was selected if (isset($_POST['postfix_group_member_id'])) { ?>
Are you very sure?
No distribution group member selected
exec("DELETE FROM distribution_group_members WHERE ID = ".$db->quote($_POST['postfix_group_member_id'])); if ($res) { ?>
Distribution group member deleted
Error deleting distribution group member!
errorInfo()) ?>
Distribution group member not deleted, aborted by user
Invocation error, no distribution group member ID
Invalid invocation
postfix-cluebringer-2.0.10/webui/policy-member-change.php0000644000175000017500000001160611177770474023261 0ustar nikolainikolai array( "Back to policies" => "policy-main.php", "Back to members" => "policy-member-main.php?policy_id=".$_REQUEST['policy_id'], ), )); # Display change screen if ($_POST['frmaction'] == "change") { # Check a policy member was selected if (isset($_POST['policy_member_id'])) { # Prepare statement $stmt = $db->prepare('SELECT ID, Source, Destination, Comment, Disabled FROM policy_members WHERE ID = ?'); $res = $stmt->execute(array($_POST['policy_member_id'])); $row = $stmt->fetchObject(); $stmt->closeCursor(); ?>
Old Value New Value
Source source ?>
Destination destination ?>
Comment comment ?>
Disabled disabled ? 'yes' : 'no' ?>

No policy selected
quote($_POST['policy_member_source'])); } if (isset($_POST['policy_member_destination']) && $_POST['policy_member_destination'] != "") { array_push($updates,"Destination = ".$db->quote($_POST['policy_member_destination'])); } if (!empty($_POST['policy_member_comment'])) { array_push($updates,"Comment = ".$db->quote($_POST['policy_member_comment'])); } if (isset($_POST['policy_member_disabled']) && $_POST['policy_member_disabled'] != "") { array_push($updates ,"Disabled = ".$db->quote($_POST['policy_member_disabled'])); } # Check if we have updates if (sizeof($updates) > 0) { $updateStr = implode(', ',$updates); $res = $db->exec("UPDATE policy_members SET $updateStr WHERE ID = ".$db->quote($_POST['policy_member_id'])); if ($res) { ?>
Policy member updated
Error updating policy member!
errorInfo()) ?>
No policy member updates
No policy member data available
Invalid invocation
postfix-cluebringer-2.0.10/webui/policy-delete.php0000644000175000017500000000563611177770474022037 0ustar nikolainikolai array( "Back to policies" => "policy-main.php", ), )); # Display delete confirm screen if ($_POST['frmaction'] == "delete") { # Check a policy was selected if (isset($_POST['policy_id'])) { ?>
Are you very sure?
No policy selected
beginTransaction(); $res = $db->exec("DELETE FROM policy_members WHERE PolicyID = ".$db->quote($_POST['policy_id'])); if ($res !== FALSE) { ?>
Policy members deleted
Error deleting policy members!
errorInfo()) ?>
rollback(); } if ($res) { $res = $db->exec("DELETE FROM policies WHERE ID = ".$db->quote($_POST['policy_id'])); if ($res) { ?>
Policy deleted
Error deleting policy!
errorInfo()) ?>
rollback(); } } if ($res) { $db->commit(); } } else { ?>
Policy not deleted, aborted by user
Invocation error, no policy ID
Invalid invocation
postfix-cluebringer-2.0.10/webui/policy-group-member-change.php0000644000175000017500000001054511177770474024414 0ustar nikolainikolai array( "Back to groups" => "policy-group-main.php", "Back to members" => "policy-group-member-main.php?policy_group_id=".$_POST['policy_group_id'], ), )); # Display change screen if ($_POST['frmaction'] == "change") { # Check a policy was selected if (isset($_POST['policy_group_member_id'])) { # Prepare statement $stmt = $db->prepare('SELECT ID, Member, Comment, Disabled FROM policy_group_members WHERE ID = ?'); ?>
execute(array($_POST['policy_group_member_id'])); $row = $stmt->fetchObject(); $stmt->closeCursor(); ?>
Old Value New Value
Member member ?>
Comment comment ?>
Disabled disabled ? 'yes' : 'no' ?>

No policy selected
quote($_POST['policy_group_member_member'])); } if (!empty($_POST['policy_group_member_comment'])) { array_push($updates,"Comment = ".$db->quote($_POST['policy_group_member_comment'])); } if (isset($_POST['policy_group_member_disabled']) && $_POST['policy_group_member_disabled'] != "") { array_push($updates ,"Disabled = ".$db->quote($_POST['policy_group_member_disabled'])); } # Check if we have updates if (sizeof($updates) > 0) { $updateStr = implode(', ',$updates); $res = $db->exec("UPDATE policy_group_members SET $updateStr WHERE ID = ".$db->quote($_POST['policy_group_member_id'])); if ($res) { ?>
Policy group member updated
Error updating policy group member!
errorInfo()) ?>
No changes made to policy group member
Invalid invocation
postfix-cluebringer-2.0.10/webui/postfix-distgroups-change.php0000644000175000017500000000752711177770474024421 0ustar nikolainikolai array( "Back to groups" => "postfix-distgroups-main.php" ), )); # Display change screen if ($_POST['frmaction'] == "change") { # Check a group was selected if (isset($_POST['postfix_group_id'])) { # Prepare statement $stmt = $db->prepare('SELECT ID, MailAddress, Comment, Disabled FROM distribution_groups WHERE ID = ?'); ?>
execute(array($_POST['postfix_group_id'])); $row = $stmt->fetchObject(); $stmt->closeCursor(); ?>
Old Value New Value
Mail Address mailaddress ?>
Comment comment ?>
Disabled disabled ? 'yes' : 'no' ?>

No distribution group selected
quote($_POST['postfix_group_comment'])); } if (isset($_POST['postfix_group_disabled']) && $_POST['postfix_group_disabled'] != "") { array_push($updates ,"Disabled = ".$db->quote($_POST['postfix_group_disabled'])); } # Check if we have updates if (sizeof($updates) > 0) { $updateStr = implode(', ',$updates); $res = $db->exec("UPDATE distribution_groups SET $updateStr WHERE ID = ".$db->quote($_POST['postfix_group_id'])); if ($res) { ?>
Distribution group updated
Error updating distribution group!
errorInfo()) ?>
No changes made to distribution group
Invalid invocation
postfix-cluebringer-2.0.10/webui/quotas-delete.php0000644000175000017500000001037711177770474022052 0ustar nikolainikolai array( "Back to quotas" => "quotas-main.php", ), )); # Display delete confirm screen if ($_POST['frmaction'] == "delete") { # Check a quota was selected if (isset($_POST['quota_id'])) { ?>
Are you very sure?
No quota selected
query(" SELECT ID FROM quotas_limits WHERE QuotasID = ".$db->quote($_POST['quota_id'])." "); $limitIDs = array(); if ($res !== FALSE) { # Pull in limit ID's while ($row = $res->fetchObject()) { array_push($limitIDs,$row->id); } $res->closeCursor(); } else { ?>
Error selecting quota limit IDs!
errorInfo()) ?>
beginTransaction(); $stmt = $db->prepare(" DELETE FROM quotas_tracking WHERE QuotasLimitsID = ? "); # Loop with limit ID's, start off true $res = true; foreach ($limitIDs as $id) { $res = $stmt->execute(array($id)); } if ($res !== FALSE) { ?>
Quota tracking info deleted
Error deleting quota tracking info!
errorInfo()) ?>
rollBack(); } } # Check last query succeeded, if so continue if ($res !== FALSE) { $stmt = $db->prepare(" DELETE FROM quotas_limits WHERE QuotasID = ?" ); $res = $stmt->execute(array($_POST['quota_id'])); if ($res !== FALSE) { ?>
Quota limits deleted
Error deleting quota limits!
errorInfo()) ?>
rollBack(); } } # Check last query succeeded, if so continue if ($res !== FALSE) { $res = $db->exec("DELETE FROM quotas WHERE ID = ".$db->quote($_POST['quota_id'])); if ($res) { ?>
Quota deleted
Error deleting quota!
errorInfo()) ?>
rollBack(); } } # Commit if last transaction succeeded if ($res) { $db->commit(); } } else { ?>
Quota not deleted, aborted by user
Invocation error, no quota ID
Invalid invocation
postfix-cluebringer-2.0.10/webui/checkhelo-add.php0000644000175000017500000001662311177770474021751 0ustar nikolainikolai array( "Back to HELO checks" => "checkhelo-main.php" ), )); if ($_POST['frmaction'] == "add") { ?>
Name
Link to policy
Blacklisting
Use Blacklist
Blacklist Period
Randomization Prevention
Use HRP
HRP Period
HRP Limit
Reject (RFC non-compliance)
Reject Invalid
Reject non-literal IP
Reject Unresolvable
 
Comment
Policy ID cannot be empty
Name cannot be empty
prepare(" INSERT INTO checkhelo ( PolicyID,Name, UseBlacklist,BlacklistPeriod, UseHRP,HRPPeriod,HRPLimit, RejectInvalid,RejectIP,RejectUnresolvable, Comment,Disabled ) VALUES ( ?,?, ?,?, ?,?,?, ?,?,?, ?,1 ) "); $res = $stmt->execute(array( $_POST['checkhelo_policyid'], $_POST['checkhelo_name'], $useBlacklist,$blacklistPeriod, $useHRP,$HRPPeriod,$HRPLimit, $rejectInvalid,$rejectIP,$rejectUnresolvable, $_POST['checkhelo_comment'] )); if ($res) { ?>
HELO/EHLO check created
Failed to create HELO/EHLO check
errorInfo()) ?>
Invalid invocation
postfix-cluebringer-2.0.10/webui/greylisting-delete.php0000644000175000017500000000502111177770474023064 0ustar nikolainikolai array( "Back to greylisting" => "greylisting-main.php", ), )); # Display delete confirm screen if ($_POST['frmaction'] == "delete") { # Check a greylisting was selected if (isset($_POST['greylisting_id'])) { ?>
Are you very sure?
No Greylisting selected
exec("DELETE FROM greylisting WHERE ID = ".$db->quote($_POST['greylisting_id'])); if ($res) { ?>
Greylisting deleted
Error deleting Greylisting!
errorInfo()) ?>
Greylisting not deleted, aborted by user
Invocation error, no Greylisting ID
Invalid invocation
postfix-cluebringer-2.0.10/webui/postfix-distgroups-member-change.php0000644000175000017500000000766311177770474025667 0ustar nikolainikolai array( "Back to groups" => "postfix-distgroups-main.php", "Back to members" => "postfix-distgroups-member-main.php?postfix_group_id=".$_POST['postfix_group_id'], ), )); # Display change screen if ($_POST['frmaction'] == "change") { # Check a postfix was selected if (isset($_POST['postfix_group_member_id'])) { # Prepare statement $stmt = $db->prepare('SELECT ID, Goto, Disabled FROM distribution_group_members WHERE ID = ?'); ?>
execute(array($_POST['postfix_group_member_id'])); $row = $stmt->fetchObject(); $stmt->closeCursor(); ?>
Old Value New Value
Email Address goto ?>
Disabled disabled ? 'yes' : 'no' ?>

No distribution group selected
quote($_POST['postfix_group_member_goto'])); } if (isset($_POST['postfix_group_member_disabled']) && $_POST['postfix_group_member_disabled'] != "") { array_push($updates ,"Disabled = ".$db->quote($_POST['postfix_group_member_disabled'])); } # Check if we have updates if (sizeof($updates) > 0) { $updateStr = implode(', ',$updates); $res = $db->exec("UPDATE distribution_group_members SET $updateStr WHERE ID = ".$db->quote($_POST['postfix_group_member_id'])); if ($res) { ?>
Distribution group member updated
Error updating distribution group member!
No changes made to distribution group member
Invalid invocation
postfix-cluebringer-2.0.10/webui/greylisting-whitelist-change.php0000644000175000017500000001065011177770474025065 0ustar nikolainikolai array( "Back to whitelist" => "greylisting-whitelist-main.php" ), )); # Display change screen if ($_POST['frmaction'] == "change") { # Check a whitelist was selected if (isset($_POST['whitelist_id'])) { # Prepare statement $stmt = $db->prepare(' SELECT greylisting_whitelist.ID, greylisting_whitelist.Source, greylisting_whitelist.Comment, greylisting_whitelist.Disabled FROM greylisting_whitelist WHERE greylisting_whitelist.ID = ? '); ?>
execute(array($_POST['whitelist_id'])); $row = $stmt->fetchObject(); $stmt->closeCursor(); ?>
Old Value New Value
Source source ?>
Comment comment ?>
Disabled disabled ? 'yes' : 'no' ?>

No whitelisting selected
quote($_POST['whitelist_type'].":".$_POST['whitelist_source'])); } if (!empty($_POST['whitelist_comment'])) { array_push($updates,"Comment = ".$db->quote($_POST['whitelist_comment'])); } if (isset($_POST['whitelist_disabled']) && $_POST['whitelist_disabled'] != "") { array_push($updates ,"Disabled = ".$db->quote($_POST['whitelist_disabled'])); } # Check if we have updates if (sizeof($updates) > 0) { $updateStr = implode(', ',$updates); $res = $db->exec("UPDATE greylisting_whitelist SET $updateStr WHERE ID = ".$db->quote($_POST['whitelist_id'])); if ($res) { ?>
Greylisting whitelisting updated
Error updating Greylisting whitelisting!
No changes made to Greylisting whitelisting
errorInfo()) ?>
Invalid invocation
postfix-cluebringer-2.0.10/webui/checkspf-add.php0000644000175000017500000001100211177770474021574 0ustar nikolainikolai array( "Back to SPF checks" => "checkspf-main.php" ), )); if ($_POST['frmaction'] == "add") { ?>
Name
Link to policy
Use SPF
Reject Failed SPF
Add SPF Header
Comment
Policy ID cannot be empty
Name cannot be empty
prepare("INSERT INTO checkspf (PolicyID,Name,UseSPF,RejectFailedSPF,AddSPFHeader,Comment,Disabled) VALUES (?,?,?,?,?,?,1)"); $res = $stmt->execute(array( $_POST['checkspf_policyid'], $_POST['checkspf_name'], $useSPF, $rejectFailed, $addHeader, $_POST['checkspf_comment'] )); if ($res) { ?>
SPF check created
Failed to create SPF check
errorInfo()) ?>
Invalid invocation
postfix-cluebringer-2.0.10/webui/greylisting-add.php0000644000175000017500000002265511177770474022366 0ustar nikolainikolai array( "Back to greylisting" => "greylisting-main.php" ), )); if ($_POST['frmaction'] == "add") { ?>
Name
Link to policy
Greylisting
Use Greylisting
Greylist Period
Track
Greylist Auth Validity
Greylist UnAuth Validity
Auto-Whitelisting
Use AWL
AWL For Period
AWL After Count
AWL After Percentage (blank = inherit, 0 = disable)
Auto-Blacklisting
Use ABL
ABL For Period
ABL After Count
ABL After Percentage
 
Comment
Policy ID cannot be empty
Name cannot be empty
prepare(" INSERT INTO greylisting ( PolicyID,Name, UseGreylisting,GreylistPeriod, Track, GreylistAuthValidity, GreylistUnAuthValidity, UseAutoWhitelist,AutoWhitelistPeriod,AutoWhitelistCount,AutoWhitelistPercentage, UseAutoBlacklist,AutoBlacklistPeriod,AutoBlacklistCount,AutoBlacklistPercentage, Comment,Disabled ) VALUES ( ?,?, ?,?, ?, ?,?, ?,?,?,?, ?,?,?,?, ?,1 ) "); $res = $stmt->execute(array( $_POST['greylisting_policyid'], $_POST['greylisting_name'], $useGreylisting,$greylistPeriod, $_POST['greylisting_track'] . ":" . $_POST['greylisting_trackextra'], $greylistAuthValidity,$greylistUnAuthValidity, $useAWL,$AWLPeriod,$AWLCount,$AWLPercentage, $useABL,$ABLPeriod,$ABLCount,$ABLPercentage, $_POST['greylisting_comment'] )); if ($res) { ?>
Greylisting created
Failed to create Greylisting
errorInfo()) ?>
Invalid invocation
postfix-cluebringer-2.0.10/webui/policy-group-main.php0000644000175000017500000000535511177770474022651 0ustar nikolainikolai
Action

query($sql); while ($row = $res->fetchObject()) { ?> closeCursor(); ?>
Name Disabled
name ?> disabled ? 'yes' : 'no' ?>

postfix-cluebringer-2.0.10/webui/checkspf-change.php0000644000175000017500000001714611204755337022300 0ustar nikolainikolai array( "Back to SPF checks" => "checkspf-main.php" ), )); # Display change screen if ($_POST['frmaction'] == "change") { # Check a SPF check was selected if (isset($_POST['checkspf_id'])) { # Prepare statement $stmt = $db->prepare(' SELECT checkspf.ID, checkspf.PolicyID, checkspf.Name, checkspf.UseSPF, checkspf.RejectFailedSPF, checkspf.AddSPFHeader, checkspf.Comment, checkspf.Disabled, policies.Name AS PolicyName FROM checkspf, policies WHERE checkspf.ID = ? AND policies.ID = checkspf.PolicyID '); ?>
execute(array($_POST['checkspf_id'])); $row = $stmt->fetchObject(); $stmt->closeCursor(); ?>
Old Value New Value
Name name ?>
Link to policy policyname ?>
Use SPF usespf) { case null: echo "Inherit"; break; case 1: echo "Yes"; break; case 2: echo "No"; break; default: echo "UNKNOWN"; break; } ?>
Reject Failed SPF rejectfailedspf) { case null: echo "Inherit"; break; case 1: echo "Yes"; break; case 2: echo "No"; break; default: echo "UNKNOWN"; break; } ?>
Add SPF Header addspfheader) { case null: echo "Inherit"; break; case 1: echo "Yes"; break; case 2: echo "No"; break; default: echo "UNKNOWN"; break; } ?>
Comment comment ?>
Disabled disabled ? 'yes' : 'no' ?>

No access control selected
quote($_POST['checkspf_policyid'])); } if (!empty($_POST['checkspf_name'])) { array_push($updates,"Name = ".$db->quote($_POST['checkspf_name'])); } if (!empty($_POST['checkspf_usespf'])) { if ($_POST['checkspf_usespf'] == "1") { $usespf = null; } elseif ($_POST['checkspf_usespf'] == "2") { $usespf = 1; } elseif ($_POST['checkspf_usespf'] == "3") { $usespf = 2; } array_push($updates,"UseSPF = ".$db->quote($usespf)); } if (!empty($_POST['checkspf_rejectfailed'])) { if ($_POST['checkspf_rejectfailed'] == "1") { $rejectfailed = null; } elseif ($_POST['checkspf_rejectfailed'] == "2") { $rejectfailed = 1; } elseif ($_POST['checkspf_rejectfailed'] == "3") { $rejectfailed = 2; } array_push($updates,"RejectFailedSPF = ".$db->quote($rejectfailed)); } if (!empty($_POST['checkspf_addheader'])) { if ($_POST['checkspf_addheader'] == "1") { $addheader = null; } elseif ($_POST['checkspf_addheader'] == "2") { $addheader = 1; } elseif ($_POST['checkspf_addheader'] == "3") { $addheader = 2; } array_push($updates,"AddSPFHeader = ".$db->quote($addheader)); } if (!empty($_POST['checkspf_comment'])) { array_push($updates,"Comment = ".$db->quote($_POST['checkspf_comment'])); } if (isset($_POST['checkspf_disabled']) && $_POST['checkspf_disabled'] != "") { array_push($updates ,"Disabled = ".$db->quote($_POST['checkspf_disabled'])); } # Check if we have updates if (sizeof($updates) > 0) { $updateStr = implode(', ',$updates); $res = $db->exec("UPDATE checkspf SET $updateStr WHERE ID = ".$db->quote($_POST['checkspf_id'])); if ($res) { ?>
SPF check updated
Error updating SPF check!
errorInfo()) ?>
No changes made to SPF check
Invalid invocation
postfix-cluebringer-2.0.10/webui/greylisting-change.php0000644000175000017500000004444111227343625023046 0ustar nikolainikolai array( "Back to greylisting" => "greylisting-main.php" ), )); # Display change screen if ($_POST['frmaction'] == "change") { # Check a greylisting was selected if (isset($_POST['greylisting_id'])) { # Prepare statement $stmt = $db->prepare(' SELECT greylisting.ID, greylisting.PolicyID, greylisting.Name, greylisting.UseGreylisting, greylisting.GreylistPeriod, greylisting.Track, greylisting.GreylistAuthValidity, greylisting.GreylistUnAuthValidity, greylisting.useAutoWhitelist, greylisting.AutoWhitelistPeriod, greylisting.AutoWhitelistCount, greylisting.AutoWhitelistPercentage, greylisting.useAutoBlacklist, greylisting.AutoBlacklistPeriod, greylisting.AutoBlacklistCount, greylisting.AutoBlacklistPercentage, greylisting.Comment, greylisting.Disabled, policies.Name AS PolicyName FROM greylisting, policies WHERE greylisting.ID = ? AND policies.ID = greylisting.PolicyID '); ?>
execute(array($_POST['greylisting_id'])); $row = $stmt->fetchObject(); $stmt->closeCursor(); ?>
Old Value New Value
Name name ?>
Link to policy policyname ?>
Greylisting
Use Greylisting usegreylisting) { case null: echo "Inherit"; break; case 0: echo "No"; break; case 1: echo "Yes"; break; default: echo "UNKNOWN"; break; } ?>
Greylist Period greylistperiod) ? '*inherited*' : $row->greylistperiod ?>
Track track ?>
Greylist Auth Validity greylistauthvalidity) ? '*inherited*' : $row->greylistauthvalidity ?>
Greylist UnAuth Validity greylistunauthvalidity) ? '*inherited*' : $row->greylistunauthvalidity ?>
Auto-Whitelisting
Use AWL useautowhitelist) { case null: echo "Inherit"; break; case 0: echo "No"; break; case 1: echo "Yes"; break; default: echo "UNKNOWN"; break; } ?>
AWL Period autowhitelistperiod) ? '*inherited*' : $row->autowhitelistperiod ?>
AWL After Count autowhitelistcount)) { echo '*inherited*'; } elseif ($row->autowhitelistcount == "0") { echo '*disabled*'; } else { echo $row->autowhitelistcount; } ?>
AWL After Percentage autowhitelistpercentage)) { echo '*inherited*'; } elseif ($row->autowhitelistpercentage == "0") { echo '*disabled*'; } else { echo $row->autowhitelistpercentage; } ?>
Auto-Blacklisting
Use ABL useautoblacklist) { case null: echo "Inherit"; break; case 0: echo "No"; break; case 1: echo "Yes"; break; default: echo "UNKNOWN"; break; } ?>
ABL Period autoblacklistperiod) ? '*inherited*' : $row->autoblacklistperiod ?>
ABL After Count autoblacklistcount)) { echo '*inherited*'; } elseif ($row->autoblacklistcount == "0") { echo '*disabled*'; } else { echo $row->autoblacklistcount; } ?>
ABL After Percentage autoblacklistpercentage)) { echo '*inherited*'; } elseif ($row->autoblacklistpercentage == "0") { echo '*disabled*'; } else { echo $row->autoblacklistpercentage; } ?>
 
Comment comment ?>
Disabled disabled ? 'yes' : 'no' ?>

No Greylisting check selected
quote($_POST['greylisting_policyid'])); } if (!empty($_POST['greylisting_name'])) { array_push($updates,"Name = ".$db->quote($_POST['greylisting_name'])); } if (!empty($_POST['greylisting_usegreylisting'])) { if ($_POST['greylisting_usegreylisting'] == "1") { $usegreylisting = "NULL"; } elseif ($_POST['greylisting_usegreylisting'] == "2") { $usegreylisting = $db->quote(1); } elseif ($_POST['greylisting_usegreylisting'] == "3") { $usegreylisting = $db->quote(0); } array_push($updates,"UseGreylisting = $usegreylisting"); } if (!empty($_POST['greylisting_period_m'])) { if ($_POST['greylisting_period_m'] == "1") { $period = "NULL"; } elseif ($_POST['greylisting_period_m'] == "2") { $period = $db->quote($_POST['greylisting_period']); } array_push($updates,"GreylistPeriod = $period"); } if (!empty($_POST['greylisting_track'])) { if ($_POST['greylisting_track'] == "SenderIP") { $track = sprintf('%s:%s',$_POST['greylisting_track'],$_POST['greylisting_trackextra']); } else { $track = $_POST['greylisting_track']; } array_push($updates,"Track = ".$db->quote($track)); } if (!empty($_POST['greylisting_authvalidity_m'])) { if ($_POST['greylisting_authvalidity_m'] == "1") { $validity = "NULL"; } elseif ($_POST['greylisting_authvalidity_m'] == "2") { $validity = $db->quote($_POST['greylisting_authvalidity']); } array_push($updates,"GreylistAuthValidity = $validity"); } if (!empty($_POST['greylisting_unauthvalidity_m'])) { if ($_POST['greylisting_unauthvalidity_m'] == "1") { $validity = "NULL"; } elseif ($_POST['greylisting_unauthvalidity_m'] == "2") { $validity = $db->quote($_POST['greylisting_unauthvalidity']); } array_push($updates,"GreylistUnAuthValidity = $validity"); } # Autowhitelist if (!empty($_POST['greylisting_useawl'])) { if ($_POST['greylisting_useawl'] == "1") { $useawl = "NULL"; } elseif ($_POST['greylisting_useawl'] == "2") { $useawl = $db->quote(1); } elseif ($_POST['greylisting_useawl'] == "3") { $useawl = $db->quote(0); } array_push($updates,"UseAutoWhitelist = $useawl"); } if (!empty($_POST['greylisting_awlperiod_m'])) { if ($_POST['greylisting_awlperiod_m'] == "1") { $awlperiod = "NULL"; } elseif ($_POST['greylisting_awlperiod_m'] == "2") { $awlperiod = $db->quote($_POST['greylisting_awlperiod']); } array_push($updates,"AutoWhitelistPeriod = $awlperiod"); } # AWL Count if (!empty($_POST['greylisting_awlcount_m'])) { if ($_POST['greylisting_awlcount_m'] == "0") { $awlcount = $db->quote(0); } elseif ($_POST['greylisting_awlcount_m'] == "1") { $awlcount = "NULL"; } elseif ($_POST['greylisting_awlcount_m'] == "2") { $awlcount = $db->quote($_POST['greylisting_awlcount']); } array_push($updates,"AutoWhitelistCount = $awlcount"); } # AWL Percentage if (!empty($_POST['greylisting_awlpercentage_m'])) { if ($_POST['greylisting_awlpercentage_m'] == "0") { $awlpercentage = $db->quote(0); } elseif ($_POST['greylisting_awlpercentage_m'] == "1") { $awlpercentage = "NULL"; } elseif ($_POST['greylisting_awlpercentage_m'] == "2") { $awlpercentage = $db->quote($_POST['greylisting_awlpercentage']); } array_push($updates,"AutoWhitelistPercentage = $awlpercentage"); } # Autoblacklist if (!empty($_POST['greylisting_useabl'])) { if ($_POST['greylisting_useabl'] == "1") { $useabl = "NULL"; } elseif ($_POST['greylisting_useabl'] == "2") { $useabl = $db->quote(1); } elseif ($_POST['greylisting_useabl'] == "3") { $useabl = $db->quote(0); } array_push($updates,"UseAutoBlacklist = $useabl"); } if (!empty($_POST['greylisting_ablperiod_m'])) { if ($_POST['greylisting_ablperiod_m'] == "1") { $ablperiod = "NULL"; } elseif ($_POST['greylisting_ablperiod_m'] == "2") { $ablperiod = $db->quote($_POST['greylisting_ablperiod']); } array_push($updates,"AutoBlacklistPeriod = $ablperiod"); } # ABL Count if (!empty($_POST['greylisting_ablcount_m'])) { if ($_POST['greylisting_ablcount_m'] == "0") { $ablcount = $db->quote(0); } elseif ($_POST['greylisting_ablcount_m'] == "1") { $ablcount = "NULL"; } elseif ($_POST['greylisting_ablcount_m'] == "2") { $ablcount = $db->quote($_POST['greylisting_ablcount']); } array_push($updates,"AutoBlacklistCount = $ablcount"); } # ABL Percentage if (!empty($_POST['greylisting_ablpercentage_m'])) { if ($_POST['greylisting_ablpercentage_m'] == "0") { $ablpercentage = $db->quote(0); } elseif ($_POST['greylisting_ablpercentage_m'] == "1") { $ablpercentage = "NULL"; } elseif ($_POST['greylisting_ablpercentage_m'] == "2") { $ablpercentage = $db->quote($_POST['greylisting_ablpercentage']); } array_push($updates,"AutoBlacklistPercentage = $ablpercentage"); } if (!empty($_POST['greylisting_comment'])) { array_push($updates,"Comment = ".$db->quote($_POST['greylisting_comment'])); } if (isset($_POST['greylisting_disabled']) && $_POST['greylisting_disabled'] != "") { array_push($updates ,"Disabled = ".$db->quote($_POST['greylisting_disabled'])); } # Check if we have updates if (sizeof($updates) > 0) { $updateStr = implode(', ',$updates); $res = $db->exec("UPDATE greylisting SET $updateStr WHERE ID = ".$db->quote($_POST['greylisting_id'])); if ($res) { ?>
Greylisting updated
Error updating Greylisting!
errorInfo()) ?>
No changes made to Greylisting
Invalid invocation
postfix-cluebringer-2.0.10/webui/quotas-limits-change.php0000644000175000017500000001127411177770474023331 0ustar nikolainikolai array( "Back to quotas" => "quotas-main.php", "Back to limits" => "quotas-limits-main.php?quota_id=".$_REQUEST['quota_id'], ), )); # Display change screen if ($_POST['frmaction'] == "change") { # Check a limit was selected if (isset($_POST['quota_limit_id'])) { # Prepare statement $stmt = $db->prepare('SELECT ID, Type, CounterLimit, Comment, Disabled FROM quotas_limits WHERE ID = ?'); $res = $stmt->execute(array($_POST['quota_limit_id'])); $row = $stmt->fetchObject(); $stmt->closeCursor(); ?>
Old Value New Value
Type type ?>
Counter Limit counterlimit ?>
Comment comment ?>
Disabled disabled ? 'yes' : 'no' ?>

No quota selected
quote($_POST['limit_type'])); } if (!empty($_POST['limit_counterlimit'])) { array_push($updates,"CounterLimit = ".$db->quote($_POST['limit_counterlimit'])); } if (!empty($_POST['limit_comment'])) { array_push($updates,"Comment = ".$db->quote($_POST['limit_comment'])); } if (isset($_POST['limit_disabled']) && $_POST['limit_disabled'] != "") { array_push($updates ,"Disabled = ".$db->quote($_POST['limit_disabled'])); } # Check if we have updates if (sizeof($updates) > 0) { $updateStr = implode(', ',$updates); $res = $db->exec("UPDATE quotas_limits SET $updateStr WHERE ID = ".$db->quote($_POST['quota_limit_id'])); if ($res) { ?>
Quota limit updated
Error updating quota limit!
errorInfo()) ?>
No quota limit updates
No quota limit data available
Invalid invocation
postfix-cluebringer-2.0.10/webui/greylisting-main.php0000644000175000017500000000621411177770474022553 0ustar nikolainikolai
Action

query($sql); # Check if we got a result if ($res) { while ($row = $res->fetchObject()) { ?> closeCursor(); # Or not } else { ?>
Policy Name Disabled
policyname ?> name ?> disabled ? 'yes' : 'no' ?>
errorInfo()) ?>

postfix-cluebringer-2.0.10/webui/quotas-limits-add.php0000644000175000017500000000577611177770474022646 0ustar nikolainikolai array( "Back to quotas" => "quotas-main.php", "Back to quota limits" => "quotas-limits-main.php?quota_id=".$_REQUEST['quota_id'], ), )); if ($_POST['frmaction'] == "add") { ?>
Type
Counter Limit
Comment
No policy ID, invalid invocation?
Counter limit is required
prepare("INSERT INTO quotas_limits (QuotasID,Type,CounterLimit,Comment,Disabled) VALUES (?,?,?,?,1)"); $res = $stmt->execute(array( $_POST['quota_id'], $_POST['limit_type'], $_POST['limit_counterlimit'], $_POST['limit_comment'] )); if ($res) { ?>
Quota limit created
Failed to create quota limit
errorInfo()) ?>
Invalid invocation
postfix-cluebringer-2.0.10/webui/images/0000755000175000017500000000000011312351141017773 5ustar nikolainikolaipostfix-cluebringer-2.0.10/webui/images/strips_onside.jpg0000644000175000017500000000061010744422207023371 0ustar nikolainikolaiÿØÿàJFIFddÿìDuckydÿîAdobedÀÿÛ„ÿÀ ÑÿÄT µ6vÿÚ ?÷EÒ)Ü­{ @'­Ú¥Ÿžö±²AžߨºE;•¯b!‚¨õ»T³óÞÖ6H3À?ÿÙpostfix-cluebringer-2.0.10/webui/images/top2.jpg0000644000175000017500000000410210744422207021370 0ustar nikolainikolaiÿØÿàJFIFddÿìDuckyZÿî&AdobedÀ • ­@ÿÛ„ÿÂÐÿİ `@4%Qa±!1A¡23Ñ"qr²#s@Á‚`!1AQaq‘ð¡±Ñá`Áñ@ÿÚ ò¡Â)H @P@ANCÖ¦© !@ €¤2ÎÌm€!A PB‚ Ä>Ú›1ÏÿÚ×1ɪžp§œ)ç y²žwÝ<áO8SΔó…<ÙO:SÎóe<áO8SÍ”ó…<áO8SÎó¥<áO8SÎ"¦xõôx=ô›Æãq¾ãq¾ãq¾ãq¸Ün7Æã| Æã|î](Ýœ™°LLLØ&&lÀ™°OfÁ< ›ÄÄÄÄÄÉ-ô>D‡ÐÿÚòÿÚòÿÚ?QÿÚ?QÿÚ?Zé"·ÚY™¥ZŒ;I–Ž*ìÀµ›O1ÇY®Övf6VеŸQÇ\‹Þm<Çf»Zº•¢­FÉŽ:ì÷›O1ÅY¸'Z¬Ìl­k6Lq×g¼ÚyŽ*íÁ:ÕÔl­k6Lq×$¿Q´óUàjê8ë¿Y°³uØýgn`¿x'ZºŽ:ÆoÖl,ÆÊìÅZ•ÔqW‚u«¨ã¬ßq°³+³Ô}Gx'Z›1ÇY¾óafºˆ«öduTj60­ÙG¤FBžº‰™ û".8î2?LŠ8䨋ª4 üdmŸ@S%²ÿ®(SÿÚ?!þQÿÚ?!þQÿÚ $ H ’I‚ H$I$ ÿÚ?}l2–Hê~äf º?äI’Æ”ÊÏ {óœé¶²‡ñ¸ÐB îwÀL‚Ï®׈@v-Ð?HÃˇŒ¢I5Hû¥Öí%°0¿” ut|<A@XÂó•Öì*’²²¥3¼E5Çæ,ÄU NØÍô€jKÇVTÓ,½°Ê|p€š@ l¶¼ÄPD?ë×acš`OÎá¢`$²Ñ+£Iûm‹˜ÀFöc"yÈ 4J×- #Dùޱ{ôqq ö— °¦™%ÀLm„¡Z}¨+Ùv€àB“C½‰ùR¦Ð óê÷~^ D°öY‡8^hUì—‡¿¬(ˆ`-ܳÀ›@–*T‘ì¸à<=ýaPpHK<g´`jà¥Ó|u•JÚËNóþƒ€JIb²YíPÜ uXé¿î Ào’KdÃ…&²¢^6Jj …€y¿î ŒfÙ(‚fypÙ*„ÉÄÑ›äóõ‰D³•ùö‚¡7‹‹†/BY6"@ÙäÅE€í‚ªïÛ˜Hö Á=ßywAÈÚ÷¯!be®p0 =,ø%s +ÒSµ¯P)Bm è ü¸€#Øh•ÉçÄÅOÌjºAˆ6q/+Õ’:þ¥@ÆL=ê¿Ø. m^Þ¾„-s5É+·â9=ê‡îw*ÝÞ¢ŽâÐÙ+¶ñ €5Ÿ+ªóØyÅ€ÜMÙ°…›„šô^¾\HÒ´óljh磖œü0…ÂOŸ OÇFå׈DÇë]üÿ×Ë—ÿÚ?þQÿÚ?þQÿÙpostfix-cluebringer-2.0.10/webui/images/valid-css2.png0000644000175000017500000000306410744422207022465 0ustar nikolainikolai‰PNG  IHDRXTúÒãPLTE     ! *!0&3)8,>1###(((432;;;@3G8L<NK?TC!XF#]J%aM&dP(iT)oX,uG9t\.}c1NNNROKVRMVVV\\\j]Jeeekkkrkappp{{{Zœ_Ÿ `Ÿc¡e¢h¤k¦m¨!o©%rª)u¬1y¯6}±8~²>‚´E†¶L‹ºU‘½Z”¿]–Àd›ÃhÄm¡Æt¥É|ªÌ–™œˆ 6' ·<¦>*€f3†k5ˆl6p8“u:œ|=ºB!¿L&¡rSÀN'ÁP(È_/Ðo7Öz=Ø~?‘‡k¢@¨†C­ŠE´X¶‘Hº•J¾˜L£’k³Ÿg»¦rÄœMÞŠEË¢QѧSÔ©TÙ­VݱXã•Jæ›Mé Pí©TãµZæ¸\ì¼^óÂaúÅbþËeƒƒƒ———˜˜˜©¥žµ­˜¬¬¬´´´¿¿¿‚®Î…°Ð‹´Ò·Ô–»Ö˜¼×›¾ØŸÁÚ£ÃÛ¨ÇÝ«ÉÞ²Íá¶ÐãÂÂÂÌÌÌÔÔÔØØØÀÖçÆÚèÍßìÓãîÝéòÿìÆçççìììåîõéñöîôøôôôò÷úõøûþþþÌÌÌãPšŸ¡tRNSÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ± ‚†bKGDˆH pHYsHHFÉk>=IDATHÇí–ýSAÇ÷H±´4Ka2OÓ^FßÊp2z×ìezb¨è’ËÉ®±´ršb 0-K…¹íOíÙ=Ž¢rÎÌú©ïÌ=»{Ì~xxöyž…ä7]O¿0‘<5×'uýºwÿðFÁi)š`c<¦°aB_ý98j%„ˆjÄ‚C\•õ• 8ãõãî¹î9)¸\^T·ÒⓃy:«qð”Å2&Ǫ͚# µ•D•XÌ ¼$¾…c œ]ÃTk#dË|ý<ßgDƉ#œ6E/|@ë†U´ƒà[Yy ž"!;Ž4ÔlYæà=dœï‹Ù±M¨r!U!S°^ íƒ Z,Q­‡MÛ0 ŽÐ’ÇÍ¥­Ä‰ƒ<.l3/@?¥«×EèÅpó¨Ô°´¢V,‚(EBª3*_ÂS %â–k€rVtaÞtQ: ~ºê†E<º­YÛ†y0ªÚÑÚ<žòxN²3|ßQS?C °ÓÖÒ"9š„dÕ®Ö–pµš¬BŠRqfžüÝF/6JVGÇîyÑæ¬C#XÕÄ¢‡üz™ûÛ7HrJU%|XÐI)•J¨JeôúwÓ/Ó[%îæßÒ‚œû®ÿÉÉö¿bÖTÏî­_·à¶uh÷Zjÿé;özþ ä&×y ‘¡6IEND®B`‚postfix-cluebringer-2.0.10/webui/images/bg.jpg0000644000175000017500000000066510744422207021106 0ustar nikolainikolaiÿØÿàJFIFddÿìDucky`ÿîAdobedÀÿÛ„ÿÀÿÄ_ !1A"a2#ÿÚ ?ÆÑú -úv"ÒØ´Èy“[›#¾â¢E=`(‚4x£Aenš—ù5l¹ºš@`âØç±L1ãÄÖÕØÿ—·µsŽÞÆéiq]EÓ{äÅÍû qÇå|tªÖ–LÞ$r>h£8?iNRJÔ ¹¶ÿÙpostfix-cluebringer-2.0.10/webui/images/specs_bottom.jpg0000644000175000017500000000154710744422207023217 0ustar nikolainikolaiÿØÿàJFIFddÿìDuckyZÿî&AdobedÀ û’eÿÛ„ÿÂÑÿÄ› %P@$4 1‘Ѳs@AQ¡B3P1@P!ðAQaÿÚ ï9j¸×†\J²?ÿÚèü^GoåaÛ³Ç%%%%%%%%%%%%%%%%%%%%%%%&]»\±z¯ÿÚÕ¿ÿÚÕ¿ÿÚ?[ÿÚ?[ÿÚ?Ùô«åÇiÜôçËÂŽuÙ¶ÏÓ¯^3Œy¡fÀ¨Y°*l …›¡fÀ¨Y°*l …›¡fÀ¨Y°*l …›¡fÀ¨Y°*l …›¡fÀ¨Y°*l …›¡fÀ¨Y°*l •› 1¹umû³ófå->#Ùè?ÿÚ?!ÜâóŸZD†±m}tÊ^º(•¢TJ‰Q*%D¨•¢TJ‰Q*%D¨•¢TJ‰Q*%F¯ÈË0ª¢©J¿ƒÿÚ?!å¿ÿÚ?!å¿ÿÚ I$’I$’I$’H?ÿÚ?ݺ~´ªv¬jjæéÚ93—¸,X±bÅ‹,X±bÅ‹,X±bÅ‹^X¼å‘ÃBÓi‰aXпÿÚ?å¿ÿÚ?å¿ÿÙpostfix-cluebringer-2.0.10/webui/images/valid-xhtml10.png0000644000175000017500000000353210744422207023110 0ustar nikolainikolai‰PNG  IHDRXTúÒPLTE    %+"0&6+;/=0###(((432;;;A4N>NK?SB!^K%dP(jT*nX,uG9t\.~d1NNNROKVRMUUU\\\j]Jeeekkkppp{{{Zœ_Ÿ `Ÿc¡e¢h¤k¦m¨!o©%rª)u¬1y¯6}±8~²>‚´E†¶L‹ºU‘½Z”¿]–Àd›ÃhÄm¡Æt¥É|ªÌ–™œˆ 6' ·<¦>*g3ƒh4Šn6Žq8”v;—x<š{=ºB!¿L&€yh¡rSÀN'ÁP(È_/Ðo7Öz=Ø~?Še£‚A®‹E±F´X·’Iº”J¾˜L£’k³Ÿg»¦rÅNÞŠEΤQѧSÕªUÚ®WÞ±Xã•Jæ›Mé Pí©Tâ´Zæ¸\ê»]òÁ`ûÅbþËeƒƒƒ———˜˜˜©¥žµ­˜¬¬¬´´´¿¿¿‚®Î…°Ð‹´Ò·Ô–»Ö˜¼×›¾ØŸÁÚ£ÃÛ¨ÇÝ«ÉÞ²Íá¶ÐãÂÂÂÌÌÌÔÔÔÀÖçÆÚèÍßìÓãîÝéòÿìÆçççìììåîõéñöîôøôôôò÷úõøûþþþÌÌÌçâ»`žtRNSÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>‡ãøbKGDÿ¥òÅ pHYsHHFÉk>IIDATHÇí–iOQ†Ï ‹@E1ˆV-J< ­ìb Pl5–âWªXÛ2¢N¯Á%J6E(à´™ëõÜ™]Y‚~òMzfË<3óžå÷]o Á"ß^ßÙÎõüéÙÿà½'C*crH†¢´ Æ&ƒ¤P8 Òùh(ÄXprOà18ÁÂ`‰ù`˜1 (å T¡œd¬€)`ÙŽ·¸éî™ÖIÙí-¤Vçé7MIþA3¬¨…f&x"`k`‚À’*Sø-ø:‰ø»8†¸Vp Y4ÀJ1À#p­ÏW cÃâ TùN—X~æí¸BÑë{е¶6‡Î4GÎ-;°šIž•ÞM€ueÁ5ÖŠ¢Á­ÀnüH±ãøkmb·î(¹pî|¦*ÂR XxHYrÁa¢[—°“óuDòuÛÉnÝ•2qIKgÀ•R¸ž˜G²`fµ1\á÷ûcìñlTE3¹ð±™ótóu.SêæVÅ ¬—ªfòLÒÁBQ_ñ²vѧ»°—Èî%Þ‹ØŸ¢Üå‚#2ݨªLF+úLÍôÀ”‹ÉBdÅUPG—Ö|!î5tÐcœˆŸÞSç]÷2À)tÌc_ÊÞ>‡=âxÙ ¾°ðÍ ×ì¼.òažw£Qœ÷aïf…Û–k‚?!Ú5ªÄ”~ £Ç!˽æñ¾Êr/{r‡P Îê-8Ãg{t+º rÓBÆ › ®,eA°|¿÷å÷TÞtëÃ5½¿R±¹SqƵÆ‚+%7ÀÆ[ªPÅ¢p(˽¯ó¼/ ½·óÇæ|‡ˆK­T!N´£hÅŲ†ÆÃ0Í ß¸¤œÉ4Dsödå}\0µúf€~_ûÎ^‘ÃdCYõ{ž¢qq\ŠŒ‚?7yw²ÜW»ôaѰ%¢wY@’ \Í«²»&wj×+ˆúd||<À&„ÏòØ#µ ~ï™Ü}_Ld¸û¿J¿ðêÜ¿°üOMý³ÿ¶Õ»g;×Ã[&¸n:¶•ê79S_­ƒ™¨†¢Ô”]IEND®B`‚postfix-cluebringer-2.0.10/webui/images/wcag1AAA.png0000644000175000017500000000307610744422207022026 0ustar nikolainikolai‰PNG  IHDRXTúÒÚPLTE     %+"0&5*9->1""")))A4F8J:NK?TC!XF#]J%aM&eQ(iT)nX,r[-{b1CCCOMENNNUQITTTXXXdddjjjsssZœ_Ÿ b f£k¦!o¨%rª*u¬/x®0y¯5|±;€³B…µGˆ¸KйQŽ»T½[•¿]–Àb™Âm¡Æp¢Çs¤È|ªÌ™ž ¡£ ¦ ¨ª"¯+°.±1µ8g3„i4‰m6Žq8’t:–x<š{=ÂS)ÆZ,È^.Êc1Íi4Òs9×|>£‚@¨†C¬ŠE²ŽGµHº”J¾˜L³Ÿg²ŸhÄœMÞ‰DÌ£QЦSÔªTÚ®VÞ±XàŽGâ’Iæ›MèNé Pâ´Zæ¸\ì¼^ð®Wò²Yõ¹\ø¾_ôÃaùÃaþËfƒƒƒ˜˜˜´§„¬¬¬´´´€­ÎŠ³Ñ“¹Õ›¾ØÀÙ¦ÅÜ©ÇÞ¬Éß¼ÈЯËà³Îá¶Ðã¼ÔåÿߟÄÄÄËËËÜÜÜÀÖçÅÙèËÝëÏàìÒâîØæðÜèñëëëåîõëò÷îôøõõõòöùôøûþþþú!YbKGDˆH pHYsHHFÉk>ýIDATHÇÕ–ýSGÇŸ£¢ázØä%ÚIk‰I'£1ÕŒ]t$ ‚¨hŠ‘R‘!ŒdxѹÛ6móÒ4mMÛ:&ÓÛÿµÏÞqŒéc“ò ìîÍŸ{ö»Ïó=`ÿìóÓâv¶Øì{ÏÀê»Ëx p½&n-×qU­‹ë2FÝBh]cÞÙ1¦Ý† ììuˆÍA‚1<â0.XàUS…Ò»bŽÒÕŽ5Ùp¨B–ÕÁÖ…Ë|ÚfO,ðͨA\Ò5œîÒèÍŽ5^Õ(Bž­CŠf—Ûbj4cçæçæpZ£+Tµ¤Ð›:7®¾<Âxœƒ"ØóPf¤*,`G¼E+±yƒŸ¡có± ݲOsþ7y„œŸ‰MþÃùÏ_ß—`Á!%AeëùØçý~_‰±eªáùÛ[HÔèŠF—ÛRŒE0ÛÈr®“©ãd’ïù>jUèõ+½vVÉ’Ú§ðsŒÍÐé(—éô4]aÛ4:CgÛ‡÷ˆ<ã|4üÒG8¿9jn~ªóÏîYuÜ%¥û%…¥Át£ÔŒu#X­ÕêkÐùÌ gg2™™ÃefŽ6,ð™âú0ù‡üüê_¡Þ¯-°…,šGÒP– : Sâ[t³Ž5Äþ—éNlV¨þu»Ü®\áO *ð€ê—Pýâr«UWšy¸öô³¤Ëår/šàµ¸&†­x‰ñJ d7~ 56;ï+òr*2q‰_á ¹Öä÷þwK›‡%1òå¯dÜàúÁ¹ÆŸ¿-Š\&OŽÃ—ÉSqñÅ0×ß–mNrÌÇȰ¼AN6ˆæÜÀ;ý LõËr Ø) ƒ%‡å)·’o-ë^ÙS>~BFEÕóÃ&–5ùÍ€þÔʸ;‰ƒbNPðèXí.ÝþnÕ¤õÈh$fxÀÎàãðCQu#×õ¿Â#úw‚{N7ÁÎ`Ϋu-Àâá#¼csh¬fm¼ÐwûXPôPÛ6G_q›XÄìñç燤û–mzP€o–Ì_× +{Ñì|'-Àº¹(£—d…Qµ~ÏžMNbò?‡†ö­Ã ö:å”’`XeÊ;+B°p».Zà<><‡Ùæ¢Ü•R@Í‚Ñ>°IPªƒ»ž‚ÿJ¡Bˆ-¢vfô Áƪ’RR ÌÞ›]„“mùš•±Š`ÔÕÂPj.»¨ãN^M%h¶±³¤þ’È»ÇÅ 6 ßJSD‰ZSWÁN_MêR‰­‹]‰;å4ÖBw~'•(¶”H‹PYZ Ý~OÿWïŸ?~{–ØÜàON‹Á¾³Å`ß¿M:xÚ•9Ë…IEND®B`‚postfix-cluebringer-2.0.10/webui/images/menuright.gif0000644000175000017500000000256610744422207022507 0ustar nikolainikolaiGIF89a¯TæYüüüîîîúúúíííðððûûû÷÷÷óóóùùùþþþìììòòòýýýïïïõõõëëëöööÓÓÓÓàÆÉÉÉÉܵÈܳÈÈÈÇܱÇÇÇÐÞÁÐÐÐÏÏÏÌÌÌÏÞ¿ÌݺÑÑÑÑßÃÑÐÐñññËݹøøøËËËÑÞÁØØØÐÏÏÐßÂÔÔÔÔàÇÎÎÎôôôåååØâÎÐÑÑÎÞ½ÐÞ¿ÎÞ¾ßßßÖÖÖñòðÕáÉÈܵãããÚÚÚÌÎÎÎÏÎÍÌÌðòîßæØÌÍÍîðìÌÞ¼ÖáÊòóñõõóÕÕÕÚãÑìîéÌÞ½òòñãèÞ×âÌàæÙÎÍÎÈÈÉáçÛÍݺýýü×××Îݽàßàáááêêêÿÿÿÿÿÿ!ùY,¯Tÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘Ž*SV" YYWœžŸ ¡¢£¤¥¦§¨©ª«©.:FX›¬µ¶·¸¹º¶45$YÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÓ'UJY ÛÜÝÞßàáâãäåæçèéêê.* Yòóôõö÷øùúûüýþÿ peCŽ,*\Ȱ¡Ã‡#JœH±¢Å‹16PÀáD– CŠI²¤É“(Sª\ɲ¥Ë—/ ˜ð! ›8sêÜɳ§ÏŸ@ƒ J´¨Q£"`àeÓ§P£JJµªÕ«X³jÝʵk×0”Èr ¬Ù³hÓª]˶­Û·pÿãÊK—n b³8ØË·¯ß¿€ L¸°áÈ+V á@^#KžL¹²å˘3kÞ̹³çÏŸ ´XšÅ€éÓ¨S«^ͺµë×°cËžM»vmH#ØÍ»·ïßÀƒ N¼¸ñãÈ“+W.ÀiУKŸN½ºõëØ³kßν»÷ïß °Ð#KóèÓ«_Ͼ½û÷ðãËŸO¿¾}ûX’€ÿÿ(à€hà&¨à‚ 6Ø X°C Thá…f¨á†vèᇠ†(âˆ$’˜@„Nd‘ÀŠ,¶èâ‹0Æ(ãŒ4Öhã8樣ŽX` Y`!äDiä‘H&©äÿ’L6éä“PF)%?)å•Xf©å–\nI%Vv)æ˜d–i&‘Tnæ™l¶éæ›Cð„špÖiçY0xöéçŸhN€Âš€j(›zj@行6ªe¢‹:*é¤LBJ饘&©g‘fꩤzÖô騗êÉ'©¨2ªç ©¶j¨¥®ÆÚ'¬²Ö '­¶æzæ¦êêë£4õúë°Qê ƒ°Ä&[éœ*ëì”Á>+­“Æf!ÁµØf«í¶Üvëí·à†+î¸ä–kî¸+0… D É»ðÆ+ï¼ôÖkï½øæ«ï¾üöëoGÜDÿlðÁ'¬°¿? რG,ñÄWœÅÓ MañÆwìñ»+ ññÈ$—üoK˜¬òÊ,¿ëÁ -Ç,sÇ€0óÍ8/|9÷ìs¿ŒðóÐDÓtÑH#}tÒLû¼sÓPãütÔT·l¿,  É,"Ö´#!;postfix-cluebringer-2.0.10/webui/images/menuleft.gif0000644000175000017500000000120010744422207022304 0ustar nikolainikolaiGIF89aTæPÐÐÐÐÞÁÌݺÏÏÏÏÞ¿îîîÑßÃÑÑÑúúúËݹÑÐÐËËËûûûñññøøøÑÞÁðððôôôØâÎÎÎÎìììÎÞ½÷÷÷ÐÑÑþþþÐÏÏùùùØØØóóóÐÞ¿íííÐßÂðòîÎÏÎÎݽÔàÇîðìêêêìîéÎÞ¾ÍÌÌïïïãããýýüÕáÉàßàåååñòðÈÈÉõõóòóñÌÎÎòòòÌÍÍõõõÍݺòòñßßßÔÔÔýýýÖáÊÌÞ¼ãèÞÈܵÌÞ½ÖÖÖÕÕÕßæØÎÍÎàæÙöööÇÇÇÇܱÈÈÈÈܳÉܵÉÉÉüüüÌÌÌÿÿÿÿÿÿ!ùP,TÝ€P4 OBA98-:.*%N)LNG G¦ ¦F¢¢6¢(I 5IM3I;DÂI OÈMO!IÍÐO0ÑLÍØOÛÝÍßO Ûž×ÙÞèàÛãÍåOëäÛðÍPM2/P $,+ array( "Back to policies" => "policy-main.php" ), )); # Display change screen if ($_POST['frmaction'] == "change") { # Check a policy was selected if (isset($_POST['policy_id'])) { # Prepare statement $stmt = $db->prepare('SELECT ID, Name, Priority, Description, Disabled FROM policies WHERE ID = ?'); ?>
execute(array($_POST['policy_id'])); $row = $stmt->fetchObject(); $stmt->closeCursor(); ?>
Old Value New Value
Name name ?>
Priority priority ?>
Description description ?>
Disabled disabled ? 'yes' : 'no' ?>

No policy selected
quote($_POST['policy_name'])); } if (isset($_POST['policy_priority']) && $_POST['policy_priority'] != "") { array_push($updates,"Priority = ".$db->quote($_POST['policy_priority'])); } if (!empty($_POST['policy_description'])) { array_push($updates,"Description = ".$db->quote($_POST['policy_description'])); } if (isset($_POST['policy_disabled']) && $_POST['policy_disabled'] != "") { array_push($updates ,"Disabled = ".$db->quote($_POST['policy_disabled'])); } # Check if we have updates if (sizeof($updates) > 0) { $updateStr = implode(', ',$updates); $res = $db->exec("UPDATE policies SET $updateStr WHERE ID = ".$db->quote($_POST['policy_id'])); if ($res) { ?>
Policy updated
Error updating policy!
errorInfo()) ?>
No changes made to policy
Invalid invocation
postfix-cluebringer-2.0.10/webui/quotas-limits-main.php0000644000175000017500000000676011177770474023034 0ustar nikolainikolai array( "Back to quotas" => "quotas-main.php" ), )); # Check a policy was selected if (isset($_REQUEST['quota_id'])) { $stmt = $db->prepare('SELECT Type, CounterLimit, Disabled FROM quota_limits WHERE QuotaID = ?'); $quota_stmt = $db->prepare('SELECT Name FROM quotas WHERE ID = ?'); $quota_stmt->execute(array($_REQUEST['quota_id'])); $row = $quota_stmt->fetchObject(); $quota_stmt->closeCursor(); ?>
Quota: name ?>
Action

prepare('SELECT ID, Type, CounterLimit, Disabled FROM quotas_limits WHERE QuotasID = ?'); $res = $stmt->execute(array($_REQUEST['quota_id'])); $i = 0; # Loop with rows while ($row = $stmt->fetchObject()) { ?> closeCursor(); ?>
Type Counter Limit Disabled
type ?> counterlimit ?> disabled ? 'yes' : 'no' ?>

Invalid invocation
postfix-cluebringer-2.0.10/webui/checkspf-delete.php0000644000175000017500000000474211177770474022323 0ustar nikolainikolai array( "Back to SPF checks" => "checkspf-main.php", ), )); # Display delete confirm screen if ($_POST['frmaction'] == "delete") { # Check a SPF check was selected if (isset($_POST['checkspf_id'])) { ?>
Are you very sure?
No SPF check selected
exec("DELETE FROM checkspf WHERE ID = ".$db->quote($_POST['checkspf_id'])); if ($res) { ?>
SPF check deleted
Error deleting SPF check!
errorInfo()) ?>
SPF check not deleted, aborted by user
Invocation error, no SPF check ID
Invalid invocation
postfix-cluebringer-2.0.10/webui/stylesheet.css0000644000175000017500000000701411177770474021462 0ustar nikolainikolai/* * * Web interfce stylesheet * Copyright (C) 2009, AllWorldIT * Copyright (C) 2008, LinuxRulz * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ body{ color:#999999; font-family: Arial, Sans-Serif; } /* * Main table */ #maintable { width: 100%; } /* * Header */ #header{ background: #000000 url('images/bg.jpg') bottom center repeat-x; text-align: center; font-size: 150%; font-weight: bold; } /* * Left hand menu */ #menu { background-image: url("images/strips_onside.jpg"); background-repeat: repeat-y; vertical-align: top; } #menu img { border: none; } #menu p { padding-right: 10px; margin-left: 5px; color:#888; } #menu a:link, a:visited { color:#888; text-decoration: none; } #menu a:hover, a:active { color:#FF6666; } #menu ul { margin-top: 0px; list-style: url(images/bullet.jpg) disc; } #menu p { font-size: 110%; font-weight: bold; margin-bottom: 0; margin-top: 10px; } /* * Footer */ #footer{ background: #000000 url('images/bg.jpg') top center repeat-x; text-align: center; font-weight: bold; } #footer a, a:link { color: #999999; text-decoration: none; } #footer a:hover { color: #A5CE77; text-decoration: none; } #footerimages { border: none; text-align: center; } /* * Top Menu (tabs) */ #topmenu ul { margin: 0; padding: 0 0 0 0; list-style: none; } #topmenu li { display: inline; margin: 0; padding: 0; } #topmenu a { float: left; background: url(images/menuleft.gif) no-repeat left top; margin: 0 5px 0 0; padding: 0 0 0 4px; text-decoration: none; } #topmenu a span { float: left; display: block; background: url(images/menuright.gif) no-repeat right top; padding: 5px 15px 4px 6px; color: #000888; } /* Commented Backslash Hack hides rule from IE5-Mac \*/ #topmenu a span { float: none; } /* End IE5-Mac hack */ #topmenu a:hover span { color: #999999; } #topmenu a:hover { background-position: 0% -42px; } #topmenu a:hover span { background-position: 100% -42px; } /* * Main content */ .content { width: 100%; vertical-align: top; } /* * Main window content */ .pageheader { background-color: #999999; color: #000000; width: 100%; border: 1px solid black; text-align: center; font-weight: bold; font-size: 110%; } /* * Results table */ .results { border: none; margin-left: auto; margin-right: auto; } .resultstitle td { font-weight: bolder; border: 1px solid black; padding-left: 5px; padding-right: 5px; } .resultsitem td { border-bottom: 1px dashed black; } /* * Entry tables */ .entry { border: solid black 1px; margin-left: auto; margin-right: auto; } .entrytitle { font-weight: bolder; } .oldval { background-color: #eeeeee; } /* * Misc */ .texttop { vertical-align: top; } .textcenter { text-align: center; } #noborder { border: none; } a.help img { border: none; } #tooltip { position: absolute; z-index: 200; } /* * vim: ts=4 */ postfix-cluebringer-2.0.10/webui/postfix-mailboxes-delete.php0000644000175000017500000000701111177770474024202 0ustar nikolainikolai array( "Back to Mailboxes" => "postfix-mailboxes-main.php", ), )); # Display delete confirm screen if ($_POST['frmaction'] == "delete") { # Check a Postfix mailbox was selected if (isset($_POST['postfix_mailbox_id'])) { ?>
Are you very sure?
No mailbox selected
query(" SELECT Mailbox FROM mailboxes WHERE ID = ".$db->quote($_POST['postfix_mailbox_id'])." "); if ($res !== FALSE) { # Pull in limit ID's $row = $res->fetchObject(); $res->closeCursor(); $mailbox = $row->mailbox; } else { ?>
Error selecting mailbox!
errorInfo()) ?>
beginTransaction(); $res = $db->exec("DELETE FROM distribution_group_members WHERE Goto = ".$db->quote($mailbox)); if ($res !== FALSE) { ?>
Mailbox removed from distribution groups
Error removing mailbox from distribution groups!
errorInfo()) ?>
rollBack(); } if ($res !== FALSE) { $res = $db->exec("DELETE FROM mailboxes WHERE ID = ".$db->quote($_POST['postfix_mailbox_id'])); if ($res) { ?>
Mailbox deleted
Error deleting mailbox!
errorInfo()) ?>
rollBack(); } } if ($res) { $db->commit(); } } else { ?>
Mailbox not deleted, aborted by user
Invocation error, no mailbox ID
Invalid invocation
postfix-cluebringer-2.0.10/webui/postfix-aliases-add.php0000644000175000017500000000614111177770474023131 0ustar nikolainikolai array( "Back to Aliases" => "postfix-aliases-main.php", ), )); if ($_POST['frmaction'] == "add") { ?>
Alias Address @
Goto
prepare('SELECT ID, DomainName, Type, Transport, Disabled FROM transports WHERE ID = ?'); $res = $stmt->execute(array($_POST['postfix_transport_id'])); $row = $stmt->fetchObject(); $mailbox = $_POST['postfix_alias_address'] . '@' . $row->domainname; $stmt = $db->prepare("INSERT INTO aliases (TransportID,Address,MailAddress,Goto,Disabled) VALUES (?,?,?,?,0)"); $res = $stmt->execute(array( $row->id, $_POST['postfix_alias_address'], $mailbox, $_POST['postfix_alias_goto'] )); if ($res) { ?>
Postfix alias created
Failed to create Postfix alias
errorInfo()) ?>
Invalid invocation
postfix-cluebringer-2.0.10/webui/checkhelo-blacklist-change.php0000644000175000017500000001027311177770474024407 0ustar nikolainikolai array( "Back to blacklist" => "checkhelo-blacklist-main.php" ), )); # Display change screen if ($_POST['frmaction'] == "change") { # Check a checkhelo blacklist was selected if (isset($_POST['blacklist_id'])) { # Prepare statement $stmt = $db->prepare(' SELECT checkhelo_blacklist.ID, checkhelo_blacklist.Helo, checkhelo_blacklist.Comment, checkhelo_blacklist.Disabled FROM checkhelo_blacklist WHERE checkhelo_blacklist.ID = ? '); ?>
execute(array($_POST['blacklist_id'])); $row = $stmt->fetchObject(); $stmt->closeCursor(); ?>
Old Value New Value
Helo helo ?>
Comment comment ?>
Disabled disabled ? 'yes' : 'no' ?>

No blacklisting selected
quote($_POST['blacklist_helo'])); } if (!empty($_POST['blacklist_comment'])) { array_push($updates,"Comment = ".$db->quote($_POST['blacklist_comment'])); } if (isset($_POST['blacklist_disabled']) && $_POST['blacklist_disabled'] != "") { array_push($updates ,"Disabled = ".$db->quote($_POST['blacklist_disabled'])); } # Check if we have updates if (sizeof($updates) > 0) { $updateStr = implode(', ',$updates); $res = $db->exec("UPDATE checkhelo_blacklist SET $updateStr WHERE ID = ".$db->quote($_POST['blacklist_id'])); if ($res) { ?>
HELO/EHLO blacklisting updated
Error updating HELO/EHLO blacklisting!
errorInfo()) ?>
No changes made to HELO/EHLO blacklisting
Invalid invocation
postfix-cluebringer-2.0.10/webui/policy-member-delete.php0000644000175000017500000000527311177770474023301 0ustar nikolainikolai array( "Back to policies" => "policy-main.php", "Back to members" => "policy-member-main.php?policy_id=".$_REQUEST['policy_id'], ), )); # Display delete confirm screen if ($_POST['frmaction'] == "delete") { # Check a policy was selected if (isset($_POST['policy_member_id'])) { ?>
Are you very sure?
No policy selected
exec("DELETE FROM policy_members WHERE ID = ".$db->quote($_POST['policy_member_id'])); if ($res) { ?>
Policy member deleted
Error deleting policy member!
errorInfo()) ?>
Policy member not deleted, aborted by user
Invocation error, no policy member ID
Invalid invocation
postfix-cluebringer-2.0.10/webui/checkhelo-main.php0000644000175000017500000000562611177770474022146 0ustar nikolainikolai
Action

query($sql); while ($row = $res->fetchObject()) { ?> closeCursor(); ?>
Policy Name Disabled
policyname ?> name ?> disabled ? 'yes' : 'no' ?>

postfix-cluebringer-2.0.10/webui/postfix-distgroups-member-main.php0000644000175000017500000000702411177770474025355 0ustar nikolainikolai array( "Back to groups" => "postfix-distgroups-main.php" ), )); # Check a postfix group was selected if (isset($_REQUEST['postfix_group_id'])) { ?> prepare('SELECT MailAddress FROM distribution_groups WHERE ID = ?'); $postfix_group_stmt->execute(array($_REQUEST['postfix_group_id'])); $row = $postfix_group_stmt->fetchObject(); $postfix_group_stmt->closeCursor(); ?>
Distribution Group: mailaddress ?>
Action

prepare('SELECT ID, Goto, Disabled FROM distribution_group_members WHERE DistributionGroupID = ? ORDER BY Goto'); $res = $stmt->execute(array($_REQUEST['postfix_group_id'])); $i = 0; # Loop with rows while ($row = $stmt->fetchObject()) { ?> closeCursor(); ?>
Goto Disabled
goto ?> disabled ? 'yes' : 'no' ?>

Invalid invocation
postfix-cluebringer-2.0.10/webui/index.php0000644000175000017500000001100211177770474020367 0ustar nikolainikolai
  • Protocols
    • Bizanga Help
    • Postfix Help
  • Policies & Policy Groups Help
    • Define policy groups made up of various combinations of tags.
    • Define and manage policies comprising of ACL's which can include groups.
  • Access Control Help
    • Control access based on policy. eg. Rejecting mail matching a specific policy.
  • Amavis Integration Help
    • Anti-virus checks.
    • Anti-spam checks.
    • Banned filename checks.
    • Email header checks.
    • Message size limits.
    • Blacklist/whitelist senders.
    • Email interception (BCC).
  • Greylisting Help
    • Support for greylisting and masking sender IP addresses.
    • Support for auto-whitelisting and auto-greylisting based on count or count+percentage.
  • HELO/EHLO Checks Help
    • HELO/EHLO randomization prevention
    • Blacklisting of HELO/EHLO's ... those used by your own servers
    • Whitelisting of CIDR's which are known to be braindead
    • Check sending server HELO/EHLO for validity and RFC compliance.
  • SPF Checks Help
    • Check the SPF records of a domain and see if the inbound email is allowed or prohibited.
  • Quotas Help
    • Define message count quotas for policies.
    • Define cumulative size quotas for policies.
    • Track these quotas based on various methods, including sender IP block, sender user/domain/email address.
  • Postfix Integration
    • Setup and create transports.
    • Create mailboxes.
    • Create mailbox aliases.
    • Manage distribution groups.
postfix-cluebringer-2.0.10/webui/checkhelo-change.php0000644000175000017500000003133011204755337022426 0ustar nikolainikolai array( "Back to HELO checks" => "checkhelo-main.php" ), )); # Display change screen if ($_POST['frmaction'] == "change") { # Check a helo check was selected if (isset($_POST['checkhelo_id'])) { # Prepare statement $stmt = $db->prepare(' SELECT checkhelo.ID, checkhelo.PolicyID, checkhelo.Name, checkhelo.UseBlacklist, checkhelo.BlacklistPeriod, checkhelo.UseHRP, checkhelo.HRPPeriod, checkhelo.HRPLimit, checkhelo.RejectInvalid, checkhelo.RejectIP, checkhelo.RejectUnresolvable, checkhelo.Comment, checkhelo.Disabled, policies.Name AS PolicyName FROM checkhelo, policies WHERE checkhelo.ID = ? AND policies.ID = checkhelo.PolicyID '); ?>
execute(array($_POST['checkhelo_id'])); $row = $stmt->fetchObject(); $stmt->closeCursor(); ?>
Old Value New Value
Name name ?>
Link to policy policyname ?>
Blacklisting
Use Blacklist useblacklist) { case null: echo "Inherit"; break; case 1: echo "Yes"; break; case 0: echo "No"; break; default: echo "UNKNOWN"; break; } ?>
Blacklist Period blacklistperiod) ? '*inherited*' : $row->blacklistperiod ?>
Randomization Prevention
Use HRP usehrp) { case null: echo "Inherit"; break; case 1: echo "Yes"; break; case 0: echo "No"; break; default: echo "UNKNOWN"; break; } ?>
HRP Period hrpperiod) ? '*inherited*' : $row->hrpperiod ?>
HRP Limit hrplimit) ? '*inherited*' : $row->hrplimit ?>
Reject (RFC non-compliance)
Reject Invalid rejectinvalid) { case null: echo "Inherit"; break; case 1: echo "Yes"; break; case 0: echo "No"; break; default: echo "UNKNOWN"; break; } ?>
Reject non-literal IP rejectip) { case null: echo "Inherit"; break; case 1: echo "Yes"; break; case 0: echo "No"; break; default: echo "UNKNOWN"; break; } ?>
Reject Unresolvable rejectunresolvable) { case null: echo "Inherit"; break; case 1: echo "Yes"; break; case 0: echo "No"; break; default: echo "UNKNOWN"; break; } ?>
 
Comment comment ?>
Disabled disabled ? 'yes' : 'no' ?>

No HELO/EHLO check selected
quote($_POST['checkhelo_policyid'])); } if (!empty($_POST['checkhelo_name'])) { array_push($updates,"Name = ".$db->quote($_POST['checkhelo_name'])); } if (!empty($_POST['checkhelo_useblacklist'])) { if ($_POST['checkhelo_useblacklist'] == "1") { $useblacklist = null; } elseif ($_POST['checkhelo_useblacklist'] == "2") { $useblacklist = 1; } elseif ($_POST['checkhelo_useblacklist'] == "3") { $useblacklist = 0; } array_push($updates,"UseBlacklist = ".$db->quote($useblacklist)); } if (!empty($_POST['checkhelo_blacklistperiod_m'])) { if ($_POST['checkhelo_blacklistperiod_m'] == "1") { $blacklistperiod = null; } elseif ($_POST['checkhelo_blacklistperiod_m'] == "2") { $blacklistperiod = $_POST['checkhelo_blacklistperiod']; } array_push($updates,"BlacklistPeriod = ".$db->quote($blacklistperiod)); } if (!empty($_POST['checkhelo_usehrp'])) { if ($_POST['checkhelo_usehrp'] == "1") { $usehrp = null; } elseif ($_POST['checkhelo_usehrp'] == "2") { $usehrp = 1; } elseif ($_POST['checkhelo_usehrp'] == "3") { $usehrp = 0; } array_push($updates,"UseHRP = ".$db->quote($usehrp)); } if (!empty($_POST['checkhelo_hrpperiod_m'])) { if ($_POST['checkhelo_hrpperiod_m'] == "1") { $hrpperiod = null; } elseif ($_POST['checkhelo_hrpperiod_m'] == "2") { $hrpperiod = $_POST['checkhelo_hrpperiod']; } array_push($updates,"HRPPeriod = ".$db->quote($hrpperiod)); } if (!empty($_POST['checkhelo_hrplimit_m'])) { if ($_POST['checkhelo_hrplimit_m'] == "1") { $hrplimit = null; } elseif ($_POST['checkhelo_hrplimit_m'] == "2") { $hrplimit = $_POST['checkhelo_hrplimit']; } array_push($updates,"HRPLimit = ".$db->quote($hrplimit)); } if (!empty($_POST['checkhelo_rejectinvalid'])) { if ($_POST['checkhelo_rejectinvalid'] == "1") { $rejectinvalid = null; } elseif ($_POST['checkhelo_rejectinvalid'] == "2") { $rejectinvalid = 1; } elseif ($_POST['checkhelo_rejectinvalid'] == "3") { $rejectinvalid = 0; } array_push($updates,"RejectInvalid = ".$db->quote($rejectinvalid)); } if (!empty($_POST['checkhelo_rejectip'])) { if ($_POST['checkhelo_rejectip'] == "1") { $rejectip = null; } elseif ($_POST['checkhelo_rejectip'] == "2") { $rejectip = 1; } elseif ($_POST['checkhelo_rejectip'] == "3") { $rejectip = 0; } array_push($updates,"RejectIP = ".$db->quote($rejectip)); } if (!empty($_POST['checkhelo_rejectunresolvable'])) { if ($_POST['checkhelo_rejectunresolvable'] == "1") { $rejectunresolvable = null; } elseif ($_POST['checkhelo_rejectunresolvable'] == "2") { $rejectunresolvable = 1; } elseif ($_POST['checkhelo_rejectunresolvable'] == "3") { $rejectunresolvable = 0; } array_push($updates,"RejectUnresolvable = ".$db->quote($rejectunresolvable)); } if (!empty($_POST['checkhelo_comment'])) { array_push($updates,"Comment = ".$db->quote($_POST['checkhelo_comment'])); } if (isset($_POST['checkhelo_disabled']) && $_POST['checkhelo_disabled'] != "") { array_push($updates ,"Disabled = ".$db->quote($_POST['checkhelo_disabled'])); } # Check if we have updates if (sizeof($updates) > 0) { $updateStr = implode(', ',$updates); $res = $db->exec("UPDATE checkhelo SET $updateStr WHERE ID = ".$db->quote($_POST['checkhelo_id'])); if ($res) { ?>
HELO/EHLO check updated
Error updating HELO/EHLO check!
errorInfo()) ?>
No changes made to HELO/EHLO check
Invalid invocation
postfix-cluebringer-2.0.10/webui/postfix-distgroups-member-add.php0000644000175000017500000000462211177770474025162 0ustar nikolainikolai array( "Back to groups" => "postfix-distgroups-main.php", "Back to members" => "postfix-distgroups-member-main.php?postfix_group_id=".$_POST['postfix_group_id'], ), )); if ($_POST['frmaction'] == "add") { ?>
Email Address
prepare("INSERT INTO distribution_group_members (DistributionGroupID,Goto,Disabled) VALUES (?,?,0)"); $res = $stmt->execute(array( $_POST['postfix_group_id'], $_POST['postfix_group_member_goto'] )); if ($res) { ?>
Distribution group member created
Failed to create distribution group member
Invalid invocation
postfix-cluebringer-2.0.10/webui/policy-member-add.php0000644000175000017500000000620111177770474022557 0ustar nikolainikolai array( "Back to policies" => "policy-main.php", "Back to members" => "policy-member-main.php?policy_id=".$_REQUEST['policy_id'], ), )); if ($_POST['frmaction'] == "add") { ?>
Source
Destination
Comment
No policy ID, invalid invocation?
A blank member is useless?
prepare("INSERT INTO policy_members (PolicyID,Source,Destination,Comment,Disabled) VALUES (?,?,?,?,1)"); $res = $stmt->execute(array( $_POST['policy_id'], $_POST['member_source'], $_POST['member_destination'], $_POST['member_comment'] )); if ($res) { ?>
Policy member created
Failed to create policy member
errorInfo()) ?>
Invalid invocation
postfix-cluebringer-2.0.10/webui/checkhelo-blacklist-delete.php0000644000175000017500000000512611177770474024425 0ustar nikolainikolai array( "Back to blacklist" => "checkhelo-blacklist-main.php", ), )); # Display delete confirm screen if ($_POST['frmaction'] == "delete") { # Check a blacklisting was selected if (isset($_POST['blacklist_id'])) { ?>
Are you very sure?
No HELO/EHLO blacklisting selected
exec("DELETE FROM checkhelo_blacklist WHERE ID = ".$db->quote($_POST['blacklist_id'])); if ($res) { ?>
HELO/EHLO blacklist deleted
Error deleting HELO/EHLO blacklist!
errorInfo()) ?>
HELO/EHLO blacklist not deleted, aborted by user
Invocation error, no whitelist ID
Invalid invocation
postfix-cluebringer-2.0.10/webui/greylisting-whitelist-main.php0000644000175000017500000000554611177770474024574 0ustar nikolainikolai
Action

query($sql); while ($row = $res->fetchObject()) { ?> closeCursor(); ?>
Source Disabled
source ?> disabled ? 'yes' : 'no' ?>

postfix-cluebringer-2.0.10/webui/postfix-aliases-delete.php0000644000175000017500000000505311177770474023644 0ustar nikolainikolai array( "Back to Aliases" => "postfix-aliases-main.php", ), )); # Display delete confirm screen if ($_POST['frmaction'] == "delete") { # Check a Postfix alias was selected if (isset($_POST['postfix_alias_id'])) { ?>
Are you very sure?
No Postfix alias selected
exec("DELETE FROM aliases WHERE ID = ".$db->quote($_POST['postfix_alias_id'])); if ($res) { ?>
Postfix alias deleted
Error deleting Postfix alias!
errorInfo()) ?>
Postfix alias not deleted, aborted by user
Invocation error, no Postfix alias ID
Invalid invocation
postfix-cluebringer-2.0.10/webui/policy-group-change.php0000644000175000017500000000704311177770474023146 0ustar nikolainikolai array( "Back to groups" => "policy-group-main.php" ), )); # Display change screen if ($_POST['frmaction'] == "change") { # Check a policy was selected if (isset($_POST['policy_group_id'])) { # Prepare statement $stmt = $db->prepare('SELECT ID, Name, Disabled FROM policy_groups WHERE ID = ?'); ?>
execute(array($_POST['policy_group_id'])); $row = $stmt->fetchObject(); $stmt->closeCursor(); ?>
Old Value New Value
Name name ?>
Disabled disabled ? 'yes' : 'no' ?>

No policy selected
quote($_POST['policy_group_name'])); } if (isset($_POST['policy_group_disabled']) && $_POST['policy_group_disabled'] != "") { array_push($updates ,"Disabled = ".$db->quote($_POST['policy_group_disabled'])); } # Check if we have updates if (sizeof($updates) > 0) { $updateStr = implode(', ',$updates); $res = $db->exec("UPDATE policy_groups SET $updateStr WHERE ID = ".$db->quote($_POST['policy_group_id'])); if ($res) { ?>
Policy group updated
Error updating policy group!
errorInfo()) ?>
No changes made to policy group
Invalid invocation
postfix-cluebringer-2.0.10/webui/accesscontrol-main.php0000644000175000017500000000622511177770474023057 0ustar nikolainikolai
Action

query($sql); while ($row = $res->fetchObject()) { ?> closeCursor(); ?>
Policy Name Verdict Data Disabled
policyname ?> name ?> verdict ?> data ?> disabled ? 'yes' : 'no' ?>

postfix-cluebringer-2.0.10/webui/policy-main.php0000644000175000017500000000574711177770474021524 0ustar nikolainikolai
Action

query($sql); while ($row = $res->fetchObject()) { ?> closeCursor(); ?>
Name Priority Description Disabled
name ?> priority ?> description ?> disabled ? 'yes' : 'no' ?>

postfix-cluebringer-2.0.10/webui/checkspf-main.php0000644000175000017500000000560511177770474022004 0ustar nikolainikolai
Action

query($sql); while ($row = $res->fetchObject()) { ?> closeCursor(); ?>
Policy Name Disabled
policyname ?> name ?> disabled ? 'yes' : 'no' ?>

postfix-cluebringer-2.0.10/webui/policy-group-delete.php0000644000175000017500000000603511177770474023163 0ustar nikolainikolai array( "Back to groups" => "policy-group-main.php", ), )); # Display delete confirm screen if ($_POST['frmaction'] == "delete") { # Check a policy group was selected if (isset($_POST['policy_group_id'])) { ?>
Are you very sure?
No policy group selected
beginTransaction(); $res = $db->exec("DELETE FROM policy_group_members WHERE PolicyGroupID = ".$db->quote($_POST['policy_group_id'])); if ($res !== FALSE) { ?>
Policy group members deleted
Error deleting policy group members!
errorInfo()) ?>
rollback(); } if ($res !== FALSE) { $res = $db->exec("DELETE FROM policy_groups WHERE ID = ".$db->quote($_POST['policy_group_id'])); if ($res) { ?>
Policy group deleted
Error deleting policy group!
errorInfo()) ?>
rollback(); } } if ($res) { $db->commit(); } } else { ?>
Policy group not deleted, aborted by user
Invocation error, no policy group ID
Invalid invocation
postfix-cluebringer-2.0.10/webui/postfix-transports-delete.php0000644000175000017500000000515711177770474024447 0ustar nikolainikolai array( "Back to Transports" => "postfix-transports-main.php", ), )); # Display delete confirm screen if ($_POST['frmaction'] == "delete") { # Check a Postfix transport was selected if (isset($_POST['postfix_transport_id'])) { ?>
Are you very sure?
No Postfix transport selected
exec("DELETE FROM transports WHERE ID = ".$db->quote($_POST['postfix_transport_id'])); if ($res) { ?>
Postfix transport deleted
Error deleting Postfix transport!
errorInfo()) ?>
Postfix transport not deleted, aborted by user
Invocation error, no Postfix transport ID
Invalid invocation
postfix-cluebringer-2.0.10/webui/tooltips/0000755000175000017500000000000011312351142020404 5ustar nikolainikolaipostfix-cluebringer-2.0.10/webui/tooltips/bt.css0000644000175000017500000000053510770777616021557 0ustar nikolainikolai.tooltip { width: 200px; color: #00000; font: 11px Arial, sans-serif; font-weight: bold; text-decoration: none; text-align: center } .tooltip span.top { padding: 30px 8px 0; background: url(bt.gif) no-repeat top; } .tooltip b.bottom { padding:3px 8px 15px; color: #548912; background: url(bt.gif) no-repeat bottom; } postfix-cluebringer-2.0.10/webui/tooltips/BubbleTooltips.js0000644000175000017500000000477510771007143023717 0ustar nikolainikolai/*Javascript for Bubble Tooltips by Alessandro Fulciniti http://pro.html.it - http://web-graphics.com */ function enableTooltips(id,element){ var links,i,h; if (!element) element = "a"; if(!document.getElementById || !document.getElementsByTagName) return; AddCss(); h=document.createElement("span"); h.id="btc"; h.setAttribute("id","btc"); h.style.position="absolute"; document.getElementsByTagName("body")[0].appendChild(h); if(id==null) links=document.getElementsByTagName(element); else links=document.getElementById(id).getElementsByTagName(element); for(i=0;i28) l=l.substr(0,25)+"..."; //b.appendChild(document.createTextNode(l)); //b.appendChild(document.createTextNode("hello world")); tooltip.appendChild(b); setOpacity(tooltip); el.tooltip=tooltip; el.onmouseover=showTooltip; el.onmouseout=hideTooltip; el.onmousemove=Locate; } function showTooltip(e){ document.getElementById("btc").appendChild(this.tooltip); Locate(e); } function hideTooltip(e){ var d=document.getElementById("btc"); if(d.childNodes.length>0) d.removeChild(d.firstChild); } function setOpacity(el){ el.style.filter="alpha(opacity:95)"; el.style.KHTMLOpacity="0.95"; el.style.MozOpacity="0.95"; el.style.opacity="0.95"; } function CreateEl(t,c){ var x=document.createElement(t); x.className=c; x.style.display="block"; return(x); } function AddCss(){ var l=CreateEl("link"); l.setAttribute("type","text/css"); l.setAttribute("rel","stylesheet"); l.setAttribute("href","tooltips/bt.css"); l.setAttribute("media","screen"); document.getElementsByTagName("head")[0].appendChild(l); } function Locate(e){ var posx=0,posy=0; if(e==null) e=window.event; if(e.pageX || e.pageY){ posx=e.pageX; posy=e.pageY; } else if(e.clientX || e.clientY){ if(document.documentElement.scrollTop){ posx=e.clientX+document.documentElement.scrollLeft; posy=e.clientY+document.documentElement.scrollTop; } else{ posx=e.clientX+document.body.scrollLeft; posy=e.clientY+document.body.scrollTop; } } document.getElementById("btc").style.top=(posy+10)+"px"; document.getElementById("btc").style.left=(posx-20)+"px"; } postfix-cluebringer-2.0.10/webui/tooltips/bt.gif0000644000175000017500000000306210770777616021532 0ustar nikolainikolaiGIF89aÈ–ÌØàðáæðŠÄãéõŽ Æèìôìðøðóù÷øû’¤ÈÀË㘩̠°Ð–¨Ë®¼ÙÒÚé³ÀÙª¹×°¾ÚÉÒåÊÔèÇÐãíðö¿ÉàÜâî©·Öøùû!ù,È–ÿ &Ždižhª®lë¾p,Ïtmßx®ï|oBÀG,HM@ $ɨtJ--™‚İÊízoW¦ú-›Ï?&›° ßpn €TèÎB|Ï/Z˜X }‡ˆ6L‚x ‰“”,tŽ M •¡¢"LšœM £¯‰jŽŽN °»{M ›©Ž Mc¼Çgj©ËµktZÈÑ]jÕÕµbOÒÝRt Öâ©lÞéFà㚨š Ûnêô;¬íÖÂÅ õÿ7˜„÷¬Ú< $,s@A†A"JœH±¢Å‹ ©Â7Æ CŠI²$ ÿ [aA›É—±lã8nÌ›8sæl"FÂÊ=I¨@•Q[H*MÊt©Ó¤×hr´åŽ–Õ«X³jÝʵ«×¯`ÃxPB1 K\`Ò@¦TRãÊ•»in>rUÅêÝË·/ߨŽ@$  Ä ™T-+h·±ÔºŽ­9òK¹²eÊí\¦ƒoäÏ ?Ó Mº´iÇ£ÅÑJår¥á°Á=M›ô&ȵsëFÝn˜W‹(˜½»øÜº·+W•¼ùòÉÏ7BgÝ9õëÓ³o$ˆ7ñâ6NžcòòèÓ÷@LÁãÕ£/¿>ùrt¢àξ|úþHÛ>ð€€éˆàÿ‚¡ÆÄv §`„Ê%S…b¨acp]¸¡n~ø!ŠxZˆ&V¸‰‡)š†b‹²£h3Â˜ŠŒ5FöbŽâÈ#]?¦ècqíH¤zC¹ž’&ÉdMORèd”FFIÞ”VVi¥nX2©å–\b¦yc Ø¥’_–yÚ™^ªé›D¦é&ip)眑Õùãxæ)fŸ|ö9—ž<*è âiè¡4šã¢Œ6šèœF:Ž£5Vj饓º©é¦`:ã§ †Ú©š¤Z**Œ©nºê¨¥†Y¢§±îö*«µÖv«‰­ªzj™½º«ˆÁ2:,¯¹Òvì†Å ûë˜Í⹬†Ñö9-ÿ³É®ùl–Ù*»í–Õºy­ŠÝj;+¥åÒùí“áÎ9.†í–ùn„ñª9/…õ‚yï‚ù޹/ƒýZù¯€o90‚?y° G¹p€ +ùp}39±}y±z¹ñé†öñ|!«{.­%ûy2´)ƒ6r‚-;ö2yk¼.•176³q5¹3Í9Ûõón=ÿ8t†A[x3šI ½t›MKutnEó85ˆQKýtœYÇu5Õ]sôõ‰aKº2°e·3¶‹iã³6Ùm[ó¶mqsz6Ëu›z7·yW3wiUÏø7h×8xh…·x¸Ž}û½µ}/Î[ã’3žwåv%#æin"ç@Rþ8ÿ×—^hãz ¨ç"‚^$ꮇ^wì4±þ¹é{FŽ{¦°ïþ¨î{ã,zð|Ïî;®Ã«(ðª' )€E¯Úô’QUõØ_¯=„ÒgϽõàWáeä—oþùè§ÕaT0ÀûðïþWI]e‹Uïϯ¿úùÇŠüñóRX,¬AL ÈÀ:ðŒ 'HÁ Z0‚¯II.ÈÁzðƒ ¡HŒ g8H¡ WȺð…0Œ¡ gHÃÚð†8Ì¡ÁÃ=86; ¢‡HÄ"ñˆ+<‹HA‡à‰PŒ¢§HÅ*ZñŠXÌ¢·ÈÅ.zñ‹`ü¡ô ‚¯ ˜ŒhL£×ÈÆ6º±Šb¤@ â‘•àŽxÌ£÷ÈÇ>úñ€ ¤ IÈBòT1„s‚}¸#0ÉJRò’–Ì$&7©ÉNrò“ž %(G)ÊR’ò”¦L%*?Y– -&0€eBËZÚò–¸Ì¥.wÉË^úò—À ¦0@F€G?<ÁC2—©Ìf2ó™ÎŒ&4§)ÍjRóšÖÌ&6·©Ín2!))& B;postfix-cluebringer-2.0.10/webui/accesscontrol-delete.php0000644000175000017500000000507311177770474023375 0ustar nikolainikolai array( "Back to access cntrl" => "accesscontrol-main.php", ), )); # Display delete confirm screen if ($_POST['frmaction'] == "delete") { # Check a access control was selected if (isset($_POST['accesscontrol_id'])) { ?>
Are you very sure?
No access control selected
exec("DELETE FROM access_control WHERE ID = ".$db->quote($_POST['accesscontrol_id'])); if ($res) { ?>
Access control deleted
Error deleting access control!
errorInfo()) ?>
Access control not deleted, aborted by user
Invocation error, no access control ID
Invalid invocation
postfix-cluebringer-2.0.10/webui/policy-group-add.php0000644000175000017500000000455211177770474022453 0ustar nikolainikolai array( "Back to groups" => "policy-group-main.php", ), )); if ($_POST['frmaction'] == "add") { ?>
Name
Comment
prepare("INSERT INTO policy_groups (Name,Comment,Disabled) VALUES (?,?,1)"); $res = $stmt->execute(array( $_POST['policy_group_name'], $_POST['policy_group_comment'] )); if ($res) { ?>
Policy group created
Failed to create policy group
errorInfo()) ?>
Invalid invocation
postfix-cluebringer-2.0.10/webui/quotas-change.php0000644000175000017500000001642411227603235022016 0ustar nikolainikolai array( "Back to quotas" => "quotas-main.php" ), )); # Display change screen if ($_POST['frmaction'] == "change") { # Check a quota was selected if (isset($_POST['quota_id'])) { # Prepare statement $stmt = $db->prepare(' SELECT quotas.ID, quotas.PolicyID, quotas.Name, quotas.Track, quotas.Period, quotas.Verdict, quotas.Data, quotas.Comment, quotas.Disabled, policies.Name AS PolicyName FROM quotas, policies WHERE quotas.ID = ? AND policies.ID = quotas.PolicyID '); ?>
execute(array($_POST['quota_id'])); $row = $stmt->fetchObject(); $stmt->closeCursor(); ?>
Old Value New Value
Name name ?>
Link to policy policyname ?>
Track track ?>
Period period ?>
Verdict verdict ?>
Data data ?>
Comment comment ?>
Disabled disabled ? 'yes' : 'no' ?>

No quota selected
quote($_POST['quota_policyid'])); } if (!empty($_POST['quota_name'])) { array_push($updates,"Name = ".$db->quote($_POST['quota_name'])); } if (!empty($_POST['quota_track'])) { if ($_POST['quota_track'] == "SenderIP") { $quotaTrack = sprintf('%s:%s',$_POST['quota_track'],$_POST['quota_trackextra']); } else { $quotaTrack = $_POST['quota_track']; } array_push($updates,"Track = ".$db->quote($quotaTrack)); } if (!empty($_POST['quota_period'])) { array_push($updates,"Period = ".$db->quote($_POST['quota_period'])); } if (!empty($_POST['quota_verdict'])) { array_push($updates,"Verdict = ".$db->quote($_POST['quota_verdict'])); } if (!empty($_POST['quota_data'])) { array_push($updates,"Data = ".$db->quote($_POST['quota_data'])); } if (!empty($_POST['quota_comment'])) { array_push($updates,"Comment = ".$db->quote($_POST['quota_comment'])); } if (isset($_POST['quota_disabled']) && $_POST['quota_disabled'] != "") { array_push($updates ,"Disabled = ".$db->quote($_POST['quota_disabled'])); } # Check if we have updates if (sizeof($updates) > 0) { $updateStr = implode(', ',$updates); $res = $db->exec("UPDATE quotas SET $updateStr WHERE ID = ".$db->quote($_POST['quota_id'])); if ($res) { ?>
Quota updated
Error updating quota!
errorInfo()) ?>
No changes made to quota
Invalid invocation
postfix-cluebringer-2.0.10/webui/amavis-add.php0000644000175000017500000010245411177770474021302 0ustar nikolainikolai array( "Back to Amavis" => "amavis-main.php" ), )); # Process an option function process_post_option($option) { $results = array(); # Inherit if ($option == 0) { array_push($results,NULL); array_push($results,0); # Explicit yes } elseif ($option == 1) { array_push($results,1); array_push($results,2); # Explicit no } elseif ($option == 2) { array_push($results,0); array_push($results,2); } return $results; }; # Process a value function process_post_value($option,$value) { $results = array(); # Inherit if ($option == 0) { array_push($results,NULL); array_push($results,0); # Override } elseif ($option == 2) { array_push($results,$value); array_push($results,2); } return $results; }; # Process a list of items function process_post_list($option,$value) { $results = array(); # Inherit if ($option == 0) { array_push($results,NULL); array_push($results,0); # Merge } elseif ($option == 1) { array_push($results,$value); array_push($results,1); # Override } elseif ($option == 2) { array_push($results,$value); array_push($results,2); } return $results; }; if ($_POST['frmaction'] == "add") { ?>
Name
Link to policy
Bypass Checks
Virus
Banned File
Spam
Header
Anti-spam Settings
Tag Level
Tag2 Level
Tag3 Level
Kill Level
DSN Cutoff Level
Quarantine Cutoff Level
Modify Subject
Tag Subject
Tag2 Subject
Tag3 Subject
General Checks
Max Message Size (in Kbyte)
Banned Files
Whitelist & Blacklist
Sender Whitelist
Sender Blacklist
Admin Notifications
New Virus
Virus
Spam
Banned File
Bad Header
Quarantine
Virus
Spam
Banned File
Bad Header
Interception
BCC To
 
Comment
Policy ID cannot be empty
Name cannot be empty
prepare(" INSERT INTO amavis_rules ( PolicyID,Name, bypass_virus_checks, bypass_virus_checks_m, bypass_banned_checks, bypass_banned_checks_m, bypass_spam_checks, bypass_spam_checks_m, bypass_header_checks, bypass_header_checks_m, spam_tag_level, spam_tag_level_m, spam_tag2_level, spam_tag2_level_m, spam_tag3_level, spam_tag3_level_m, spam_kill_level, spam_kill_level_m, spam_dsn_cutoff_level, spam_dsn_cutoff_level_m, spam_quarantine_cutoff_level, spam_quarantine_cutoff_level_m, spam_modifies_subject, spam_modifies_subject_m, spam_tag_subject, spam_tag_subject_m, spam_tag2_subject, spam_tag2_subject_m, spam_tag3_subject, spam_tag3_subject_m, max_message_size, max_message_size_m, banned_files, banned_files_m, sender_whitelist, sender_whitelist_m, sender_blacklist, sender_blacklist_m, notify_admin_newvirus, notify_admin_newvirus_m, notify_admin_virus, notify_admin_virus_m, notify_admin_spam, notify_admin_spam_m, notify_admin_banned_file, notify_admin_banned_file_m, notify_admin_bad_header, notify_admin_bad_header_m, quarantine_virus, quarantine_virus_m, quarantine_spam, quarantine_spam_m, quarantine_banned_file, quarantine_banned_file_m, quarantine_bad_header, quarantine_bad_header_m, bcc_to, bcc_to_m, Comment, Disabled ) VALUES ( ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?, 1 )" ); if (!$stmt) { print_r( $db->errorInfo() ); } $res = $stmt->execute($dbinfo); if ($res) { ?>
Amavis rule created
Failed to create Amavis rule
errorInfo()) ?>
Invalid invocation
postfix-cluebringer-2.0.10/webui/accesscontrol-change.php0000644000175000017500000001364011210667457023351 0ustar nikolainikolai array( "Back to access cntrl" => "accesscontrol-main.php" ), )); # Display change screen if ($_POST['frmaction'] == "change") { # Check a access control was selected if (isset($_POST['accesscontrol_id'])) { # Prepare statement $stmt = $db->prepare(' SELECT access_control.ID, access_control.PolicyID, access_control.Name, access_control.Verdict, access_control.Data, access_control.Comment, access_control.Disabled, policies.Name AS PolicyName FROM access_control, policies WHERE access_control.ID = ? AND policies.ID = access_control.PolicyID '); ?>
execute(array($_POST['accesscontrol_id'])); $row = $stmt->fetchObject(); $stmt->closeCursor(); ?>
Old Value New Value
Name name ?>
Link to policy policyname ?>
Verdict verdict ?>
Data data ?>
Comment comment ?>
Disabled disabled ? 'yes' : 'no' ?>

No access control selected
quote($_POST['accesscontrol_policyid'])); } if (!empty($_POST['accesscontrol_name'])) { array_push($updates,"Name = ".$db->quote($_POST['accesscontrol_name'])); } if (!empty($_POST['accesscontrol_verdict'])) { array_push($updates,"Verdict = ".$db->quote($_POST['accesscontrol_verdict'])); } if (!empty($_POST['accesscontrol_data'])) { array_push($updates,"Data = ".$db->quote($_POST['accesscontrol_data'])); } if (!empty($_POST['accesscontrol_comment'])) { array_push($updates,"Comment = ".$db->quote($_POST['accesscontrol_comment'])); } if (isset($_POST['accesscontrol_disabled']) && $_POST['accesscontrol_disabled'] != "") { array_push($updates ,"Disabled = ".$db->quote($_POST['accesscontrol_disabled'])); } # Check if we have updates if (sizeof($updates) > 0) { $updateStr = implode(', ',$updates); $res = $db->exec("UPDATE access_control SET $updateStr WHERE ID = ".$db->quote($_POST['accesscontrol_id'])); if ($res) { ?>
Access control updated
Error updating access control!
errorInfo()) ?>
No changes made to access control
Invalid invocation
postfix-cluebringer-2.0.10/webui/policy-group-member-main.php0000644000175000017500000000665311177770474024120 0ustar nikolainikolai array( "Back to groups" => "policy-group-main.php" ), )); # Check a policy group was selected if (isset($_REQUEST['policy_group_id'])) { ?> prepare('SELECT Name FROM policy_groups WHERE ID = ?'); $policy_group_stmt->execute(array($_REQUEST['policy_group_id'])); $row = $policy_group_stmt->fetchObject(); $policy_group_stmt->closeCursor(); ?>
Policy Group: name ?>
Action

prepare('SELECT ID, Member, Disabled FROM policy_group_members WHERE PolicyGroupID = ?'); $res = $stmt->execute(array($_REQUEST['policy_group_id'])); $i = 0; # Loop with rows while ($row = $stmt->fetchObject()) { ?> closeCursor(); ?>
Member Disabled
member ?> disabled ? 'yes' : 'no' ?>

Invalid invocation
postfix-cluebringer-2.0.10/webui/postfix-distgroups-add.php0000644000175000017500000000622211177770474023713 0ustar nikolainikolai array( "Back to groups" => "postfix-distgroups-main.php", ), )); if ($_POST['frmaction'] == "add") { ?>
Mail Address @
Comment
prepare('SELECT ID, DomainName, Type, Transport, Disabled FROM transports WHERE ID = ?'); $res = $stmt->execute(array($_POST['postfix_transport_id'])); $row = $stmt->fetchObject(); $mailbox = $_POST['postfix_group_address'] . '@' . $row->domainname; $stmt = $db->prepare("INSERT INTO distribution_groups (TransportID,Address,MailAddress,Comment,Disabled) VALUES (?,?,?,?,0)"); $res = $stmt->execute(array( $row->id, $_POST['postfix_group_address'], $mailbox, $_POST['postfix_group_comment'] )); if ($res) { ?>
Distribution group created
Failed to create distribution group
errorInfo()) ?>
Invalid invocation
postfix-cluebringer-2.0.10/webui/accesscontrol-add.php0000644000175000017500000000752711210667457022663 0ustar nikolainikolai array( "Back to access cntrl" => "accesscontrol-main.php" ), )); if ($_POST['frmaction'] == "add") { ?>
Name
Link to policy
Verdict
Data
Comment
Policy ID cannot be empty
Name cannot be empty
Verdict cannot be empty
prepare("INSERT INTO access_control (PolicyID,Name,Verdict,Data,Comment,Disabled) VALUES (?,?,?,?,?,1)"); $res = $stmt->execute(array( $_POST['accesscontrol_policyid'], $_POST['accesscontrol_name'], $_POST['accesscontrol_verdict'], $_POST['accesscontrol_data'], $_POST['accesscontrol_comment'] )); if ($res) { ?>
Access control created
Failed to create access control
errorInfo()) ?>
Invalid invocation
postfix-cluebringer-2.0.10/webui/postfix-transports-add.php0000644000175000017500000000674411177770474023740 0ustar nikolainikolai array( "Back to Transports" => "postfix-transports-main.php", ), )); if ($_POST['frmaction'] == "add") { ?>
Domain Name
Type
Data
prepare("INSERT INTO transports (DomainName,Type,Transport,PTransport,Disabled) VALUES (?,?,?,?,0)"); # virtual if ($_POST['postfix_transport_type'] == "0") { $transport = $_POST['postfix_transport_domainname']; $ptransport = "virtual:$transport"; # smtp } elseif ($_POST['postfix_transport_type'] == "1") { $transport = $_POST['postfix_transport_data']; $ptransport = "smtp:$transport"; } $res = $stmt->execute(array( $_POST['postfix_transport_domainname'], $_POST['postfix_transport_type'], $transport, $ptransport )); if ($res) { ?>
Postfix transport created
Failed to create Postfix transport
errorInfo()) ?>
Invalid invocation
postfix-cluebringer-2.0.10/webui/greylisting-whitelist-delete.php0000644000175000017500000000515311177770474025104 0ustar nikolainikolai array( "Back to whitelist" => "greylisting-whitelist-main.php", ), )); # Display delete confirm screen if ($_POST['frmaction'] == "delete") { # Check a whitelisting was selected if (isset($_POST['whitelist_id'])) { ?>
Are you very sure?
No Greylisting whitelisting selected
exec("DELETE FROM greylisting_whitelist WHERE ID = ".$db->quote($_POST['whitelist_id'])); if ($res) { ?>
Greylisting whitelist deleted
Error deleting Greylisting whitelist!
errorInfo()) ?>
Greylisting whitelist not deleted, aborted by user
Invocation error, no whitelist ID
Invalid invocation
postfix-cluebringer-2.0.10/webui/postfix-distgroups-main.php0000644000175000017500000000551611177770474024114 0ustar nikolainikolai
Action

query($sql); while ($row = $res->fetchObject()) { ?> closeCursor(); ?>
Mail Address Disabled
mailaddress ?> disabled ? 'yes' : 'no' ?>

postfix-cluebringer-2.0.10/webui/amavis-change.php0000644000175000017500000012767311204755337022001 0ustar nikolainikolai array( "Back to Amavis" => "amavis-main.php" ), )); # Process an option function process_post_option($name,$option) { global $db; $results = array(); # Inherit if ($option == 0) { array_push($results,"$name = NULL"); array_push($results,"${name}_m = ".$db->quote(0)); # Explicit yes } elseif ($option == 1) { array_push($results,"$name = ".$db->quote(1)); array_push($results,"${name}_m = ".$db->quote(2)); # Explicit no } elseif ($option == 2) { array_push($results,"$name = ".$db->quote(0)); array_push($results,"${name}_m = ".$db->quote(2)); } return $results; }; # Process a value function process_post_value($name,$option,$value) { global $db; $results = array(); # Inherit if ($option == 0) { array_push($results,"$name = NULL"); array_push($results,"${name}_m = ".$db->quote(0)); # Override } elseif ($option == 2) { array_push($results,"$name = ".$db->quote($value)); array_push($results,"${name}_m = ".$db->quote(2)); } return $results; }; # Process a list of items function process_post_list($name,$option,$value) { global $db; $results = array(); # Inherit if ($option == 0) { array_push($results,"$name = NULL"); array_push($results,"${name}_m = ".$db->quote(0)); # Merge } elseif ($option == 1) { array_push($results,"$name = ".$db->quote($value)); array_push($results,"${name}_m = ".$db->quote(1)); # Override } elseif ($option == 2) { array_push($results,"$name = ".$db->quote($value)); array_push($results,"${name}_m = ".$db->quote(2)); } return $results; }; # Make a pretty db option function decode_db_option($option,$value) { $ret = "unknown"; if ($option == "0") { $ret = "Inherit"; # Overwrite } elseif ($option == "2") { # Check value if ($value == "0") { $ret = "No"; } elseif ($value == "1") { $ret = "Yes"; } } return $ret; } # Make a pretty db value function decode_db_value($option,$value) { $ret = "unknown"; if ($option == "0") { $ret = "Inherit"; # Merge } elseif ($option == "1") { $ret = "Merge: $value"; # Overwrite } elseif ($option == "2") { $ret = "Overwrite: $value"; } return $ret; } # Display change screen if ($_POST['frmaction'] == "change") { # Check a amavis rule was selected if (isset($_POST['amavis_id'])) { # Prepare statement $stmt = $db->prepare(' SELECT amavis_rules.ID, amavis_rules.PolicyID, amavis_rules.Name, amavis_rules.bypass_virus_checks, amavis_rules.bypass_virus_checks_m, amavis_rules.bypass_banned_checks, amavis_rules.bypass_banned_checks_m, amavis_rules.bypass_spam_checks, amavis_rules.bypass_spam_checks_m, amavis_rules.bypass_header_checks, amavis_rules.bypass_header_checks_m, amavis_rules.spam_tag_level, amavis_rules.spam_tag_level_m, amavis_rules.spam_tag2_level, amavis_rules.spam_tag2_level_m, amavis_rules.spam_tag3_level, amavis_rules.spam_tag3_level_m, amavis_rules.spam_kill_level, amavis_rules.spam_kill_level_m, amavis_rules.spam_dsn_cutoff_level, amavis_rules.spam_dsn_cutoff_level_m, amavis_rules.spam_quarantine_cutoff_level, amavis_rules.spam_quarantine_cutoff_level_m, amavis_rules.spam_modifies_subject, amavis_rules.spam_modifies_subject_m, amavis_rules.spam_tag_subject, amavis_rules.spam_tag_subject_m, amavis_rules.spam_tag2_subject, amavis_rules.spam_tag2_subject_m, amavis_rules.spam_tag3_subject, amavis_rules.spam_tag3_subject_m, amavis_rules.max_message_size, amavis_rules.max_message_size_m, amavis_rules.banned_files, amavis_rules.banned_files_m, amavis_rules.sender_whitelist, amavis_rules.sender_whitelist_m, amavis_rules.sender_blacklist, amavis_rules.sender_blacklist_m, amavis_rules.notify_admin_newvirus, amavis_rules.notify_admin_newvirus_m, amavis_rules.notify_admin_virus, amavis_rules.notify_admin_virus_m, amavis_rules.notify_admin_spam, amavis_rules.notify_admin_spam_m, amavis_rules.notify_admin_banned_file, amavis_rules.notify_admin_banned_file_m, amavis_rules.notify_admin_bad_header, amavis_rules.notify_admin_bad_header_m, amavis_rules.quarantine_virus, amavis_rules.quarantine_virus_m, amavis_rules.quarantine_spam, amavis_rules.quarantine_spam_m, amavis_rules.quarantine_banned_file, amavis_rules.quarantine_banned_file_m, amavis_rules.quarantine_bad_header, amavis_rules.quarantine_bad_header_m, amavis_rules.bcc_to, amavis_rules.bcc_to_m, amavis_rules.Comment, amavis_rules.Disabled, policies.Name AS PolicyName FROM amavis_rules, policies WHERE amavis_rules.ID = ? AND policies.ID = amavis_rules.PolicyID '); ?>
execute(array($_POST['amavis_id'])); $row = $stmt->fetchObject(); $stmt->closeCursor(); ?>
Old Value New Value
Name name ?>
Link to policy policyname ?>
Bypass Checks
Virus Checks bypass_virus_checks_m,$row->bypass_virus_checks) ?>
Banned File Checks bypass_banned_checks_m,$row->bypass_banned_checks) ?>
Spam Checks bypass_spam_checks_m,$row->bypass_spam_checks) ?>
Header Checks bypass_header_checks_m,$row->bypass_header_checks) ?>
Anti-spam Settings
Tag Level spam_tag_level_m,$row->spam_tag_level) ?>
Tag2 Level spam_tag2_level_m,$row->spam_tag2_level) ?>
Tag3 Level spam_tag3_level_m,$row->spam_tag3_level) ?>
Kill Level spam_kill_level_m,$row->spam_kill_level) ?>
DSN Cutoff Level spam_dsn_cutoff_level_m,$row->spam_dsn_cutoff_level) ?>
Quarantine Cutoff Level spam_quarantine_cutoff_level_m,$row->spam_quarantine_cutoff_level) ?>
Modify Subject spam_modifies_subject_m,$row->spam_modifies_subject) ?>
Tag Subject spam_tag_subject_m,$row->spam_tag_subject) ?>
Tag2 Subject spam_tag2_subject_m,$row->spam_tag2_subject) ?>
Tag3 Subject spam_tag3_subject_m,$row->spam_tag3_subject) ?>
General Checks
Max Message Size (Kbyte) max_message_size_m,$row->max_message_size) ?>
Banned Files banned_files_m,$row->banned_files) ?>
Whitelist & Blacklist
Sender Whitelist sender_whitelist_m,$row->sender_whitelist) ?>
Sender Blacklist sender_blacklist_m,$row->sender_blacklist) ?>
Admin Notifications
New Virus notify_admin_newvirus_m,$row->notify_admin_newvirus) ?>
Virus notify_admin_virus_m,$row->notify_admin_virus) ?>
Spam notify_admin_spam_m,$row->notify_admin_spam) ?>
Banned File notify_admin_banned_file_m,$row->notify_admin_banned_file) ?>
Bad Header notify_admin_bad_header_m,$row->notify_admin_bad_header) ?>
Quarantine
Virus quarantine_virus_m,$row->quarantine_virus) ?>
Spam quarantine_spam_m,$row->quarantine_spam) ?>
Banned File quarantine_banned_file_m,$row->quarantine_banned_file) ?>
Bad Header quarantine_bad_header_m,$row->quarantine_bad_header) ?>
Interception
BCC To bcc_to_m,$row->bcc_to) ?>
 
Comment comment ?>
Disabled disabled ? 'yes' : 'no' ?>

No Amavis rule selected
quote($_POST['amavis_policyid'])); } if (!empty($_POST['amavis_name'])) { array_push($updates,"Name = ".$db->quote($_POST['amavis_name'])); } # Bypass options if (isset($_POST['amavis_bypass_virus_checks']) && $_POST['amavis_bypass_virus_checks'] != "") { $res = process_post_option('bypass_virus_checks',$_POST['amavis_bypass_virus_checks']); $updates = array_merge($updates,$res); } if (isset($_POST['amavis_bypass_banned_checks']) && $_POST['amavis_bypass_banned_checks'] != "") { $res = process_post_option('bypass_banned_checks',$_POST['amavis_bypass_banned_checks']); $updates = array_merge($updates,$res); } if (isset($_POST['amavis_bypass_spam_checks']) && $_POST['amavis_bypass_spam_checks'] != "") { $res = process_post_option('bypass_spam_checks',$_POST['amavis_bypass_spam_checks']); $updates = array_merge($updates,$res); } if (isset($_POST['amavis_bypass_header_checks']) && $_POST['amavis_bypass_header_checks'] != "") { $res = process_post_option('bypass_header_checks',$_POST['amavis_bypass_header_checks']); $updates = array_merge($updates,$res); } # Antispam level if (isset($_POST['amavis_spam_tag_level_mode']) && $_POST['amavis_spam_tag_level_mode'] != "") { $res = process_post_value('spam_tag_level',$_POST['amavis_spam_tag_level_mode'], isset($_POST['amavis_spam_tag_level']) ? $_POST['amavis_spam_tag_level'] : '' ); $updates = array_merge($updates,$res); } if (isset($_POST['amavis_spam_tag2_level_mode']) && $_POST['amavis_spam_tag2_level_mode'] != "") { $res = process_post_value('spam_tag2_level',$_POST['amavis_spam_tag2_level_mode'], isset($_POST['amavis_spam_tag2_level']) ? $_POST['amavis_spam_tag2_level'] : '' ); $updates = array_merge($updates,$res); } if (isset($_POST['amavis_spam_tag3_level_mode']) && $_POST['amavis_spam_tag3_level_mode'] != "") { $res = process_post_value('spam_tag3_level',$_POST['amavis_spam_tag3_level_mode'], isset($_POST['amavis_spam_tag3_level']) ? $_POST['amavis_spam_tag3_level'] : '' ); $updates = array_merge($updates,$res); } if (isset($_POST['amavis_spam_kill_level_mode']) && $_POST['amavis_spam_kill_level_mode'] != "") { $res = process_post_value('spam_kill_level',$_POST['amavis_spam_kill_level_mode'], isset($_POST['amavis_spam_kill_level']) ? $_POST['amavis_spam_kill_level'] : '' ); $updates = array_merge($updates,$res); } if (isset($_POST['amavis_spam_dsn_cutoff_level_mode']) && $_POST['amavis_spam_dsn_cutoff_level_mode'] != "") { $res = process_post_value('spam_dsn_cutoff_level',$_POST['amavis_spam_dsn_cutoff_level_mode'], isset($_POST['amavis_spam_dsn_cutoff_level']) ? $_POST['amavis_spam_dsn_cutoff_level'] : '' ); $updates = array_merge($updates,$res); } if (isset($_POST['amavis_spam_quarantine_cutoff_level_mode']) && $_POST['amavis_spam_quarantine_cutoff_level_mode'] != "") { $res = process_post_value('spam_quarantine_cutoff_level',$_POST['amavis_spam_quarantine_cutoff_level_mode'], isset($_POST['amavis_spam_quarantine_cutoff_level']) ? $_POST['amavis_spam_quarantine_cutoff_level'] : '' ); $updates = array_merge($updates,$res); } if (isset($_POST['amavis_spam_modifies_subject']) && $_POST['amavis_spam_modifies_subject'] != "") { $res = process_post_option('spam_modifies_subject',$_POST['amavis_spam_modifies_subject']); $updates = array_merge($updates,$res); } if (isset($_POST['amavis_spam_tag_subject_mode']) && $_POST['amavis_spam_tag_subject_mode'] != "") { $res = process_post_value('spam_tag_subject',$_POST['amavis_spam_tag_subject_mode'], isset($_POST['amavis_spam_tag_subject']) ? $_POST['amavis_spam_tag_subject'] : '' ); $updates = array_merge($updates,$res); } if (isset($_POST['amavis_spam_tag2_subject_mode']) && $_POST['amavis_spam_tag2_subject_mode'] != "") { $res = process_post_value('spam_tag2_subject',$_POST['amavis_spam_tag2_subject_mode'], isset($_POST['amavis_spam_tag2_subject']) ? $_POST['amavis_spam_tag2_subject'] : '' ); $updates = array_merge($updates,$res); } if (isset($_POST['amavis_spam_tag3_subject_mode']) && $_POST['amavis_spam_tag3_subject_mode'] != "") { $res = process_post_value('spam_tag3_subject',$_POST['amavis_spam_tag3_subject_mode'], isset($_POST['amavis_spam_tag3_subject']) ? $_POST['amavis_spam_tag3_subject'] : '' ); $updates = array_merge($updates,$res); } # General if (isset($_POST['amavis_max_message_size_mode']) && $_POST['amavis_max_message_size_mode'] != "") { $res = process_post_value('max_message_size',$_POST['amavis_max_message_size_mode'], isset($_POST['amavis_max_message_size']) ? $_POST['amavis_max_message_size'] : '' ); $updates = array_merge($updates,$res); } if (isset($_POST['amavis_banned_files_mode']) && $_POST['amavis_banned_files_mode'] != "") { $res = process_post_list('banned_files',$_POST['amavis_banned_files_mode'], isset($_POST['amavis_banned_files']) ? $_POST['amavis_banned_files'] : '' ); $updates = array_merge($updates,$res); } # Whitelist & blacklist if (isset($_POST['amavis_sender_whitelist_mode']) && $_POST['amavis_sender_whitelist_mode'] != "") { $res = process_post_list('sender_whitelist',$_POST['amavis_sender_whitelist_mode'], isset($_POST['amavis_sender_whitelist']) ? $_POST['amavis_sender_whitelist'] : '' ); $updates = array_merge($updates,$res); } if (isset($_POST['amavis_sender_blacklist_mode']) && $_POST['amavis_sender_blacklist_mode'] != "") { $res = process_post_list('sender_blacklist',$_POST['amavis_sender_blacklist_mode'], isset($_POST['amavis_sender_blacklist']) ? $_POST['amavis_sender_blacklist'] : '' ); $updates = array_merge($updates,$res); } # Notifications if (isset($_POST['amavis_notify_admin_newvirus_mode']) && $_POST['amavis_notify_admin_newvirus_mode'] != "") { $res = process_post_value('notify_admin_newvirus',$_POST['amavis_notify_admin_newvirus_mode'], isset($_POST['amavis_notify_admin_newvirus']) ? $_POST['amavis_notify_admin_newvirus'] : '' ); $updates = array_merge($updates,$res); } if (isset($_POST['amavis_notify_admin_virus_mode']) && $_POST['amavis_notify_admin_virus_mode'] != "") { $res = process_post_value('notify_admin_virus',$_POST['amavis_notify_admin_virus_mode'], isset($_POST['amavis_notify_admin_virus']) ? $_POST['amavis_notify_admin_virus'] : '' ); $updates = array_merge($updates,$res); } if (isset($_POST['amavis_notify_admin_spam_mode']) && $_POST['amavis_notify_admin_spam_mode'] != "") { $res = process_post_value('notify_admin_spam',$_POST['amavis_notify_admin_spam_mode'], isset($_POST['amavis_notify_admin_spam']) ? $_POST['amavis_notify_admin_spam'] : '' ); $updates = array_merge($updates,$res); } if (isset($_POST['amavis_notify_admin_banned_file_mode']) && $_POST['amavis_notify_admin_banned_file_mode'] != "") { $res = process_post_value('notify_admin_banned_file',$_POST['amavis_notify_admin_banned_file_mode'], isset($_POST['amavis_notify_admin_banned_file']) ? $_POST['amavis_notify_admin_banned_file'] : '' ); $updates = array_merge($updates,$res); } if (isset($_POST['amavis_notify_admin_bad_header_mode']) && $_POST['amavis_notify_admin_bad_header_mode'] != "") { $res = process_post_value('notify_admin_bad_header',$_POST['amavis_notify_admin_bad_header_mode'], isset($_POST['amavis_notify_admin_bad_header']) ? $_POST['amavis_notify_admin_bad_header'] : '' ); $updates = array_merge($updates,$res); } # Quarantine if (isset($_POST['amavis_quarantine_virus_mode']) && $_POST['amavis_quarantine_virus_mode'] != "") { $res = process_post_value('quarantine_virus',$_POST['amavis_quarantine_virus_mode'], isset($_POST['amavis_quarantine_virus']) ? $_POST['amavis_quarantine_virus'] : '' ); $updates = array_merge($updates,$res); } if (isset($_POST['amavis_quarantine_spam_mode']) && $_POST['amavis_quarantine_spam_mode'] != "") { $res = process_post_value('quarantine_spam',$_POST['amavis_quarantine_spam_mode'], isset($_POST['amavis_quarantine_spam']) ? $_POST['amavis_quarantine_spam'] : '' ); $updates = array_merge($updates,$res); } if (isset($_POST['amavis_quarantine_banned_file_mode']) && $_POST['amavis_quarantine_banned_file_mode'] != "") { $res = process_post_value('quarantine_banned_file',$_POST['amavis_quarantine_banned_file_mode'], isset($_POST['amavis_quarantine_banned_file']) ? $_POST['amavis_quarantine_banned_file'] : '' ); $updates = array_merge($updates,$res); } if (isset($_POST['amavis_quarantine_bad_header_mode']) && $_POST['amavis_quarantine_bad_header_mode'] != "") { $res = process_post_value('quarantine_bad_header',$_POST['amavis_quarantine_bad_header_mode'], isset($_POST['amavis_quarantine_bad_header']) ? $_POST['amavis_quarantine_bad_header'] : '' ); $updates = array_merge($updates,$res); } # Interception if (isset($_POST['amavis_bcc_to_mode']) && $_POST['amavis_bcc_to_mode'] != "") { $res = process_post_value('bcc_to',$_POST['amavis_bcc_to_mode'], isset($_POST['amavis_bcc_to']) ? $_POST['amavis_bcc_to'] : '' ); $updates = array_merge($updates,$res); } # Whatever is left over if (!empty($_POST['amavis_comment'])) { array_push($updates,"Comment = ".$db->quote($_POST['amavis_comment'])); } if (isset($_POST['amavis_disabled']) && $_POST['amavis_disabled'] != "") { array_push($updates ,"Disabled = ".$db->quote($_POST['amavis_disabled'])); } # Check if we have updates if (sizeof($updates) > 0) { $updateStr = implode(', ',$updates); $res = $db->exec("UPDATE amavis_rules SET $updateStr WHERE ID = ".$db->quote($_POST['amavis_id'])); if ($res) { ?>
Amavis rule updated
Error updating Amavis rule!
errorInfo()) ?>
No changes made to Amavis rule
Invalid invocation
postfix-cluebringer-2.0.10/webui/quotas-main.php0000644000175000017500000000670111177770474021530 0ustar nikolainikolai
Action

query($sql); while ($row = $res->fetchObject()) { ?> closeCursor(); ?>
Policy Name Track Period Verdict Data Disabled
policyname ?> name ?> track ?> period ?> verdict ?> data ?> disabled ? 'yes' : 'no' ?>

postfix-cluebringer-2.0.10/webui/postfix-aliases-main.php0000644000175000017500000000532211177770474023325 0ustar nikolainikolai
Action

query($sql); while ($row = $res->fetchObject()) { ?> closeCursor(); ?>
Alias Destination Disabled
mailaddress ?> goto ?> disabled ? 'yes' : 'no' ?>

postfix-cluebringer-2.0.10/webui/postfix-transports-main.php0000644000175000017500000000536311177770474024130 0ustar nikolainikolai
Action

query($sql); while ($row = $res->fetchObject()) { ?> closeCursor(); ?>
Domain Transport Disabled
domainname ?> ptransport ?> disabled ? 'yes' : 'no' ?>

postfix-cluebringer-2.0.10/webui/checkhelo-whitelist-delete.php0000644000175000017500000000512711177770474024472 0ustar nikolainikolai array( "Back to whitelist" => "checkhelo-whitelist-main.php", ), )); # Display delete confirm screen if ($_POST['frmaction'] == "delete") { # Check a whitelisting was selected if (isset($_POST['whitelist_id'])) { ?>
Are you very sure?
No HELO/EHLO whitelisting selected
exec("DELETE FROM checkhelo_whitelist WHERE ID = ".$db->quote($_POST['whitelist_id'])); if ($res) { ?>
HELO/EHLO whitelist deleted
Error deleting HELO/EHLO whitelist!
errorInfo()) ?>
HELO/EHLO whitelist not deleted, aborted by user
Invocation error, no whitelist ID
Invalid invocation
postfix-cluebringer-2.0.10/webui/postfix-aliases-change.php0000644000175000017500000000746411177770474023637 0ustar nikolainikolai array( "Back to Aliases" => "postfix-aliases-main.php" ), )); # Display change screen if ($_POST['frmaction'] == "change") { # Check a alias was selected if (isset($_POST['postfix_alias_id'])) { # Prepare statement $stmt = $db->prepare('SELECT ID, MailAddress, Goto, Disabled FROM aliases WHERE ID = ?'); ?>
execute(array($_POST['postfix_alias_id'])); $row = $stmt->fetchObject(); $stmt->closeCursor(); ?>
Old Value New Value
Alias Address mailaddress ?>
Goto goto ?>
Disabled disabled ? 'yes' : 'no' ?>

No alias selected
quote($_POST['postfix_alias_goto'])); } if (isset($_POST['postfix_alias_disabled']) && $_POST['postfix_alias_disabled'] != "") { array_push($updates ,"Disabled = ".$db->quote($_POST['postfix_alias_disabled'])); } # Check if we have updates if (sizeof($updates) > 0) { $updateStr = implode(', ',$updates); $res = $db->exec("UPDATE aliases SET $updateStr WHERE ID = ".$db->quote($_POST['postfix_alias_id'])); if ($res) { ?>
Postfix alias updated
Error updating Postfix alias!
errorInfo()) ?>
No changes made to Postfix alias
Invalid invocation
postfix-cluebringer-2.0.10/webui/checkhelo-blacklist-add.php0000644000175000017500000000501111177770474023704 0ustar nikolainikolai array( "Back to blacklist" => "checkhelo-blacklist-main.php" ), )); if ($_POST['frmaction'] == "add") { ?>
Helo
Comment
Helo cannot be empty
prepare("INSERT INTO checkhelo_blacklist (Helo,Comment,Disabled) VALUES (?,?,1)"); $res = $stmt->execute(array( $_POST['blacklist_helo'], $_POST['blacklist_comment'] )); if ($res) { ?>
HELO/EHLO blacklist created
Failed to create HELO/EHLO blacklisting
errorInfo()) ?>
Invalid invocation
postfix-cluebringer-2.0.10/webui/greylisting-whitelist-add.php0000644000175000017500000000533011177770474024367 0ustar nikolainikolai array( "Back to whitelist" => "greylisting-whitelist-main.php" ), )); if ($_POST['frmaction'] == "add") { ?>
Source
Comment
Source cannot be empty
prepare("INSERT INTO greylisting_whitelist (Source,Comment,Disabled) VALUES (?,?,1)"); $res = $stmt->execute(array( $_POST['whitelist_type'] . ":" . $_POST['whitelist_source'], $_POST['whitelist_comment'] )); if ($res) { ?>
Greylisting whitelist created
Failed to create Greylisting whitelisting
errorInfo()) ?>
Invalid invocation
postfix-cluebringer-2.0.10/webui/postfix-distgroups-delete.php0000644000175000017500000000605711177770474024433 0ustar nikolainikolai array( "Back to groups" => "postfix-distgroups-main.php", ), )); # Display delete confirm screen if ($_POST['frmaction'] == "delete") { # Check a postfix group was selected if (isset($_POST['postfix_group_id'])) { ?>
Are you very sure?
No distribution group selected
exec("DELETE FROM distribution_group_members WHERE DistributionGroupID = ".$db->quote($_POST['postfix_group_id'])); if ($res !== FALSE) { ?>
Distribution group members deleted
Error deleting distribution group members!
errorInfo()) ?>
rollback(); } if ($res !== FALSE) { $res = $db->exec("DELETE FROM distribution_groups WHERE ID = ".$db->quote($_POST['postfix_group_id'])); if ($res) { ?>
Distribution group deleted
Error deleting distribution group!
errorInfo()) ?>
Distribution group not deleted, aborted by user
Invocation error, no distribution group ID
Invalid invocation
postfix-cluebringer-2.0.10/webui/checkhelo-whitelist-change.php0000644000175000017500000001061011204755337024436 0ustar nikolainikolai array( "Back to whitelist" => "checkhelo-whitelist-main.php" ), )); # Display change screen if ($_POST['frmaction'] == "change") { # Check a whitelist was selected if (isset($_POST['whitelist_id'])) { # Prepare statement $stmt = $db->prepare(' SELECT checkhelo_whitelist.ID, checkhelo_whitelist.Source, checkhelo_whitelist.Comment, checkhelo_whitelist.Disabled FROM checkhelo_whitelist WHERE checkhelo_whitelist.ID = ? '); ?>
execute(array($_POST['whitelist_id'])); $row = $stmt->fetchObject(); $stmt->closeCursor(); ?>
Old Value New Value
Source source ?>
Comment comment ?>
Disabled disabled ? 'yes' : 'no' ?>

No whitelisting selected
quote($_POST['whitelist_type'].":".$_POST['whitelist_source'])); } if (!empty($_POST['whitelist_comment'])) { array_push($updates,"Comment = ".$db->quote($_POST['whitelist_comment'])); } if (isset($_POST['whitelist_disabled']) && $_POST['whitelist_disabled'] != "") { array_push($updates ,"Disabled = ".$db->quote($_POST['whitelist_disabled'])); } # Check if we have updates if (sizeof($updates) > 0) { $updateStr = implode(', ',$updates); $res = $db->exec("UPDATE checkhelo_whitelist SET $updateStr WHERE ID = ".$db->quote($_POST['whitelist_id'])); if ($res) { ?>
HELO/EHLO whitelisting updated
Error updating HELO/EHLO whitelisting!
No changes made to HELO/EHLO whitelisting
errorInfo()) ?>
Invalid invocation
postfix-cluebringer-2.0.10/webui/policy-add.php0000644000175000017500000000553111177770474021317 0ustar nikolainikolai array( "Back to policies" => "policy-main.php" ), )); if ($_POST['frmaction'] == "add") { ?>
Name
Priority
Description
Policy name cannot be empty
Policy priority cannot be empty
Policy description cannot be empty
prepare("INSERT INTO policies (Name,Priority,Description,Disabled) VALUES (?,?,?,1)"); $res = $stmt->execute(array( $_POST['policy_name'], $_POST['policy_priority'], $_POST['policy_description'] )); if ($res) { ?>
Policy created
Failed to create policy
errorInfo()) ?>
Invalid invocation
postfix-cluebringer-2.0.10/cluebringer.spec0000644000175000017500000001050111312347456020603 0ustar nikolainikolai%define apacheconfdir %{_sysconfdir}/httpd/conf.d # this path is hardcoded %define cblibdir %{_libdir}/policyd-2.0 %define version 2.0.10 %define release 1 %define tarver %{version} Summary: Postfix Policy Daemon Name: cluebringer Version: %{version} Release: %{release} License: GPLv2 Group: System/Daemons URL: http://www.policyd.org Source0: http://downloads.sourceforge.net/policyd/%{name}-%{tarver}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildArch: noarch Provides: cbpolicyd Provides: policyd = %{version} Obsoletes: policyd Requires: perl(Net::Server), perl(Config::IniFiles), perl(Cache::FastMmap), httpd %description Policyd v2 (codenamed "cluebringer") is a multi-platform policy server for popular MTAs. This policy daemon is designed mostly for large scale mail hosting environments. The main goal is to implement as many spam combating and email compliance features as possible while at the same time maintaining the portability, stability and performance required for mission critical email hosting of today. Most of the ideas and methods implemented in Policyd v2 stem from Policyd v1 as well as the authors' long time involvement in large scale mail hosting industry. %prep %setup -q -n %{name}-%{tarver} # hack to prevent rpmbuild from automatically detecting "requirements" that # aren't actually external requirements. See https://fedoraproject.org/wiki/Packaging/Perl#In_.25prep_.28preferred.29 cat << EOF > %{name}-req #!/bin/sh %{__perl_requires} $* | sed -e '/perl(cbp::/d' EOF %define __perl_requires %{_builddir}/%{name}-%{tarver}/%{name}-req chmod +x %{__perl_requires} %build cd database for db_type in mysql4 mysql pgsql sqlite; do ./convert-tsql ${db_type} core.tsql > policyd.${db_type}.sql for file in `find . -name \*.tsql -and -not -name core.tsql`; do ./convert-tsql ${db_type} ${file} done >> policyd.${db_type}.sql cd whitelists ./parse-checkhelo-whitelist >> policyd.${db_type}.sql ./parse-greylisting-whitelist >> policyd.${db_type}.sql cd .. done %install rm -rf $RPM_BUILD_ROOT # cbpolicyd mkdir -p $RPM_BUILD_ROOT%{cblibdir} mkdir -p $RPM_BUILD_ROOT%{_sbindir} mkdir -p $RPM_BUILD_ROOT%{_initrddir} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/policyd cp -R cbp $RPM_BUILD_ROOT%{cblibdir} install -m 755 cbpolicyd cbpadmin database/convert-tsql $RPM_BUILD_ROOT%{_sbindir} install -m 644 cluebringer.conf $RPM_BUILD_ROOT%{_sysconfdir}/policyd/cluebringer.conf install -m 755 contrib/initscripts/Fedora/cbpolicyd $RPM_BUILD_ROOT%{_initrddir} # Webui mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/webui mkdir -p $RPM_BUILD_ROOT%{apacheconfdir} cp -R webui/* $RPM_BUILD_ROOT%{_datadir}/%{name}/webui/ install -m 644 contrib/httpd/cluebringer-httpd.conf $RPM_BUILD_ROOT%{apacheconfdir}/cluebringer.conf # Move config into /etc mv $RPM_BUILD_ROOT%{_datadir}/%{name}/webui/includes/config.php $RPM_BUILD_ROOT%{_sysconfdir}/policyd/webui.conf ln -s %{_sysconfdir}/policyd/webui.conf $RPM_BUILD_ROOT%{_datadir}/%{name}/webui/includes/config.php chmod 0640 $RPM_BUILD_ROOT%{_sysconfdir}/policyd/webui.conf # Docdir mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/contrib mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/database install -m 644 AUTHORS INSTALL LICENSE TODO WISHLIST CHANGELOG $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} cp -R contrib $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/contrib/amavisd-new install -m 644 database/*.sql $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/database %post /sbin/chkconfig --add cbpolicyd %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc %{_docdir}/%{name}-%{version} %{cblibdir}/ %{_sbindir}/cbpolicyd %{_sbindir}/cbpadmin %{_sbindir}/convert-tsql %{_initrddir}/cbpolicyd %dir %{_datadir}/%{name} %attr(-,root,apache) %{_datadir}/%{name}/webui/ %dir %{_sysconfdir}/policyd %config(noreplace) %{_sysconfdir}/policyd/cluebringer.conf %attr(-,root,apache) %config(noreplace) %{_sysconfdir}/policyd/webui.conf %config(noreplace) %{apacheconfdir}/cluebringer.conf %changelog * Wed Oct 14 2009 Nigel Kukard - 2.0.8 release * Tue May 05 2009 Nigel Kukard - 2.0.7 release * Tue Jan 06 2009 Nigel Kukard - 2.0.6 release * Wed Nov 19 2008 Nigel Kukard - Various updates and changes * Tue Nov 18 2008 Christopher St Pierre - - Initial build. postfix-cluebringer-2.0.10/INSTALL0000644000175000017500000000444711302736214016464 0ustar nikolainikolaiInstalling Policyd v2. * Requirements for Policyd v2 - MySQL or PostgreSQL or SQLite - Net::Server >= 0.96 - Net::CIDR - Config::IniFiles (Debian based: libconfig-inifiles-perl, RPM based: perl-Config-IniFiles) - Cache::FastMmap (Debian based: libcache-fastmmap-perl, RPM based: perl-Cache-FastMmap) - Mail::SPF (Required for CheckSPF module) * Requirements for webui - PHP v5+ (compiled with PDO support for your DB) 1. Setup MySQL (or whichever database you plan to use) a. In database/ run... $ for i in core.tsql access_control.tsql quotas.tsql amavis.tsql checkhelo.tsql checkspf.tsql greylisting.tsql $ do $ ./convert-tsql mysql $i $ done > policyd.mysql This will build policyd.mysql, be sure to ALWAYS load core.tsql first, you only really need the schema for the modules you plan to use, no harm in adding all of them though. b. Load policyd.mysql into MySQL $ mysql -u root -p policyd < policyd.mysql 2. Put cluebringer.conf in your /etc directory and adjust cluebringer.conf with your MySQL database details 3. Copy the cbp/ directory into /usr/local/lib/policyd-2.0/ mkdir /usr/local/lib/policyd-2.0 cp -r cbp /usr/local/lib/policyd-2.0/ 4. Copy cbpolicyd and cbpadmin into /usr/local/bin cp cbpadmin /usr/local/bin/ cp cbpolicyd /usr/local/sbin/ 5. Install the webui/* into your apache directory, check out includes/config.php and adjust the MySQL server details. 6. Setup Postfix to use cbpolicyd... Add the following Postfix config... check_policy_service inet:127.0.0.1:10031 in BOTH smtpd_recipient_restrictions and smtpd_end_of_data_restrictions. ** Optional Amavisd Supprt *** 7. Copy your amavisd from /usr/sbin/amavisd and patch it with contrib/amavisd-new-2.5.3_policyd-200802070918.patch like this... $ patch < contrib/amavisd-new-2.5.3_policyd-200802070918.patch After this change your initscripts to start the patched amavisd. 8. Copy amavisd-policyd.pm where you see fit, and add this configuration line to your amavisd.conf file... include_config_files('/path/to/amavisd-policyd.pm'); 9. Edit the top of amavisd-policyd.pm and change ... use lib('/root/cluebringer-trunk'); # to point to the directory which contains cbp/ my $DB_dsn = "DBI:mysql:database=policyd;host=localhost"; # to point to your MySQL DB 10. Fire everything up and browse to the web gui to configure postfix-cluebringer-2.0.10/cluebringer.conf0000644000175000017500000000622311302736214020575 0ustar nikolainikolai# # Server configuration # [server] # Protocols to load protocols=< postfix-cluebringer-2.0.10/cbpolicyd0000755000175000017500000004477511243453537017351 0ustar nikolainikolai#!/usr/bin/perl # Cluebringer policy daemon # Copyright (C) 2009, AllWorldIT # Copyright (C) 2008, LinuxRulz # Copyright (C) 2007, Nigel Kukard # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. use strict; use warnings; use lib('/usr/local/lib/policyd-2.0','/usr/lib/policyd-2.0'); package cbp; use base qw(Net::Server::PreFork); use Config::IniFiles; use Getopt::Long; use Sys::Syslog; use cbp::version; use cbp::logging; use cbp::dbilayer; use cbp::cache; use cbp::tracking; use cbp::protocols; # Override configuration sub configure { my $self = shift; my $server = $self->{'server'}; my $cfg; my $cmdline; my $inifile; # Set defaults $cfg->{'config_file'} = "/etc/cluebringer.conf"; $server->{'timeout'} = 120; $server->{'background'} = "yes"; $server->{'pid_file'} = "/var/run/cbpolicyd.pid"; $server->{'log_level'} = 2; $server->{'log_file'} = "/var/log/cbpolicyd.log"; $server->{'host'} = "*"; $server->{'port'} = 10031; $server->{'min_servers'} = 4; $server->{'min_spare_servers'} = 4; $server->{'max_spare_servers'} = 12; $server->{'max_servers'} = 25; $server->{'max_requests'} = 1000; # Parse command line params %{$cmdline} = (); GetOptions( \%{$cmdline}, "help", "config:s", "debug", "fg", ); # Check for some args if ($cmdline->{'help'}) { $self->displayHelp(); exit 0; } if (defined($cmdline->{'config'}) && $cmdline->{'config'} ne "") { $cfg->{'config_file'} = $cmdline->{'config'}; } # Check config file exists if (! -f $cfg->{'config_file'}) { print(STDERR "ERROR: No configuration file '".$cfg->{'config_file'}."' found!\n"); exit 1; } # Use config file, ignore case tie my %inifile, 'Config::IniFiles', ( -file => $cfg->{'config_file'}, -nocase => 1 ) or die "Failed to open config file '".$cfg->{'config_file'}."': $!"; # Copy config my %config = %inifile; # FIXME: This now generates a warning as Config::Inifiles doesn't implement UNTIE # untie(%inifile); # Pull in params for the server my @server_params = ( 'log_level','log_file', 'port', 'host', 'cidr_allow', 'cidr_deny', 'pid_file', 'user', 'group', 'timeout', 'background', 'min_servers', 'min_spare_servers', 'max_spare_servers', 'max_servers', 'max_requests', ); foreach my $param (@server_params) { $server->{$param} = $config{'server'}{$param} if (defined($config{'server'}{$param})); } # Fix up these ... if (defined($server->{'cidr_allow'})) { my @lst = split(/,\s;/,$server->{'cidr_allow'}); $server->{'cidr_allow'} = \@lst; } if (defined($server->{'cidr_deny'})) { my @lst = split(/,\s;/,$server->{'cidr_deny'}); $server->{'cidr_deny'} = \@lst; } # Split off modules if (!defined($config{'server'}{'modules'})) { die "Server configuration error: 'modules' not found"; } if (!defined($config{'server'}{'protocols'})) { die "Server configuration error: 'protocols' not found"; } # Split off modules if (ref($config{'server'}{'modules'}) eq "ARRAY") { foreach my $module (@{$config{'server'}{'modules'}}) { $module =~ s/\s+//g; # Skip comments next if ($module =~ /^#/); $module = "modules/$module"; push(@{$cfg->{'module_list'}},$module); } } else { my @moduleList = split(/\s+/,$config{'server'}{'modules'}); foreach my $module (@moduleList) { # Skip comments next if ($module =~ /^#/); $module = "modules/$module"; push(@{$cfg->{'module_list'}},$module); } } # Split off protocols if (ref($config{'server'}{'protocols'}) eq "ARRAY") { foreach my $module (@{$config{'server'}{'protocols'}}) { $module =~ s/\s+//g; # Skip comments next if ($module =~ /^#/); $module = "protocols/$module"; push(@{$cfg->{'module_list'}},$module); } } else { my @protocolList = split(/\s+/,$config{'server'}{'protocols'}); foreach my $module (@protocolList) { # Skip comments next if ($module =~ /^#/); $module = "protocols/$module"; push(@{$cfg->{'module_list'}},$module); } } # Override if ($cmdline->{'debug'}) { $server->{'log_level'} = 4; $cfg->{'debug'} = 1; } # If we set on commandline for foreground, keep in foreground if ($cmdline->{'fg'} || (defined($config{'server'}{'background'}) && $config{'server'}{'background'} eq "no" )) { $server->{'background'} = undef; $server->{'log_file'} = undef; } else { $server->{'setsid'} = 1; } # Loop with logging detail if (defined($config{'server'}{'log_detail'})) { # Lets see what we have to enable foreach my $detail (split(/[,\s;]/,$config{'server'}{'log_detail'})) { $cfg->{'logging'}{$detail} = 1; } } # Check log_mail if (defined($config{'server'}{'log_mail'}) && $config{'server'}{'log_mail'} ne "main") { # COMPATIBILITY if ($config{'server'}{'log_mail'} eq "maillog") { $cfg->{'log_mail'} = 'mail@syslog:unix'; } else { $cfg->{'log_mail'} = $config{'server'}{'log_mail'}; } } # Save our config and stuff $self->{'config'} = $cfg; $self->{'cmdline'} = $cmdline; $self->{'inifile'} = \%config; } # Run straight after ->run sub post_configure_hook { my $self = shift; my $log_mail = $self->{'config'}{'log_mail'}; $self->log(LOG_NOTICE,"[CBPOLICYD] Policyd v2 / Cluebringer - v".VERSION); $self->log(LOG_NOTICE,"[CBPOLICYD] Initializing system modules."); # Init config cbp::config::Init($self); # Init caching engine cbp::cache::Init($self); $self->log(LOG_NOTICE,"[CBPOLICYD] System modules initialized."); $self->log(LOG_NOTICE,"[CBPOLICYD] Module load started..."); # Load modules foreach my $module (@{$self->{'config'}{'module_list'}}) { # Split off dir and mod name $module =~ /^(\w+)\/(\w+)$/; my ($mod_dir,$mod_name) = ($1,$2); # Load module my $res = eval(" use cbp::${mod_dir}::${mod_name}; plugin_register(\$self,\"${mod_name}\",\$cbp::${mod_dir}::${mod_name}::pluginInfo); "); if ($@ || (defined($res) && $res != 0)) { $self->log(LOG_WARN,"[CBPOLICYD] Error loading plugin $module ($@)"); } } $self->log(LOG_NOTICE,"[CBPOLICYD] Module load done."); # Check if we have some custom logging... if (defined($log_mail)) { # More flexible method to configure logging if ($log_mail =~ /^([^@]+)(?:@([^:]+))?(?:\:(\S+))?$/) { my $facility = $1; my $method = defined($2) ? $2 : 'syslog'; my $destination = $3; # Check method of logging if ($method eq "syslog") { $destination = 'native' if (!defined($destination)); $facility = 'mail' if (!defined($facility)); $self->log(LOG_DEBUG,"[CBPOLICYD] Opening syslog, destination = '$destination', facility = '$facility'."); # We may have some args to pass to setlogsock my @syslogArgs = split(/,/,$destination); if (!Sys::Syslog::setlogsock(@syslogArgs)) { $self->log(LOG_ERR,"[CBPOLICYD] Failed to set log socket: $!"); } if (!Sys::Syslog::openlog("cbpolicyd",'pid|ndelay',$facility)) { $self->log(LOG_ERR,"[CBPOLICYD] Failed to open syslog socket: $!"); } } else { $self->log(LOG_WARN,"[CBPOLICYD] Value of 'log_mail' not understood. Method '$method' is invalid."); } } else { $self->log(LOG_WARN,"[CBPOLICYD] Value '$log_mail' of 'log_mail' not understood."); } } } # Register plugin info sub plugin_register { my ($self,$module,$info) = @_; # If no info, return if (!defined($info)) { $self->log(LOG_WARN,"[CBPOLICYD] Plugin info not found for module => $module"); return -1; } # Set real module name & save $info->{'Module'} = $module; push(@{$self->{'modules'}},$info); # If we should, init the module if (defined($info->{'init'})) { $info->{'init'}($self); } return 0; } # Initialize child sub child_init_hook { my $self = shift; $self->SUPER::child_init_hook(); $self->log(LOG_DEBUG,"[CBPOLICYD] Starting up caching engine"); cbp::cache::connect($self); # This is the database connection timestamp, if we connect, it resets to 0 # if not its used to check if we must kill the child and try a reconnect $self->{'client'}->{'dbh_status'} = time(); # Init system stuff $self->{'client'}->{'dbh'} = cbp::dbilayer::Init($self); if (defined($self->{'client'}->{'dbh'})) { # Check if we succeeded if (!($self->{'client'}->{'dbh'}->connect())) { # If we succeeded, record OK $self->{'client'}->{'dbh_status'} = 0; } else { $self->log(LOG_WARN,"[CBPOLICYD] Failed to connect to database: ".$self->{'client'}->{'dbh'}->Error()." ($$)"); } } else { $self->log(LOG_WARN,"[CBPOLICYD] Failed to Initialize: ".cbp::dbilayer::internalErr()." ($$)"); } } # Destroy the child sub child_finish_hook { my $self = shift; my $server = $self->{'server'}; $self->SUPER::child_finish_hook(); $self->log(LOG_DEBUG,"[CBPOLICYD] Shutting down caching engine ($$)"); cbp::cache::disconnect($self); } # Process requests we get sub process_request { my $self = shift; my $server = $self->{'server'}; my $log = defined($self->{'config'}{'logging'}{'modules'}); # Found module my $found; # # Loop till we fill up the buffer # # Buffer my $buf = ""; # Create an FDSET for use in select() my $fdset = ""; vec($fdset, fileno(STDIN), 1) = 1; while (1) { # Ignore leading blank lines (HTTP) $buf =~ s/^(?:\015?\012)+//; # Has at least one line if ($buf =~ /\012/) { # Loop with modules foreach my $module ( sort { $b->{'priority'} <=> $a->{'priority'} } @{$self->{'modules'}} ) { # Skip over if we don't have a check... next if (!defined($module->{'protocol_check'})); # Check protocol my $res = $module->{'protocol_check'}($self,$buf); if (defined($res) && $res == 1) { $found = $module; } } # Last if found last if ($found); } # Again ... too large if (length($buf) > 16*1024) { $self->log(LOG_WARN,"[CBPOLICYD] Request too large from => Peer: ".$server->{'peeraddr'}.":".$server->{'peerport'}.", Local: ". $server->{'sockaddr'}.":".$server->{'sockport'}); return; } # Check for timeout.... my $n = select($fdset,undef,undef,$server->{'timeout'}); if (!$n) { $self->log(LOG_WARN,"[CBPOLICYD] Timeout from => Peer: ".$server->{'peeraddr'}.":".$server->{'peerport'}.", Local: ". $server->{'sockaddr'}.":".$server->{'sockport'}); return; } # Read in 8kb $n = sysread(STDIN,$buf,8192,length($buf)); if (!$n) { my $reason = defined($n) ? "Client closed connection" : "sysread[$!]"; $self->log(LOG_WARN,"[CBPOLICYD] $reason => Peer: ".$server->{'peeraddr'}.":".$server->{'peerport'}.", Local: ". $server->{'sockaddr'}.":".$server->{'sockport'}); return; } } # Check if a protocol handler wasn't found... if (!$found) { $self->log(LOG_ERR,"[CBPOLICYD] Request not understood => Peer: ".$server->{'peeraddr'}.":".$server->{'peerport'}.", Local: ". $server->{'sockaddr'}.":".$server->{'sockport'}); return; } # Set protocol handler $server->{'_protocol_handler'} = $found; # If we have a init function, call it before processing... $server->{'_protocol_handler'}->{'protocol_init'}($self) if (defined($server->{'_protocol_handler'}->{'protocol_init'})); # Process buffer my $request = $server->{'_protocol_handler'}->{'protocol_parse'}($self,$buf); # Check data is ok... if ((my $res = $server->{'_protocol_handler'}->{'protocol_validate'}($self,$request))) { $self->log(LOG_ERR,"[CBPOLICYD] Protocol data validation error, $res"); $self->protocol_response(PROTO_ERROR); print($self->protocol_getresponse()); return; } # Data mangling... $request->{'sender'} = lc($request->{'sender'}); $request->{'recipient'} = lc($request->{'recipient'}) if (defined($request->{'recipient'})); $request->{'sasl_username'} = lc($request->{'sasl_username'}) if (defined($request->{'sasl_username'})); # Internal data $request->{'_timestamp'} = time(); # Check if we got connected, if not ... bypass if ($self->{'client'}->{'dbh_status'} > 0) { my $action; $self->log(LOG_WARN,"[CBPOLICYD] Client in BYPASS mode due to DB connection failure!"); # Check bypass mode if (!defined($self->{'inifile'}{'database'}{'bypass_mode'})) { $self->log(LOG_ERR,"[CBPOLICYD] No bypass_mode specified for failed database connections, defaulting to tempfail"); $self->protocol_response(PROTO_DB_ERROR); $action = "tempfail"; # Check for "tempfail" } elsif (lc($self->{'inifile'}{'database'}{'bypass_mode'}) eq "tempfail") { $self->protocol_response(PROTO_DB_ERROR); $action = "tempfail"; # And for "bypass" } elsif (lc($self->{'inifile'}{'database'}{'bypass_mode'}) eq "pass") { $self->protocol_response(PROTO_PASS); $action = "pass"; # Lasty for invalid } else { $self->log(LOG_ERR,"[CBPOLICYD] bypass_mode is invalid, defaulting to tempfail"); $self->protocol_response(PROTO_DB_ERROR); $action = "tempfail"; } $self->maillog("module=Core, action=$action, host=%s, from=%s, to=%s, reason=db_failure_bypass", $request->{'client_address'} ? $request->{'client_address'} : "unknown", $request->{'helo_name'} ? $request->{'helo_name'} : "", $request->{'sender'} ? $request->{'sender'} : "unknown", $request->{'recipient'} ? $request->{'recipient'} : "unknown"); print($self->protocol_getresponse()); # Check if we need to reconnect or not my $timeout = $self->{'inifile'}{'database'}{'bypass_timeout'}; if (!defined($timeout)) { $self->log(LOG_ERR,"[CBPOLICYD] No bypass_timeout specified for failed database connections, defaulting to 120s"); $timeout = 120; } # Get time left my $timepassed = $request->{'_timestamp'} - $self->{'client'}->{'dbh_status'}; # Then check... if ($timepassed >= $timeout) { $self->log(LOG_NOTICE,"[CBPOLICYD] Client BYPASS timeout exceeded, reconnecting..."); exit 0; } else { $self->log(LOG_NOTICE,"[CBPOLICYD] Client still in BYPASS mode, ".( $timeout - $timepassed )."s left till next reconnect"); return; } } # Setup database handle cbp::dblayer::setHandle($self->{'client'}->{'dbh'}); # Grab session data my $sessionData = getSessionDataFromRequest($self,$request); if (ref $sessionData ne "HASH") { $self->log(LOG_DEBUG,"[CBPOLICYD:$$] Error getting session data"); $self->protocol_response(PROTO_ERROR); print($self->protocol_getresponse()); return; } $self->log(LOG_DEBUG,"[CBPOLICYD] Got request, running modules...") if ($log); # Loop with modules foreach my $module ( sort { $b->{'priority'} <=> $a->{'priority'} } @{$self->{'modules'}} ) { # Skip over if we don't have a check... next if (!defined($module->{'request_process'})); $self->log(LOG_DEBUG,"[CBPOLICYD] Running module: ".$module->{'name'}) if ($log); # Run request in eval my $res; eval { $res = $module->{'request_process'}($self,$sessionData); }; # Check results if ($@) { $self->log(LOG_ERR,"[CBPOLICYD] Error running module request_process(): $@"); $res = $self->protocol_response(PROTO_ERROR); } # Check responses if (!defined($res)) { $res = $self->protocol_response(PROTO_ERROR); last; } elsif ($res == CBP_SKIP) { next; } elsif ($res == CBP_CONTINUE) { next; } elsif ($res == CBP_STOP) { last; } elsif ($res == CBP_ERROR) { $self->log(LOG_ERR,"[CBPOLICYD] Error returned from module '".$module->{'name'}."'"); last; } } $self->log(LOG_DEBUG,"[CBPOLICYD] Done with modules") if ($log); # Update session data my $res = updateSessionData($self,$sessionData); if ($res) { $self->log(LOG_ERR,"[CBPOLICYD] Error updating session data"); $self->protocol_response(PROTO_ERROR); } # Grab and return response my $response = $self->protocol_getresponse(); print($response); } # Initialize child sub server_exit { my $self = shift; my $log_mail = $self->{'config'}{'log_mail'}; $self->log(LOG_DEBUG,"Destroying system modules."); # Destroy cache cbp::cache::Destroy($self); $self->log(LOG_DEBUG,"System modules destroyed."); # Check if we using syslog if (defined($log_mail)) { $self->log(LOG_DEBUG,"Closing syslog."); Sys::Syslog::closelog(); $self->log(LOG_DEBUG,"Syslog closed."); }; # Parent exit $self->SUPER::server_exit(); } # Slightly better logging sub log { my ($self,$level,$msg,@args) = @_; # Check log level and set text my $logtxt = "UNKNOWN"; if ($level == LOG_DEBUG) { $logtxt = "DEBUG"; } elsif ($level == LOG_INFO) { $logtxt = "INFO"; } elsif ($level == LOG_NOTICE) { $logtxt = "NOTICE"; } elsif ($level == LOG_WARN) { $logtxt = "WARNING"; } elsif ($level == LOG_ERR) { $logtxt = "ERROR"; } # Parse message nicely if ($msg =~ /^(\[[^\]]+\]) (.*)/s) { $msg = "$1 $logtxt: $2"; } else { $msg = "[CORE] $logtxt: $msg"; } $self->SUPER::log($level,"[".$self->log_time." - $$] $msg",@args); } # Syslog logging sub maillog { my ($self,$msg,@args) = @_; my $log_mail = $self->{'config'}{'log_mail'}; # Log to syslog if (defined($log_mail)) { # If we have args use printf style if (@args) { Sys::Syslog::syslog('info',$msg,@args); } else { Sys::Syslog::syslog('info','%s',$msg); } # Or log to main mechanism } else { $self->log(LOG_INFO,sprintf($msg,@args)); } } # Protocol response setting... sub protocol_response { my $self = shift; my $server = $self->{'server'}; # Make sure the response handler exists if (!defined($server->{'_protocol_handler'}->{'protocol_response'})) { $self->log(LOG_ERR,"[CBPOLICYD] No protocol response handler available"); return -1; } return $server->{'_protocol_handler'}->{'protocol_response'}($self,@_); } # Get protocol response sub protocol_getresponse { my $self = shift; my $server = $self->{'server'}; # Make sure the response handler exists if (!defined($server->{'_protocol_handler'}->{'protocol_getresponse'})) { $self->log(LOG_ERR,"[CBPOLICYD] No protocol getresponse handler available"); return -1; } return $server->{'_protocol_handler'}->{'protocol_getresponse'}($self); } # Display help sub displayHelp { print(STDERR "Policyd (ClueBringer) v".VERSION." - Copyright (c) 2007-2009 AllWorldIT\n"); print(STDERR< Configuration file --debug Put into debug mode --fg Don't go into background EOF } __PACKAGE__->run; 1; # vim: ts=4