]> git.proxmox.com Git - pmg-api.git/log
pmg-api.git
7 years agouse single http_proxy config
Dietmar Maurer [Fri, 22 Sep 2017 08:51:17 +0000 (10:51 +0200)]
use single http_proxy config

7 years agonew helper get_hwaddress
Dietmar Maurer [Fri, 22 Sep 2017 05:46:56 +0000 (07:46 +0200)]
new helper get_hwaddress

7 years agoMailTracker.pm - allow short filter parameters
Dietmar Maurer [Thu, 21 Sep 2017 07:19:10 +0000 (09:19 +0200)]
MailTracker.pm - allow short filter parameters

To avoid confusing parameter verification errors.

7 years agoMailTracker.pm - return status message in 'changes' attribute
Dietmar Maurer [Thu, 21 Sep 2017 06:40:20 +0000 (08:40 +0200)]
MailTracker.pm - return status message in 'changes' attribute

Also set a reasonable timeout and return up to 2000 entries.

7 years agoMailTracker.pm: fix time (syslog use local time)
Dietmar Maurer [Wed, 20 Sep 2017 10:15:08 +0000 (12:15 +0200)]
MailTracker.pm: fix time (syslog use local time)

7 years agoimprove API docu
Dietmar Maurer [Wed, 20 Sep 2017 08:00:31 +0000 (10:00 +0200)]
improve API docu

7 years agoPMG/API2/MailTracker.pm - add filters
Dietmar Maurer [Wed, 20 Sep 2017 07:19:01 +0000 (09:19 +0200)]
PMG/API2/MailTracker.pm - add filters

7 years agorun parser as root, improve parser
Dietmar Maurer [Wed, 20 Sep 2017 06:21:55 +0000 (08:21 +0200)]
run parser as root, improve parser

7 years agouse new pmg-log-tracker syntax (-vv and multiple -q)
Dietmar Maurer [Mon, 18 Sep 2017 07:59:21 +0000 (09:59 +0200)]
use new pmg-log-tracker syntax (-vv and multiple -q)

7 years agoadd extra API entry point to get mail log details.
Dietmar Maurer [Fri, 15 Sep 2017 10:26:26 +0000 (12:26 +0200)]
add extra API entry point to get mail log details.

7 years agoadd lock tracking API
Dietmar Maurer [Fri, 15 Sep 2017 08:25:47 +0000 (10:25 +0200)]
add lock tracking API

7 years agoadd api calls to spamlevel, archivefilter and filenamefilter
Dominik Csapak [Wed, 13 Sep 2017 13:09:48 +0000 (15:09 +0200)]
add api calls to spamlevel, archivefilter and filenamefilter

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agoimplement necessary subs for spamlevel api
Dominik Csapak [Wed, 13 Sep 2017 13:09:47 +0000 (15:09 +0200)]
implement necessary subs for spamlevel api

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agoimplement necessary subs for matchfilename api
Dominik Csapak [Wed, 13 Sep 2017 13:09:46 +0000 (15:09 +0200)]
implement necessary subs for matchfilename api

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agodo not use the __ sub
Dominik Csapak [Wed, 13 Sep 2017 13:09:45 +0000 (15:09 +0200)]
do not use the __ sub

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agoadd regex test api call
Dominik Csapak [Wed, 13 Sep 2017 13:09:44 +0000 (15:09 +0200)]
add regex test api call

for testing in the user interface, we use a timeout here, so that
an admin cannot block the daemon indefinitely

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agodepend on pmg-log-tracker
Dietmar Maurer [Wed, 13 Sep 2017 07:41:39 +0000 (09:41 +0200)]
depend on pmg-log-tracker

7 years agofix time for statistic data
Dietmar Maurer [Tue, 12 Sep 2017 07:54:37 +0000 (09:54 +0200)]
fix time for statistic data

use inteval start time instead of end time - This is less confusing when
user changes timespan granularity (form daily to hourly).

7 years agoround timespan to integer
Dietmar Maurer [Tue, 12 Sep 2017 06:06:49 +0000 (08:06 +0200)]
round timespan to integer

old code was a NOP, because it uses float.

7 years agoremove dead code
Dietmar Maurer [Tue, 12 Sep 2017 05:55:30 +0000 (07:55 +0200)]
remove dead code

7 years agolist mimetypes in API directory index
Dietmar Maurer [Tue, 12 Sep 2017 05:12:25 +0000 (07:12 +0200)]
list mimetypes in API directory index

