|
Revision 1412, 1.6 kB
(checked in by scitech, 8 hours ago)
|
Fixed #1518: Virtual mail problem. Add support for alias subdomain mail (part I)
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
require '../include/ispcp-lib.php'; |
|---|
| 22 |
|
|---|
| 23 |
check_login(__FILE__); |
|---|
| 24 |
|
|---|
| 25 |
if (isset($_GET['id']) && $_GET['id'] !== '') { |
|---|
| 26 |
$mail_id = $_GET['id']; |
|---|
| 27 |
$item_delete_status = Config::get('ITEM_DELETE_STATUS'); |
|---|
| 28 |
$dmn_id = get_user_domain_id($sql, $_SESSION['user_id']); |
|---|
| 29 |
|
|---|
| 30 |
$query = " |
|---|
| 31 |
select |
|---|
| 32 |
mail_id |
|---|
| 33 |
from |
|---|
| 34 |
mail_users |
|---|
| 35 |
where |
|---|
| 36 |
domain_id = ? |
|---|
| 37 |
and |
|---|
| 38 |
mail_id = ? |
|---|
| 39 |
"; |
|---|
| 40 |
|
|---|
| 41 |
$rs = exec_query($sql, $query, array($dmn_id, $mail_id)); |
|---|
| 42 |
|
|---|
| 43 |
if ($rs -> RecordCount() == 0) { |
|---|
| 44 |
user_goto('mail_catchall.php'); |
|---|
| 45 |
} |
|---|
| 46 |
|
|---|
| 47 |
check_for_lock_file(); |
|---|
| 48 |
|
|---|
| 49 |
$query = " |
|---|
| 50 |
update |
|---|
| 51 |
mail_users |
|---|
| 52 |
set |
|---|
| 53 |
status = ? |
|---|
| 54 |
where |
|---|
| 55 |
mail_id = ? |
|---|
| 56 |
"; |
|---|
| 57 |
|
|---|
| 58 |
$rs = exec_query($sql, $query, array($item_delete_status, $mail_id)); |
|---|
| 59 |
|
|---|
| 60 |
send_request(); |
|---|
| 61 |
write_log($_SESSION['user_logged'].": deletes email catch all!"); |
|---|
| 62 |
set_page_message(tr('Catch all account scheduled for deletion!')); |
|---|
| 63 |
user_goto('mail_catchall.php'); |
|---|
| 64 |
|
|---|
| 65 |
} else { |
|---|
| 66 |
user_goto('mail_catchall.php'); |
|---|
| 67 |
} |
|---|
| 68 |
|
|---|
| 69 |
?> |
|---|