mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-04 12:01:41 +02:00
main/rt4: create rt4 user, fix package permissions
* also add a patch to allow overriding of envelope-from from a template
This commit is contained in:
parent
2a12c1f8d7
commit
0e902e56b8
@ -0,0 +1,50 @@
|
||||
From f2f3542e163c534a437944089b801f6134c6b02a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
|
||||
Date: Wed, 6 Jul 2011 09:56:57 +0300
|
||||
Subject: [PATCH] email: allow envelope from overriding from templates
|
||||
|
||||
Add X-RT-Envelope-From header that will override the envelope
|
||||
from if using sendmailpipe mail sending.
|
||||
---
|
||||
lib/RT/Interface/Email.pm | 11 +++++++----
|
||||
1 files changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/lib/RT/Interface/Email.pm b/lib/RT/Interface/Email.pm
|
||||
index 620ca60..8bd94eb 100644
|
||||
--- a/lib/RT/Interface/Email.pm
|
||||
+++ b/lib/RT/Interface/Email.pm
|
||||
@@ -343,7 +343,10 @@ sub SendEmail {
|
||||
|
||||
my $msgid = $args{'Entity'}->head->get('Message-ID') || '';
|
||||
chomp $msgid;
|
||||
-
|
||||
+
|
||||
+ my $envelope_from = $args{'Entity'}->head->get('X-RT-Envelope-From');
|
||||
+ chomp $envelope_from;
|
||||
+
|
||||
# If we don't have any recipients to send to, don't send a message;
|
||||
unless ( $args{'Entity'}->head->get('To')
|
||||
|| $args{'Entity'}->head->get('Cc')
|
||||
@@ -408,16 +411,16 @@ sub SendEmail {
|
||||
|
||||
# SetOutgoingMailFrom
|
||||
if ( RT->Config->Get('SetOutgoingMailFrom') ) {
|
||||
- my $OutgoingMailAddress;
|
||||
+ my $OutgoingMailAddress = $envelope_from;
|
||||
|
||||
if ($TicketObj) {
|
||||
my $QueueName = $TicketObj->QueueObj->Name;
|
||||
my $QueueAddressOverride = RT->Config->Get('OverrideOutgoingMailFrom')->{$QueueName};
|
||||
|
||||
if ($QueueAddressOverride) {
|
||||
- $OutgoingMailAddress = $QueueAddressOverride;
|
||||
+ $OutgoingMailAddress ||= $QueueAddressOverride;
|
||||
} else {
|
||||
- $OutgoingMailAddress = $TicketObj->QueueObj->CorrespondAddress;
|
||||
+ $OutgoingMailAddress ||= $TicketObj->QueueObj->CorrespondAddress;
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
1.7.1
|
||||
|
||||
@ -2,8 +2,10 @@
|
||||
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
||||
pkgname=rt4
|
||||
pkgver=4.0.1
|
||||
pkgrel=0
|
||||
pkgrel=1
|
||||
pkgdesc="Request Tracker - issue and bug tracker"
|
||||
pkgusers="rt4"
|
||||
pkggroups="rt4"
|
||||
url="http://www.bestpractical.com/rt"
|
||||
arch="noarch"
|
||||
license="GPLv2+"
|
||||
@ -68,9 +70,10 @@ depends="perl
|
||||
"
|
||||
|
||||
makedepends="$depends"
|
||||
install=""
|
||||
install="$pkgname.pre-install"
|
||||
subpackages=""
|
||||
source="http://www.bestpractical.com/pub/rt/release/rt-$pkgver.tar.gz"
|
||||
source="http://www.bestpractical.com/pub/rt/release/rt-$pkgver.tar.gz
|
||||
0001-email-allow-envelope-from-overriding-from-templates.patch"
|
||||
|
||||
_builddir="$srcdir"/rt-$pkgver
|
||||
prepare() {
|
||||
@ -115,6 +118,9 @@ EOF
|
||||
build() {
|
||||
cd "$_builddir"
|
||||
./configure --enable-layout=Alpine \
|
||||
--with-rt-group=rt4 \
|
||||
--with-web-group=rt4 \
|
||||
--with-web-user=rt4 \
|
||||
|| return 1
|
||||
make || return 1
|
||||
}
|
||||
@ -124,4 +130,5 @@ package() {
|
||||
make DESTDIR="$pkgdir" install || return 1
|
||||
}
|
||||
|
||||
md5sums="bde89fbdadf7b709fb13f32638848b9d rt-4.0.1.tar.gz"
|
||||
md5sums="bde89fbdadf7b709fb13f32638848b9d rt-4.0.1.tar.gz
|
||||
ed9ba8bd09e68f4af1095aeedbe7a18b 0001-email-allow-envelope-from-overriding-from-templates.patch"
|
||||
|
||||
5
main/rt4/rt4.pre-install
Normal file
5
main/rt4/rt4.pre-install
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
addgroup -S rt4 2>/dev/null
|
||||
adduser -S -s /bin/false -G rt4 -D -H -g "Request Tracker 4 user" rt4 2>/dev/null
|
||||
exit 0
|
||||
Loading…
x
Reference in New Issue
Block a user