7 years agofix trailing whitespaces
Dominik Csapak [Mon, 11 Sep 2017 11:23:07 +0000 (13:23 +0200)]
fix trailing whitespaces

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agomake contenttype and matchfield available in the api
Dominik Csapak [Mon, 11 Sep 2017 11:23:06 +0000 (13:23 +0200)]
make contenttype and matchfield available in the api

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agoimplement matchfield and contenttype api call methods
Dominik Csapak [Mon, 11 Sep 2017 11:23:05 +0000 (13:23 +0200)]
implement matchfield and contenttype api call methods

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agoremove mimetype code from contenttypefilter module
Dominik Csapak [Mon, 11 Sep 2017 11:23:04 +0000 (13:23 +0200)]
remove mimetype code from contenttypefilter module

we generate the list elsewhere now

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agoadd mimetypes api call
Dominik Csapak [Mon, 11 Sep 2017 11:23:03 +0000 (13:23 +0200)]
add mimetypes api call

this gets us a server generated list of mimetypes for e.g. the
contenttype filter rule

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agouse otype() sub instead of $self->{otype}
Dominik Csapak [Mon, 11 Sep 2017 11:23:02 +0000 (13:23 +0200)]
use otype() sub instead of $self->{otype}

the sub otype() is always the one defined in the class we instantiated,
but $self->{otype} is set at creation and does not work if we do not set
it in the 'new' sub of the object (for example in ContentTypeFilter.pm)

so now we get the correct otype from the current class

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agoadd rbl count statistics API
Dietmar Maurer [Mon, 11 Sep 2017 10:11:00 +0000 (12:11 +0200)]
add rbl count statistics API

7 years agopmgpolicy: extract RBL count, store into database
Dietmar Maurer [Mon, 11 Sep 2017 09:55:40 +0000 (11:55 +0200)]
pmgpolicy: extract RBL count, store into database

7 years agoscan_journal_for_rbl_rejects: new helper to extract RBL rejects from journal
Dietmar Maurer [Mon, 11 Sep 2017 07:38:58 +0000 (09:38 +0200)]
scan_journal_for_rbl_rejects: new helper to extract RBL rejects from journal

7 years agonew table LocalStat to sync RBLCount
Dietmar Maurer [Mon, 11 Sep 2017 05:13:30 +0000 (07:13 +0200)]
new table LocalStat to sync RBLCount

7 years agoupgradedb: fix typo
Dietmar Maurer [Fri, 8 Sep 2017 09:12:24 +0000 (11:12 +0200)]
upgradedb: fix typo

7 years agoMatchField - allow to match empty fields
Dietmar Maurer [Thu, 7 Sep 2017 08:38:34 +0000 (10:38 +0200)]
MatchField - allow to match empty fields

7 years agostatistics API: allow to specify year, month and day
Dietmar Maurer [Thu, 7 Sep 2017 06:21:15 +0000 (08:21 +0200)]
statistics API: allow to specify year, month and day

This makes it simpler to use with pmgsh.

7 years agocode cleanup
Dietmar Maurer [Thu, 7 Sep 2017 04:56:37 +0000 (06:56 +0200)]
code cleanup

7 years agoimplement admin/advfilter configuration
Dietmar Maurer [Wed, 6 Sep 2017 10:23:35 +0000 (12:23 +0200)]
implement admin/advfilter configuration

7 years agoremove wrong uri_unescape
Dietmar Maurer [Wed, 6 Sep 2017 09:40:59 +0000 (11:40 +0200)]
remove wrong uri_unescape

7 years agoimplement contact statistic API
Dietmar Maurer [Wed, 6 Sep 2017 09:35:28 +0000 (11:35 +0200)]
implement contact statistic API

7 years agoimplement receiver statistics, cleanups
Dietmar Maurer [Tue, 5 Sep 2017 12:02:54 +0000 (14:02 +0200)]
implement receiver statistics, cleanups

7 years agoPMG/API2/Statistics.pm - remove unuse dir from directory index
Dietmar Maurer [Tue, 5 Sep 2017 04:00:46 +0000 (06:00 +0200)]
PMG/API2/Statistics.pm - remove unuse dir from directory index

