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
lolo888
ISPConfig 3
Commits
2a704f6c
Commit
2a704f6c
authored
Jun 29, 2010
by
tbrehm
Browse files
Implemented: FS#891 - Email Forward check box to Leave a copy.
parent
a5c46913
Changes
7
Hide whitespace changes
Inline
Side-by-side
install/sql/ispconfig3.sql
View file @
2a704f6c
...
...
@@ -560,6 +560,7 @@ CREATE TABLE `mail_user` (
`gid`
int
(
11
)
unsigned
NOT
NULL
default
'5000'
,
`maildir`
varchar
(
255
)
NOT
NULL
default
''
,
`quota`
bigint
(
20
)
NOT
NULL
default
'-1'
,
`cc`
varchar
(
255
)
NOT
NULL
default
''
,
`homedir`
varchar
(
255
)
NOT
NULL
,
`autoresponder`
enum
(
'n'
,
'y'
)
NOT
NULL
default
'n'
,
`autoresponder_start_date`
datetime
NOT
NULL
default
'0000-00-00 00:00:00'
,
...
...
interface/web/mail/form/mail_user.tform.php
View file @
2a704f6c
...
...
@@ -110,6 +110,18 @@ $form["tabs"]['mailuser'] = array (
'width'
=>
'30'
,
'maxlength'
=>
'255'
),
'cc'
=>
array
(
'datatype'
=>
'VARCHAR'
,
'formtype'
=>
'TEXT'
,
'validators'
=>
array
(
0
=>
array
(
'type'
=>
'REGEX'
,
'regex'
=>
'/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\w+\.[a-z]{2,10}){0,1}$/i'
,
'errmsg'
=>
'cc_error_isemail'
),
),
'default'
=>
''
,
'value'
=>
''
,
'width'
=>
'30'
,
'maxlength'
=>
'255'
),
'maildir'
=>
array
(
'datatype'
=>
'VARCHAR'
,
'formtype'
=>
'TEXT'
,
...
...
interface/web/mail/lib/lang/en_mail_user.lng
View file @
2a704f6c
...
...
@@ -37,4 +37,6 @@ $wb["move_junk_txt"] = 'Move Spam Emails to Junk directory';
$wb
[
"name_txt"
]
=
'Realname'
;
$wb
[
"name_optional_txt"
]
=
'(Optional)'
;
$wb
[
'autoresponder_active'
]
=
'Enable the autoresponder'
;
$wb
[
'cc_txt'
]
=
'Send copy to'
;
$wb
[
'cc_error_isemail'
]
=
'The "Send copy to" field does not conatin a valid email address'
;
?>
interface/web/mail/templates/mail_user_mailbox_edit.htm
View file @
2a704f6c
...
...
@@ -30,6 +30,10 @@
<label
for=
"quota"
>
{tmpl_var name='quota_txt'}
</label>
<input
name=
"quota"
id=
"quota"
value=
"{tmpl_var name='quota'}"
size=
"30"
maxlength=
"255"
type=
"text"
class=
"textInput formLengthLimit"
/><p
class=
"formInputUnity"
>
MB
</p>
</div>
<div
class=
"ctrlHolder"
>
<label
for=
"name"
>
{tmpl_var name='cc_txt'}
</label>
<input
name=
"cc"
id=
"cc"
value=
"{tmpl_var name='cc'}"
size=
"30"
maxlength=
"255"
type=
"text"
class=
"textInput"
/>
{tmpl_var name='name_optional_txt'}
</div>
<div
class=
"ctrlHolder"
>
<label
for=
"policy"
>
{tmpl_var name='policy_txt'}
</label>
<select
name=
"policy"
id=
"policy"
class=
"selectInput"
>
...
...
server/conf/sieve_filter.master
View file @
2a704f6c
require ["fileinto", "regex", "vacation"];
<tmpl_if name="cc">
# Send a copy of email to
redirect "<tmpl_var name='cc'>";
keep;
</tmpl_if>
<tmpl_if name="move_junk" op="==" value="y">
# Move spam to spam folder
if header :contains "X-Spam-Flag" "YES" {
...
...
server/plugins-available/maildeliver_plugin.inc.php
View file @
2a704f6c
...
...
@@ -89,7 +89,9 @@ class maildeliver_plugin {
or
$data
[
"old"
][
"autoresponder"
]
!=
$data
[
"new"
][
"autoresponder"
]
or
(
isset
(
$data
[
"new"
][
"email"
])
and
$data
[
"old"
][
"email"
]
!=
$data
[
"new"
][
"email"
])
or
$data
[
"old"
][
"autoresponder_start_date"
]
!=
$data
[
"new"
][
"autoresponder_start_date"
]
or
$data
[
"old"
][
"autoresponder_end_date"
]
!=
$data
[
"new"
][
"autoresponder_end_date"
])
{
or
$data
[
"old"
][
"autoresponder_end_date"
]
!=
$data
[
"new"
][
"autoresponder_end_date"
]
or
$data
[
"old"
][
"cc"
]
!=
$data
[
"new"
][
"cc"
]
)
{
$app
->
log
(
"Mailfilter config has been changed"
,
LOGLEVEL_DEBUG
);
...
...
server/plugins-available/maildrop_plugin.inc.php
View file @
2a704f6c
...
...
@@ -166,8 +166,10 @@ class maildrop_plugin {
}
// Write the custom mailfilter script, if mailfilter recipe has changed
if
(
$data
[
"old"
][
"custom_mailfilter"
]
!=
$data
[
"new"
][
"custom_mailfilter"
]
or
$data
[
"old"
][
"move_junk"
]
!=
$data
[
"new"
][
"move_junk"
])
{
if
(
$data
[
"old"
][
"custom_mailfilter"
]
!=
$data
[
"new"
][
"custom_mailfilter"
]
or
$data
[
"old"
][
"move_junk"
]
!=
$data
[
"new"
][
"move_junk"
]
or
$data
[
"old"
][
"cc"
]
!=
$data
[
"new"
][
"cc"
])
{
$app
->
log
(
"Mailfilter config has been changed"
,
LOGLEVEL_DEBUG
);
if
(
trim
(
$data
[
"new"
][
"custom_mailfilter"
])
!=
''
or
$data
[
"new"
][
"move_junk"
]
!=
'n'
)
{
// Delete the old filter recipe
...
...
@@ -184,6 +186,11 @@ class maildrop_plugin {
$config_file_path
=
$this
->
mailfilter_config_dir
.
'/'
.
$email_parts
[
1
]
.
'/'
.
$email_parts
[
0
]
.
'/.mailfilter'
;
$mailfilter_content
=
''
;
if
(
$data
[
"new"
][
"cc"
]
!=
''
)
{
$mailfilter_content
.
=
"cc
\"
!"
.
$data
[
"new"
][
"cc"
]
.
"
\"\n
"
;
}
if
(
$data
[
"new"
][
"move_junk"
]
==
'y'
)
{
$mailfilter_content
.
=
file_get_contents
(
$conf
[
"rootpath"
]
.
'/conf/mailfilter_move_junk.master'
)
.
"
\n
"
;
}
...
...
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