Add mailbox importer for existing users and apps

this should prevent conflicts of mailboxes from the get-go.
This commit is contained in:
Girish Ramakrishnan
2016-05-28 02:07:33 -07:00
parent 2909aad72a
commit d5b5289e0c
2 changed files with 38 additions and 4 deletions

View File

@@ -436,7 +436,6 @@ function setupSendMail(app, options, callback) {
assert.strictEqual(typeof options, 'object');
assert.strictEqual(typeof callback, 'function');
// FIXME: to can conflict with a real user!
var from = (app.location ? app.location : app.manifest.title.replace(/[^a-zA-Z0-9]/, '')) + '.app';
var cmd = [ '/addons/mail/service.sh', 'add-send', from ];
@@ -457,7 +456,6 @@ function teardownSendMail(app, options, callback) {
debugApp(app, 'Tearing down sendmail');
// FIXME: to can conflict with a real user!
var from = (app.location ? app.location : app.manifest.title.replace(/[^a-zA-Z0-9]/, '')) + '.app';
var cmd = [ '/addons/mail/service.sh', 'remove-send', from ];
@@ -478,7 +476,6 @@ function setupRecvMail(app, options, callback) {
debugApp(app, 'Setting up recvmail');
// FIXME: to can conflict with a real user!
var to = (app.location ? app.location : app.manifest.title.replace(/[^a-zA-Z0-9]/, '')) + '.app';
var cmd = [ '/addons/mail/service.sh', 'add-recv', to ];
@@ -497,7 +494,6 @@ function teardownRecvMail(app, options, callback) {
assert.strictEqual(typeof options, 'object');
assert.strictEqual(typeof callback, 'function');
// FIXME: to can conflict with a real user!
var to = (app.location ? app.location : app.manifest.title.replace(/[^a-zA-Z0-9]/, '')) + '.app';
var cmd = [ '/addons/mail/service.sh', 'remove-recv', to ];