7 years agoPMG/API2/Statistics.pm - implement sender statistics
Dietmar Maurer [Mon, 4 Sep 2017 10:46:08 +0000 (12:46 +0200)]
PMG/API2/Statistics.pm - implement sender statistics

Support remote sort/filter.

7 years agodefine and use new standard option pmg-email-address
Dietmar Maurer [Mon, 4 Sep 2017 06:16:07 +0000 (08:16 +0200)]
define and use new standard option pmg-email-address

7 years agoPMG/API2/Statistics.pm - implement domain statistics
Dietmar Maurer [Fri, 1 Sep 2017 05:47:28 +0000 (07:47 +0200)]
PMG/API2/Statistics.pm - implement domain statistics

7 years agoPMG/Statistic.pm - rename traffic_in/out to bytes_in/out
Dietmar Maurer [Fri, 1 Sep 2017 05:46:52 +0000 (07:46 +0200)]
PMG/Statistic.pm - rename traffic_in/out to bytes_in/out

7 years agoPMG/API2/Statistics.pm - add maildistribution API
Dietmar Maurer [Thu, 31 Aug 2017 10:10:05 +0000 (12:10 +0200)]
PMG/API2/Statistics.pm - add maildistribution API

7 years agoPMG::Statistic::traffic_stat_day_dist - return data for both directions
Dietmar Maurer [Thu, 31 Aug 2017 10:04:47 +0000 (12:04 +0200)]
PMG::Statistic::traffic_stat_day_dist - return data for both directions

7 years agoPMG/API2/Statistics.pm - implement mailcount API
Dietmar Maurer [Thu, 31 Aug 2017 07:46:12 +0000 (09:46 +0200)]
PMG/API2/Statistics.pm - implement mailcount API

7 years agoPMG::Statistic::traffic_stat_graph - return data for both directions
Dietmar Maurer [Thu, 31 Aug 2017 07:45:10 +0000 (09:45 +0200)]
PMG::Statistic::traffic_stat_graph - return data for both directions

7 years agoPMG/API2/Statistics.pm: improve spamscore api - include percentage
Dietmar Maurer [Thu, 31 Aug 2017 05:27:11 +0000 (07:27 +0200)]
PMG/API2/Statistics.pm: improve spamscore api - include percentage

7 years agoimprove API doc
Dietmar Maurer [Fri, 25 Aug 2017 07:43:44 +0000 (09:43 +0200)]
improve API doc

7 years agoAPI /statistics/mail: return values as numbers
Dietmar Maurer [Fri, 25 Aug 2017 06:05:04 +0000 (08:05 +0200)]
API /statistics/mail: return values as numbers

7 years agoAPI /statistics/spam: always return counts for levels 0 to 10
Dietmar Maurer [Thu, 24 Aug 2017 10:16:20 +0000 (12:16 +0200)]
API /statistics/spam: always return counts for levels 0 to 10

7 years agoPMG/API2/Statistics.pm - plug API to path /statistics
Dietmar Maurer [Thu, 24 Aug 2017 08:41:24 +0000 (10:41 +0200)]
PMG/API2/Statistics.pm - plug API to path /statistics

Because everything is node independent.

7 years agoadd virus and spam statistic API
Dietmar Maurer [Thu, 24 Aug 2017 08:28:13 +0000 (10:28 +0200)]
add virus and spam statistic API

7 years agoPMG/API2/Statistics.pm - new API class for statistics
Dietmar Maurer [Thu, 24 Aug 2017 07:44:48 +0000 (09:44 +0200)]
PMG/API2/Statistics.pm - new API class for statistics

7 years agoregister and use standard options for starttime and endtime
Dietmar Maurer [Thu, 24 Aug 2017 07:43:20 +0000 (09:43 +0200)]
register and use standard options for starttime and endtime

7 years agoverify_optional_pmail: do not raise error if $pmail ne $authuser
Dietmar Maurer [Thu, 24 Aug 2017 06:23:01 +0000 (08:23 +0200)]
verify_optional_pmail: do not raise error if $pmail ne $authuser

7 years agoPMG::API2::quarantine->virusstatus() - remove avgspam from result hash
Dietmar Maurer [Thu, 24 Aug 2017 06:00:15 +0000 (08:00 +0200)]
PMG::API2::quarantine->virusstatus() - remove avgspam from result hash

7 years agoremove dead code
Dietmar Maurer [Thu, 24 Aug 2017 05:59:16 +0000 (07:59 +0200)]
remove dead code

