]> git.proxmox.com Git - pmg-api.git/log
pmg-api.git
6 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

6 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

6 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

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

6 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

6 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

6 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

6 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

6 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

6 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

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

6 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

6 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

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

6 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>
6 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>
6 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>
6 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

6 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

6 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

6 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

6 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

6 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)

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

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

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

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

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

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

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

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

6 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

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

6 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

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

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

6 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

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

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

6 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

6 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.

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

6 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

6 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.

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

implement actions whitelist/blacklist.

6 years agospam api: return details about matched spam tests
Dietmar Maurer [Fri, 11 Aug 2017 08:10:45 +0000 (10:10 +0200)]
spam api: return details about matched spam tests

6 years agospamlist api: return details about matched spam tests
Dietmar Maurer [Fri, 11 Aug 2017 08:10:45 +0000 (10:10 +0200)]
spamlist api: return details about matched spam tests

6 years agonew helper load_sa_descriptions
Dietmar Maurer [Fri, 11 Aug 2017 07:43:47 +0000 (09:43 +0200)]
new helper load_sa_descriptions

6 years agoPMG/API2/Quarantine.pm - implement htmlmail formatter
Dietmar Maurer [Thu, 10 Aug 2017 09:04:51 +0000 (11:04 +0200)]
PMG/API2/Quarantine.pm - implement htmlmail formatter

We can now render mail content as html using
 /api2/htmlmail/quarantine/content?id=XXXXX

6 years agoread_raw_email: add maxbytes parameter
Dietmar Maurer [Thu, 10 Aug 2017 09:03:26 +0000 (11:03 +0200)]
read_raw_email: add maxbytes parameter

6 years agodo not use perl taint mode to avoid MIME::Parser problems
Dietmar Maurer [Thu, 10 Aug 2017 09:02:19 +0000 (11:02 +0200)]
do not use perl taint mode to avoid MIME::Parser problems

6 years agonew helper decode_to_html()
Dietmar Maurer [Thu, 10 Aug 2017 06:56:19 +0000 (08:56 +0200)]
new helper decode_to_html()

6 years agoPMG/HTTPServer.pm - pass $format to $rpcenv
Dietmar Maurer [Thu, 10 Aug 2017 06:55:18 +0000 (08:55 +0200)]
PMG/HTTPServer.pm - pass $format to $rpcenv

6 years agoPMG::HTMLMail - new class to parse and sanitize html mails
Dietmar Maurer [Thu, 10 Aug 2017 06:27:07 +0000 (08:27 +0200)]
PMG::HTMLMail - new class to parse and sanitize html mails

6 years agodepend on libhtml-tree-perl and libhtml-scrubber-perl
Dietmar Maurer [Thu, 10 Aug 2017 06:26:00 +0000 (08:26 +0200)]
depend on libhtml-tree-perl and libhtml-scrubber-perl

6 years agoadd /quarantine/content API
Dietmar Maurer [Tue, 8 Aug 2017 11:13:54 +0000 (13:13 +0200)]
add /quarantine/content API

6 years agoPMG/DBTools.pm - new helper load_mail_data()
Dietmar Maurer [Tue, 8 Aug 2017 11:13:21 +0000 (13:13 +0200)]
PMG/DBTools.pm - new helper load_mail_data()

6 years agoimprove spamlist API
Dietmar Maurer [Tue, 8 Aug 2017 07:47:01 +0000 (09:47 +0200)]
improve spamlist API

6 years agoPMG::Utils::decode_rfc1522 - new helper
Dietmar Maurer [Tue, 8 Aug 2017 07:46:19 +0000 (09:46 +0200)]
PMG::Utils::decode_rfc1522 - new helper

6 years agopmgsh: correctly setup RESTEnvironment (set user/role)
Dietmar Maurer [Tue, 8 Aug 2017 06:32:31 +0000 (08:32 +0200)]
pmgsh: correctly setup RESTEnvironment (set user/role)

6 years agoimplement spamlist api
Dietmar Maurer [Tue, 8 Aug 2017 06:31:57 +0000 (08:31 +0200)]
implement spamlist api

6 years agocode cleanup - use defined()
Dietmar Maurer [Tue, 8 Aug 2017 05:36:20 +0000 (07:36 +0200)]
code cleanup - use defined()

6 years agopmgmirror: update lastync in clusterinfo table
Dietmar Maurer [Fri, 4 Aug 2017 10:51:05 +0000 (12:51 +0200)]
pmgmirror: update lastync in clusterinfo table

7 years agopmgqm send: use better urls (add action)
Dietmar Maurer [Sun, 30 Apr 2017 06:56:52 +0000 (08:56 +0200)]
pmgqm send: use better urls (add action)

7 years agouse global template toolkit to improve performance.
Dietmar Maurer [Sat, 29 Apr 2017 16:41:05 +0000 (18:41 +0200)]
use global template toolkit to improve performance.

7 years agoPMG/RESTEnvironment.pm: use PVE::Exception
Dietmar Maurer [Sat, 29 Apr 2017 16:22:09 +0000 (18:22 +0200)]
PMG/RESTEnvironment.pm: use PVE::Exception

7 years agoPMG/Service/pmgproxy.pm: register /quarantine page
Dietmar Maurer [Sat, 29 Apr 2017 16:18:09 +0000 (18:18 +0200)]
PMG/Service/pmgproxy.pm: register /quarantine page

And create CSRF tocken for quarantine tickets.

7 years agoPMG/API2/AccessControl.pm: enable login with quanantine tickets
Dietmar Maurer [Sat, 29 Apr 2017 16:15:43 +0000 (18:15 +0200)]
PMG/API2/AccessControl.pm: enable login with quanantine tickets

We do not issue new tickets - instead just return the same ticket.

7 years agoPMG/CLI/pmgqm.pm: uri_esacpe ticket
Dietmar Maurer [Sat, 29 Apr 2017 16:10:58 +0000 (18:10 +0200)]
PMG/CLI/pmgqm.pm: uri_esacpe ticket

7 years agoPMG::Ticket::verify_quarantine_ticket - read lifetime from configuration
Dietmar Maurer [Sat, 29 Apr 2017 16:09:47 +0000 (18:09 +0200)]
PMG::Ticket::verify_quarantine_ticket - read lifetime from configuration

7 years agopmgqm: use better quarantine url /quarantine
Dietmar Maurer [Sat, 29 Apr 2017 13:47:18 +0000 (15:47 +0200)]
pmgqm: use better quarantine url /quarantine

7 years agopostinst: call pmgdb init before config sync
Dietmar Maurer [Sat, 29 Apr 2017 07:23:24 +0000 (09:23 +0200)]
postinst: call pmgdb init before config sync

This is now required, befause config sync use the database.

7 years agoPMG::RESTEnvironment::check_api2_permissions - allow empty username
Dietmar Maurer [Sat, 29 Apr 2017 06:31:32 +0000 (08:31 +0200)]
PMG::RESTEnvironment::check_api2_permissions - allow empty username

7 years agostart quarantine API
Dietmar Maurer [Fri, 28 Apr 2017 09:16:26 +0000 (11:16 +0200)]
start quarantine API

7 years agoPMG/RESTEnvironment.pm: store role
Dietmar Maurer [Fri, 28 Apr 2017 09:15:04 +0000 (11:15 +0200)]
PMG/RESTEnvironment.pm: store role

And allow quarantine users to acces the API.

7 years agoMakefile: pmgspamreport is just a timer unit (no script)
Dietmar Maurer [Fri, 28 Apr 2017 05:51:08 +0000 (07:51 +0200)]
Makefile: pmgspamreport is just a timer unit (no script)

7 years agorename pmgspamreport to pmgqm
Dietmar Maurer [Fri, 28 Apr 2017 05:36:15 +0000 (07:36 +0200)]
rename pmgspamreport to pmgqm

7 years agoPMG/CLI/pmgcm.pm: pass undefined $rulecache to rewrite_config()
Dietmar Maurer [Fri, 28 Apr 2017 05:14:24 +0000 (07:14 +0200)]
PMG/CLI/pmgcm.pm: pass undefined $rulecache to rewrite_config()

There is no need to call $rewrite_config_whitelist->() in
that case.

7 years agoPMG/API2/Config.pm: pass undefined $rulecache to rewrite_config()
Dietmar Maurer [Fri, 28 Apr 2017 05:01:03 +0000 (07:01 +0200)]
PMG/API2/Config.pm: pass undefined $rulecache to rewrite_config()

There is no need to call $rewrite_config_whitelist->() in that case.

7 years agopmgspamreport: fix expire expression
Dietmar Maurer [Fri, 28 Apr 2017 04:52:50 +0000 (06:52 +0200)]
pmgspamreport: fix expire expression

7 years agopmgspamreport: use File::stat
Dietmar Maurer [Fri, 28 Apr 2017 04:41:56 +0000 (06:41 +0200)]
pmgspamreport: use File::stat

