diff --git a/README.md b/README.md index cabebf5..a3692c9 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Add the following to the file: auth_default_realm=localhost ``` -Change the line *mail_home* to: +Optional: Change the line *mail_home* to ``` mail_home = /srv/vmail/mailboxes/%n@%d ``` @@ -23,6 +23,7 @@ mail_home = /srv/vmail/mailboxes/%n@%d ### /etc/postfix/main.cf Add the following lines to the file in the appropriate places: ``` +smtpd_sender_login_maps = mysql:/etc/postfix/sql/sender-login-maps.cf myorigin=localhost local_transport = $virtual_transport virtual_mailbox_limit = 0 @@ -38,7 +39,7 @@ to create the database. This management interface includes the following features - Full multi-admin multi-domain capability. Each validated user can get domains assigned to manage by an admin. - Multiple system administrators are possible -- Configure system-wide accounts +- Configure system-wide accounts (@localhost) to separate login name from email address - Set-up mail accounts per domain - Configure aliases per domain - with multiple recipients - Portal to have users change their own email password diff --git a/app/Http/Controllers/VMailController.php b/app/Http/Controllers/VMailController.php index 0d1f54a..3fe0c16 100644 --- a/app/Http/Controllers/VMailController.php +++ b/app/Http/Controllers/VMailController.php @@ -599,7 +599,7 @@ class VMailController extends Controller $a_list[$a->source_username]->dest = []; } - $a->destination = empty($a->destination_domain)?($a->destination_username):($a->destination_username.'@'.$a->destination_domain); + $a->destination = (empty($a->destination_domain)||$a->destination_domain == "localhost")?($a->destination_username):($a->destination_username.'@'.$a->destination_domain); $a_list[$a->source_username]->dest[] = $a; } @@ -657,7 +657,7 @@ class VMailController extends Controller 'source_username' => $validatedData['source'], 'source_domain' => $domain->domain, 'destination_username' => $dparts[0], - 'destination_domain' => isset($dparts[1])?$dparts[1]:null, + 'destination_domain' => isset($dparts[1])?$dparts[1]:"localhost", 'enabled' => $validatedData['enabled'], 'comment' => $validatedData['comment'], ]); @@ -678,7 +678,7 @@ class VMailController extends Controller $dparts = explode('@',$validatedData['destination'],2); $a->destination_username = $dparts[0]; - $a->destination_domain = isset($dparts[1])?$dparts[1]:null; + $a->destination_domain = isset($dparts[1])?$dparts[1]:"localhost"; $a->enabled = $validatedData['enabled']; $a->comment = $validatedData['comment']; diff --git a/public/js/app.js b/public/js/app.js index 2139b95..35ba15a 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -75157,8 +75157,7 @@ Vue.component('datetime', vue_datetime__WEBPACK_IMPORTED_MODULE_0__["Datetime"]) //delete_account(a,event){ axios.post("/siteaccounts", { action: 'delete', - id: a.id, - domain: app.active_domain.domain + id: a.id }).then(function (response) { app.siteaccounts_list(); }).then(handlers.buttonsuccess(event.target))["catch"](handlers.buttonerror(event.target)); diff --git a/resources/js/app.js b/resources/js/app.js index c403d56..0f6ec2a 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -774,7 +774,6 @@ Vue.component('datetime',Datetime); axios.post("/siteaccounts", { action: 'delete', id: a.id, - domain: app.active_domain.domain }).then(function (response) { app.siteaccounts_list(); }).then(handlers.buttonsuccess(event.target))["catch"](handlers.buttonerror(event.target)); diff --git a/resources/views/layouts/vmail.blade.php b/resources/views/layouts/vmail.blade.php index ad6d145..d0708b9 100644 --- a/resources/views/layouts/vmail.blade.php +++ b/resources/views/layouts/vmail.blade.php @@ -619,7 +619,7 @@ window.InitialState.IsSiteAdmin = @json(Auth::user()->hasRole('admin')); Are you sure you want to delete the account @{{a.username}}@@{{a.domain}}?