]> git.proxmox.com Git - proxmox-mail-forward.git/log
proxmox-mail-forward.git
3 months agobump version to 0.2.3 master
Wolfgang Bumiller [Thu, 11 Jan 2024 09:00:43 +0000 (10:00 +0100)]
bump version to 0.2.3

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 months agobump notify to 0.3.1 and sys to 0.5.3 for mail fixups
Wolfgang Bumiller [Thu, 11 Jan 2024 07:48:50 +0000 (08:48 +0100)]
bump notify to 0.3.1 and sys to 0.5.3 for mail fixups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 months agobump version to 0.2.2
Thomas Lamprecht [Tue, 21 Nov 2023 16:31:32 +0000 (17:31 +0100)]
bump version to 0.2.2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 months agodo not forward on PBS systems if co-installed with PVE
Lukas Wagner [Tue, 21 Nov 2023 15:53:03 +0000 (16:53 +0100)]
do not forward on PBS systems if co-installed with PVE

With the newly built-in targets/matchers, we should not add
a target/matcher manually any more. In fact, this broke mail
forwarding on PBS because 'default-matcher' already existed as a
built-in and could thus not be created.
We now simply do an early return.

Also initialize notify-context before instantiating the config,
since that already requires the context to be set.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
5 months agobump version to 0.2.1
Thomas Lamprecht [Fri, 17 Nov 2023 16:58:50 +0000 (17:58 +0100)]
bump version to 0.2.1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agoupdate d/control
Lukas Wagner [Tue, 14 Nov 2023 13:00:00 +0000 (14:00 +0100)]
update d/control