7 years agoPMG/API2/Quarantine.pm - add virusstatus API
Dietmar Maurer [Thu, 24 Aug 2017 05:58:03 +0000 (07:58 +0200)]
PMG/API2/Quarantine.pm - add virusstatus API

7 years agoget_quarantine_count: always return numbers instead of undef
Dietmar Maurer [Thu, 24 Aug 2017 05:55:49 +0000 (07:55 +0200)]
get_quarantine_count: always return numbers instead of undef

7 years agoPMG/API2/Quarantine.pm - add spamstatus API
Dietmar Maurer [Thu, 24 Aug 2017 05:46:58 +0000 (07:46 +0200)]
PMG/API2/Quarantine.pm - add spamstatus API

7 years agoquarantine API: add quarusers to index
Dietmar Maurer [Thu, 24 Aug 2017 05:26:45 +0000 (07:26 +0200)]
quarantine API: add quarusers to index

7 years agocode cleanup - remove unused var $role
Dietmar Maurer [Thu, 24 Aug 2017 05:24:36 +0000 (07:24 +0200)]
code cleanup - remove unused var $role

7 years agoremove role quser from spamusers API
Dietmar Maurer [Thu, 24 Aug 2017 05:22:53 +0000 (07:22 +0200)]
remove role quser from spamusers API

7 years agoadd API to query UserPrefs
Dietmar Maurer [Thu, 24 Aug 2017 05:21:08 +0000 (07:21 +0200)]
add API to query UserPrefs

7 years agoimplement virus quarantine API /quarantine/virus
Dietmar Maurer [Thu, 24 Aug 2017 05:09:15 +0000 (07:09 +0200)]
implement virus quarantine API /quarantine/virus

7 years agoPMG::DBTools::get_quarantine_count - new helper
Dietmar Maurer [Thu, 24 Aug 2017 05:00:19 +0000 (07:00 +0200)]
PMG::DBTools::get_quarantine_count - new helper

7 years agopmgreport: inlude cluster error state
Dietmar Maurer [Thu, 24 Aug 2017 04:34:49 +0000 (06:34 +0200)]
pmgreport: inlude cluster error state

7 years agofix typos
Dominik Csapak [Wed, 23 Aug 2017 10:26:29 +0000 (12:26 +0200)]
fix typos

s/paramater/parameter/

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agochange the spam api call
Dominik Csapak [Wed, 23 Aug 2017 10:26:28 +0000 (12:26 +0200)]
change the spam api call

instead of having the /quarantine/spam api call return a
list of days with spamcount/average,

display directly the list of spams for the given timeframe
(default the last 24 hours) like the spamlist api call
and drop that

(because having a unix timestamp as part of the path is not
really nice, and with the gui restructuring, we do not
need the day summary)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agoadd spamusers api call
Dominik Csapak [Wed, 23 Aug 2017 10:26:27 +0000 (12:26 +0200)]
add spamusers api call

this api call returns a list of receiver emails, which
have received spam in the quarantine in the given timeframe
by default this is the last 24 hours

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agoPMG/HTMLMail.pm - allow bgcolor attribute
Dietmar Maurer [Wed, 23 Aug 2017 09:51:35 +0000 (11:51 +0200)]
PMG/HTMLMail.pm - allow bgcolor attribute

7 years agoPMG/HTMLMail.pm - allow more img attributes
Dietmar Maurer [Wed, 23 Aug 2017 09:37:28 +0000 (11:37 +0200)]
PMG/HTMLMail.pm - allow more img attributes

7 years agoPMG/HTMLMail.pm - allow style tags and style attributes
Dietmar Maurer [Wed, 23 Aug 2017 09:25:53 +0000 (11:25 +0200)]
PMG/HTMLMail.pm - allow style tags and style attributes

7 years agosync_config_from_master: sync domains, mynetworks and transport config
Dietmar Maurer [Wed, 23 Aug 2017 08:34:59 +0000 (10:34 +0200)]
sync_config_from_master: sync domains, mynetworks and transport config

7 years agorun_postmap: only run postmap if file was modified
Dietmar Maurer [Wed, 23 Aug 2017 07:45:06 +0000 (09:45 +0200)]
run_postmap: only run postmap if file was modified

7 years agosync_userprefs_db: fix sql syntax error (add missing comma)
Dietmar Maurer [Wed, 23 Aug 2017 06:45:41 +0000 (08:45 +0200)]
sync_userprefs_db: fix sql syntax error (add missing comma)