7 years agoremove unused ticketid from database
Dietmar Maurer [Fri, 28 Apr 2017 04:26:41 +0000 (06:26 +0200)]
remove unused ticketid from database

7 years agopmgspamreport: only generate one ticket per spam report
Dietmar Maurer [Fri, 28 Apr 2017 04:19:23 +0000 (06:19 +0200)]
pmgspamreport: only generate one ticket per spam report

7 years agopmgspamreport: remove unused check method
Dietmar Maurer [Thu, 27 Apr 2017 11:53:36 +0000 (13:53 +0200)]
pmgspamreport: remove unused check method

7 years agopmgspamreport: use File::find, add --check flag to purge
Dietmar Maurer [Thu, 27 Apr 2017 11:50:06 +0000 (13:50 +0200)]
pmgspamreport: use File::find, add --check flag to purge

7 years agopmgspamreport purge: correctly find all directories
Dietmar Maurer [Thu, 27 Apr 2017 10:43:33 +0000 (12:43 +0200)]
pmgspamreport purge: correctly find all directories

7 years agopmgspamreport.timer: new timer to send daily spam reports
Dietmar Maurer [Thu, 27 Apr 2017 10:04:27 +0000 (12:04 +0200)]
pmgspamreport.timer: new timer to send daily spam reports

7 years agospamreport-short.tt: new spamreport template
Dietmar Maurer [Thu, 27 Apr 2017 09:45:25 +0000 (11:45 +0200)]
spamreport-short.tt: new spamreport template

7 years agoremove spamreport style outlook
Dietmar Maurer [Thu, 27 Apr 2017 09:12:25 +0000 (11:12 +0200)]
remove spamreport style outlook

This style is now called 'verbose' and is the default.

7 years agospamreport-verbose: new style - do not use forms
Dietmar Maurer [Thu, 27 Apr 2017 09:09:06 +0000 (11:09 +0200)]
spamreport-verbose: new style -  do not use forms

Because they do not work in most cases.

7 years agopmgspamreport: create quarantine tickets
Dietmar Maurer [Thu, 27 Apr 2017 07:42:46 +0000 (09:42 +0200)]
pmgspamreport: create quarantine tickets

7 years agoadd newline to errors returned by template toolkit
Dietmar Maurer [Thu, 27 Apr 2017 07:14:02 +0000 (09:14 +0200)]
add newline to errors returned by template toolkit

7 years agouse extemsion .tt for spamreport templates
Dietmar Maurer [Thu, 27 Apr 2017 06:29:55 +0000 (08:29 +0200)]
use extemsion .tt for spamreport templates

tt => Template Toolkit

7 years agopmgspamreport: fix error condition
Dietmar Maurer [Thu, 27 Apr 2017 06:27:43 +0000 (08:27 +0200)]
pmgspamreport: fix error condition

7 years agoPMG::Cluster::sync_config_from_master - also sync /etc/pmg/templates
Dietmar Maurer [Thu, 27 Apr 2017 05:52:07 +0000 (07:52 +0200)]
PMG::Cluster::sync_config_from_master - also sync /etc/pmg/templates

Onyl files and symlinks - not recursive.

7 years agouse one global template toolkit object
Dietmar Maurer [Thu, 27 Apr 2017 04:58:28 +0000 (06:58 +0200)]
use one global template toolkit object

The user can now overwrite all templates in /etc/pmg/templates/

7 years agopmgspamreport: pass filenames to template toolkit
Dietmar Maurer [Thu, 27 Apr 2017 04:28:22 +0000 (06:28 +0200)]
pmgspamreport: pass filenames to template toolkit

So that TT correctly cache the template. Also make it possible
to overwrite all templates in /etc/pmg/templates.

7 years agospamreport-verbose.tmpl: use button tag to get correct button text.
Dietmar Maurer [Wed, 26 Apr 2017 16:29:24 +0000 (18:29 +0200)]
spamreport-verbose.tmpl: use button tag to get correct button text.

7 years agopmgspamreport: do not escape character in tooltip - does not work with most browsers
Dietmar Maurer [Wed, 26 Apr 2017 16:05:02 +0000 (18:05 +0200)]
pmgspamreport: do not escape character in tooltip -  does not work with most browsers

Use template toolkit filter for hrefs.

7 years agospamreport-verbose.tmpl: s/item.data/item.date/
Dietmar Maurer [Wed, 26 Apr 2017 15:30:27 +0000 (17:30 +0200)]
spamreport-verbose.tmpl: s/item.data/item.date/