proxmox-schema and proxmox-section config is not required anymore.
add new dependency to proxmox-notify.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
 [ TL: notify got bumped to 0.3 ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agofeed forwarded mails into proxmox_notify
Lukas Wagner [Tue, 14 Nov 2023 12:59:59 +0000 (13:59 +0100)]
feed forwarded mails into proxmox_notify

This allows us to send notifications for events from daemons that are
not under our control, e.g. zed, smartd, cron. etc...

For mail-based notification targets (sendmail, soon smtp) the mail is
forwarded as is, including all headers.
All other target types will try to parse the email to extra subject
and text body.

On PBS, where proxmox-notify is not yet fully integrated,
we simply add a default target/matcher to an empty config. That way
the behavior should be unchanged - mails will be forwarded to
root@pam.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
9 months agobuildsys: derive upload dist automatically
Thomas Lamprecht [Fri, 23 Jun 2023 11:39:23 +0000 (13:39 +0200)]
buildsys: derive upload dist automatically

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agobump version to 0.2.0
Thomas Lamprecht [Fri, 26 May 2023 15:06:22 +0000 (17:06 +0200)]
bump version to 0.2.0

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agoupdate lintian-overrides for debhelper 13+
Thomas Lamprecht [Fri, 26 May 2023 15:16:56 +0000 (17:16 +0200)]
update lintian-overrides for debhelper 13+

and don't override the "no manpage" one, we really should get one..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agod/control: define compat level via build-depends and raise to 13
Thomas Lamprecht [Fri, 26 May 2023 15:08:48 +0000 (17:08 +0200)]
d/control: define compat level via build-depends and raise to 13

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agodebian: wrap-and-sort -tkn
Thomas Lamprecht [Fri, 26 May 2023 15:07:24 +0000 (17:07 +0200)]
debian: wrap-and-sort -tkn

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agoupdate dependencies for current bookworm state
Thomas Lamprecht [Fri, 26 May 2023 15:06:14 +0000 (17:06 +0200)]
update dependencies for current bookworm state

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agod/postinst: add debhelper token
Thomas Lamprecht [Fri, 26 May 2023 15:17:31 +0000 (17:17 +0200)]
d/postinst: add debhelper token

results in no change for now

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agobuildsys: improve DSC target & add sbuild convenience target
Thomas Lamprecht [Fri, 26 May 2023 14:49:13 +0000 (16:49 +0200)]
buildsys: improve DSC target & add sbuild convenience target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agobuildsys: always pre-clean for dsc target
Thomas Lamprecht [Fri, 26 May 2023 14:49:05 +0000 (16:49 +0200)]
buildsys: always pre-clean for dsc target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agobuildsys: use full DEB_VERSION and correct DEB_HOST_ARCH
Thomas Lamprecht [Fri, 26 May 2023 15:10:46 +0000 (17:10 +0200)]
buildsys: use full DEB_VERSION and correct DEB_HOST_ARCH

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agobuildsys: improve build-dir target and prerequisites on it
Thomas Lamprecht [Fri, 26 May 2023 14:33:11 +0000 (16:33 +0200)]
buildsys: improve build-dir target and prerequisites on it

drop automatically setting the cargo version, it's enforced in
d/rules now anyway.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agod/control: reflow description for line length recommendation
Thomas Lamprecht [Fri, 26 May 2023 14:45:31 +0000 (16:45 +0200)]
d/control: reflow description for line length recommendation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agod/rules: enforce that the debian package version mateches cargo one
Thomas Lamprecht [Fri, 26 May 2023 14:44:20 +0000 (16:44 +0200)]
d/rules: enforce that the debian package version mateches cargo one

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agobuild: also copy .cargo dir
Fabian Grünbichler [Mon, 23 Jan 2023 10:42:43 +0000 (11:42 +0100)]
build: also copy .cargo dir

to unbreak source package builds.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
14 months agobuild: update nix to 0.26
Fabian Grünbichler [Mon, 23 Jan 2023 10:15:26 +0000 (11:15 +0100)]
build: update nix to 0.26

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
16 months agobump version to 0.1.1-1 [final]
Wolfgang Bumiller [Mon, 28 Nov 2022 08:34:22 +0000 (09:34 +0100)]
bump version to 0.1.1-1 [final]

the previous bump missed the dependency bump

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
16 months agobump section config dependency to 1.0.2
Wolfgang Bumiller [Mon, 28 Nov 2022 08:33:38 +0000 (09:33 +0100)]
bump section config dependency to 1.0.2

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
16 months agobump version to 0.1.1-1
Wolfgang Bumiller [Mon, 28 Nov 2022 08:32:35 +0000 (09:32 +0100)]
bump version to 0.1.1-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
16 months agopbs user config: allow parsing unknown sections
Fiona Ebner [Fri, 25 Nov 2022 15:15:36 +0000 (16:15 +0100)]
pbs user config: allow parsing unknown sections

Previously, configs with entries for tokens could not be parsed
successfully, so extracting the mail for the root user failed.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
17 months agod/rules: patch out unnecessary librt linkage
Thomas Lamprecht [Thu, 10 Nov 2022 12:08:52 +0000 (13:08 +0100)]
d/rules: patch out unnecessary librt linkage

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agod/rules: avoid setting DH_VERBOSE by default
Thomas Lamprecht [Thu, 10 Nov 2022 12:07:46 +0000 (13:07 +0100)]
d/rules: avoid setting DH_VERBOSE by default

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agobump version to 0.1.0-1
Wolfgang Bumiller [Thu, 10 Nov 2022 10:43:05 +0000 (11:43 +0100)]
bump version to 0.1.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agouse setresuid to drop saved-uid as well
Wolfgang Bumiller [Thu, 10 Nov 2022 10:41:34 +0000 (11:41 +0100)]
use setresuid to drop saved-uid as well

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agorequire proxmox-section-config 1.0.1
Wolfgang Bumiller [Thu, 10 Nov 2022 10:31:22 +0000 (11:31 +0100)]
require proxmox-section-config 1.0.1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agod/postinst: register binary in .forward
Fiona Ebner [Fri, 21 Oct 2022 13:02:47 +0000 (15:02 +0200)]
d/postinst: register binary in .forward

Similar to how it is done for pve-manager in PVE. If pvemailforward is
detected, nothing is done. An adapted pve-manager will cleanly handle
the switchover for PVE installations.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
17 months agoadd Debian packaging
Fiona Ebner [Fri, 21 Oct 2022 13:02:46 +0000 (15:02 +0200)]
add Debian packaging

It is a setuid binary owned by root, since the initial step of reading
the configuration files on both PVE and PBS requires higher privileges
which can't be mapped easily otherwise.

Used parts of the packaging in proxmox-backup as a basis.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
17 months agoinitial commit
Fiona Ebner [Fri, 21 Oct 2022 13:02:45 +0000 (15:02 +0200)]
initial commit

It is intended to replace the current pvemailforward binary+script in
PVE and also be used in PBS. The implemenation is largely based on the
pvemailforward script to try and keep behavior mostly the same in PVE.

To read the config in PBS, the binary would need to belong to
backup:backup with setuid and setgid bits (proxmox-backup is 700 owned
by backup:backup and user.cfg is 640 owned by root:backup). To read
the configs in PVE the setgid bit for www-data would need to be set.

To avoid this issue, the helper will be a root-owned setuid binary and
set the effective UID to the real UID, after reading in the config
files.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>