7 years agoadd pmgreport to service list
Dietmar Maurer [Wed, 23 Aug 2017 06:39:19 +0000 (08:39 +0200)]
add pmgreport to service list

7 years agopmgreport: add quarantine data
Dietmar Maurer [Wed, 23 Aug 2017 06:24:57 +0000 (08:24 +0200)]
pmgreport: add quarantine data

7 years agopmgreport: add virus charts
Dietmar Maurer [Wed, 23 Aug 2017 05:52:51 +0000 (07:52 +0200)]
pmgreport: add virus charts

7 years agocode cleanup
Dietmar Maurer [Wed, 23 Aug 2017 05:29:28 +0000 (07:29 +0200)]
code cleanup

7 years agopmgreport: add mail traffic
Dietmar Maurer [Tue, 22 Aug 2017 11:32:32 +0000 (13:32 +0200)]
pmgreport: add mail traffic

7 years agopmgreport: add incoming/outgoing statistics
Dietmar Maurer [Tue, 22 Aug 2017 10:53:18 +0000 (12:53 +0200)]
pmgreport: add incoming/outgoing statistics

7 years agopmgreport: add timespan parameter
Dietmar Maurer [Tue, 22 Aug 2017 10:12:42 +0000 (12:12 +0200)]
pmgreport: add timespan parameter

7 years agoinstall pmgreport.timer
Dietmar Maurer [Tue, 22 Aug 2017 09:51:27 +0000 (11:51 +0200)]
install pmgreport.timer

7 years agoimprove pmgreport (add cluster info)
Dietmar Maurer [Tue, 22 Aug 2017 09:44:54 +0000 (11:44 +0200)]
improve pmgreport (add cluster info)

new options --receiver and --auto

7 years agoadd timer for pmgreport
Dietmar Maurer [Tue, 22 Aug 2017 08:40:59 +0000 (10:40 +0200)]
add timer for pmgreport

7 years agopmgreport: new tool to send daily system reports
Dietmar Maurer [Mon, 21 Aug 2017 11:09:55 +0000 (13:09 +0200)]
pmgreport: new tool to send daily system reports

7 years agofactor out format_uptime
Dietmar Maurer [Mon, 21 Aug 2017 10:24:23 +0000 (12:24 +0200)]
factor out format_uptime

7 years agocode cleanup
Dietmar Maurer [Mon, 21 Aug 2017 05:46:52 +0000 (07:46 +0200)]
code cleanup

7 years agoadd API to reset rule database
Dietmar Maurer [Fri, 18 Aug 2017 08:49:38 +0000 (10:49 +0200)]
add API to reset rule database

7 years agoreload_ruledb: untaint pid
Dietmar Maurer [Fri, 18 Aug 2017 08:14:21 +0000 (10:14 +0200)]
reload_ruledb: untaint pid

7 years agoupgradedb: call reload_ruledb()
Dietmar Maurer [Fri, 18 Aug 2017 08:09:36 +0000 (10:09 +0200)]
upgradedb: call reload_ruledb()

7 years agoinit_ruledb: call reload_ruledb() after init
Dietmar Maurer [Fri, 18 Aug 2017 07:54:54 +0000 (09:54 +0200)]
init_ruledb: call reload_ruledb() after init

7 years agotrigger database reloads
Dietmar Maurer [Fri, 18 Aug 2017 07:32:34 +0000 (09:32 +0200)]
trigger database reloads

We need to send notifications to pmg-smtp-filter.

7 years agoadd missing comma
Dietmar Maurer [Thu, 17 Aug 2017 13:24:55 +0000 (15:24 +0200)]
add missing comma

7 years agoimplement whitelist/blacklist add/delete API
Dietmar Maurer [Thu, 17 Aug 2017 12:37:11 +0000 (14:37 +0200)]
implement whitelist/blacklist add/delete API

7 years agoimplement quarantine delete/deliver
Dietmar Maurer [Wed, 16 Aug 2017 10:11:26 +0000 (12:11 +0200)]
implement quarantine delete/deliver

moved code to new PMG::Quarantine class.

7 years agoimprove quarantine api
Dietmar Maurer [Mon, 14 Aug 2017 10:52:37 +0000 (12:52 +0200)]
improve quarantine api

implement actions whitelist/blacklist.