Firefoxのプラグイン「Gmail Manager」において、Google Apps独自ドメインのメールが取れなくなっていることに今朝気づきました。どうもGmail側の仕様が変わった様子。
ちょっと調査してみたところ、変更点は以下2点の様子。
(1)ログインのエントリポイントが変更された
https://www.google.com/a/<ドメイン名>/LoginAction
->https://www.google.com/a/<ドメイン名>/LoginAction2
(2)ユーザ名とパスワードのフォーム変数名が変更された
[ユーザ名]userName->Email
[パスワード]password->Passwd
以上をふまえてGmail Managerを以下のように改造してみました。
(1)Gmail Managerをダウンロードしたファイル(.xpi)をzip展開する。
(2)展開したファイルフォルダ\components\gmServiceGmail.jsの該当箇所を修正する。
login: function()
{
(中略)
else
{
this._isHosted = true;
var username = this.email.split("@")[0];
var domain = this.email.split("@")[1];
// 修正開始
// url = "https://www.google.com/a/" + domain + "/LoginAction";
// data = "at=null&continue=https://mail.google.com/hosted/" + domain + "/&service=mail" +
// "&userName=" + encodeURIComponent(username) +
// "&password=" + encodeURIComponent(this.password);
url = "https://www.google.com/a/" + domain + "/LoginAction2";
data = "at=null&continue=https://mail.google.com/hosted/" + domain + "/&service=mail" +
"&Email=" + encodeURIComponent(username) +
"&Passwd=" + encodeURIComponent(this.password);
// 修正終了
}
(3)展開したファイルフォルダ\chrome\gmanager.jarをさらにzip展開し、展開したファイルフォルダ\content\util.jsの該当箇所を修正する。
/**
* Load Gmail Page
*/
function GM_loadGmailPage(aType, aAccount, aLoc, aCompose) {
(中略)
if (email.indexOf("@gmail.com") == -1 && email.indexOf("@googlemail.com") == -1)
{
isHosted = true;
username = email.split("@")[0];
domain = email.split("@")[1];
// 修正開始
// url = "https://www.google.com/a/" + domain + "/LoginAction";
url = "https://www.google.com/a/" + domain + "/LoginAction2";
// 修正終了
}
(中略)
switch (aType)
{
case "inbox":
{
(中略)
if (!isHosted)
(中略)
else
data = "at=null" +
"&continue=" + scheme + "://mail.google.com/hosted/" + domain + "/&service=mail" +
// 修正開始
// "&userName=" + encodeURIComponent(username) +
// "&password=" + encodeURIComponent(aAccount.password);
"&Email=" + encodeURIComponent(username) +
"&Passwd=" + encodeURIComponent(aAccount.password);
// 修正終了
break;
}
case "compose":
{
(中略)
if (!isHosted)
(中略)
else
{
data = "at=null" +
"&continue=" + scheme + "://mail.google.com/hosted/" + domain + "/&service=mail" +
// 修正開始
// "&userName=" + encodeURIComponent(username) +
// "&password=" + encodeURIComponent(aAccount.password);
"&Email=" + encodeURIComponent(username) +
"&Passwd=" + encodeURIComponent(aAccount.password);
// 修正終了
これでとりあえず手元の環境ではGoogle Appsの独自ドメインメールがGmail Managerから操作できるようになりました。「こんなめんどくさいことやってられない」という方のために、私が修正したものをこちらにアップしました。動作保障は一切いたしませんが、よろしければどうぞ。