Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
Guilherme Filippo
ISPConfig 3
Commits
c6e05a8e
Commit
c6e05a8e
authored
Sep 12, 2011
by
tbrehm
Browse files
Implemented: FS#1385 - Define all Email aliases in dovecot autoresponder
parent
c84a6d59
Changes
2
Hide whitespace changes
Inline
Side-by-side
server/conf/sieve_filter.master
View file @
c6e05a8e
...
...
@@ -31,6 +31,6 @@ if header :contains "X-Spam-Flag" "YES" {
}
vacation :days 1
:subject "Out of office reply"
# :addresses ["test@test.int", "till@test.int"]
<tmpl_var name='addresses'>
"<tmpl_var name='autoresponder_text'>";
</tmpl_if>
server/plugins-available/maildeliver_plugin.inc.php
View file @
c6e05a8e
...
...
@@ -118,7 +118,21 @@ class maildeliver_plugin {
$data
[
"new"
][
"autoresponder_text"
]
=
str_replace
(
"
\"
"
,
"'"
,
$data
[
"new"
][
"autoresponder_text"
]);
$tpl
->
setVar
(
'autoresponder_text'
,
$data
[
"new"
][
"autoresponder_text"
]);
//* Set alias addresses for autoresponder
$sql
=
"SELECT * FROM mail_forwarding WHERE type = 'alias' AND destination = '"
.
$app
->
db
->
quote
(
$data
[
"new"
][
"email"
])
.
"'"
;
$records
=
$app
->
db
->
queryAllRecords
(
$sql
);
$addresses
=
''
;
if
(
is_array
(
$records
))
{
$addresses
.
=
':addresses ['
;
foreach
(
$records
as
$rec
)
{
$addresses
.
=
'"'
.
$rec
[
'source'
]
.
'",'
;
}
$addresses
=
substr
(
$addresses
,
0
,
-
1
);
$addresses
.
=
']'
;
}
$tpl
->
setVar
(
'addresses'
,
$addresses
);
file_put_contents
(
$sieve_file
,
$tpl
->
grab
());
unset
(
$tpl
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment