転送検出の仕組み
転送されたメールは元の「To:」ヘッダーに infoseek.jp が残ります: To: akiracraftwork@infoseek.jp ← Outlook が転送時に保持 このドメインが forwarding_map に一致したら account_code = "infoseek" に切り替えます。 変更まとめ ファイル 変更内容 models.py infoseek を ACCOUNT_CHOICES に追加 + migration mail_filter.flow.json forwarding_map追加、転送検出ロジック、ローカルにデプロイ済み history/page.tsx ACCOUNT_LABELS と フィルタに infoseek 追加 infoseek.jpにテストメールを送って、次回フロー実行時に「Infoseek (転送)」として表示されるか確認してください。
This commit is contained in:
@@ -12,7 +12,10 @@
|
|||||||
"Bash(STEP_JOB=\"019c8344-4fc4-f59e-1009-c3733e28b46c\")",
|
"Bash(STEP_JOB=\"019c8344-4fc4-f59e-1009-c3733e28b46c\")",
|
||||||
"Bash(__NEW_LINE_94a6a83a7608650e__ curl -sk -H \"Authorization: Bearer $TOKEN\" \"http://localhost/api/w/admins/jobs_u/completed/get/$STEP_JOB\")",
|
"Bash(__NEW_LINE_94a6a83a7608650e__ curl -sk -H \"Authorization: Bearer $TOKEN\" \"http://localhost/api/w/admins/jobs_u/completed/get/$STEP_JOB\")",
|
||||||
"Bash(docker start:*)",
|
"Bash(docker start:*)",
|
||||||
"Bash(docker stop:*)"
|
"Bash(docker stop:*)",
|
||||||
|
"WebFetch(domain:tomo1joy.com)",
|
||||||
|
"Bash(bash wm-api.sh update-flow f/mail/mail_filter flows/mail_filter.flow.json)",
|
||||||
|
"Read(//c/Users/akira/Develop/windmill//**)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
18
backend/apps/mail/migrations/0003_add_infoseek_account.py
Normal file
18
backend/apps/mail/migrations/0003_add_infoseek_account.py
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 5.0 on 2026-02-22 07:30
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('mail', '0002_alter_mailemail_feedback_alter_mailsender_rule'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='mailemail',
|
||||||
|
name='account',
|
||||||
|
field=models.CharField(choices=[('xserver', 'Xserver'), ('gmail', 'Gmail'), ('hotmail', 'Hotmail'), ('infoseek', 'Infoseek (転送)')], max_length=20, verbose_name='アカウント'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -45,6 +45,7 @@ ACCOUNT_CHOICES = [
|
|||||||
('xserver', 'Xserver'),
|
('xserver', 'Xserver'),
|
||||||
('gmail', 'Gmail'),
|
('gmail', 'Gmail'),
|
||||||
('hotmail', 'Hotmail'),
|
('hotmail', 'Hotmail'),
|
||||||
|
('infoseek', 'Infoseek (転送)'),
|
||||||
]
|
]
|
||||||
|
|
||||||
FEEDBACK_CHOICES = [
|
FEEDBACK_CHOICES = [
|
||||||
|
|||||||
@@ -31,8 +31,6 @@ services:
|
|||||||
DB_PORT: 5432
|
DB_PORT: 5432
|
||||||
SECRET_KEY: ${SECRET_KEY}
|
SECRET_KEY: ${SECRET_KEY}
|
||||||
DEBUG: "True"
|
DEBUG: "True"
|
||||||
MAIL_API_KEY: ${MAIL_API_KEY}
|
|
||||||
FRONTEND_URL: http://localhost:3000
|
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ const ACCOUNT_LABELS: Record<string, string> = {
|
|||||||
gmail: 'Gmail',
|
gmail: 'Gmail',
|
||||||
hotmail: 'Hotmail',
|
hotmail: 'Hotmail',
|
||||||
xserver: 'Xserver',
|
xserver: 'Xserver',
|
||||||
|
infoseek: 'Infoseek (転送)',
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function MailHistoryPage() {
|
export default function MailHistoryPage() {
|
||||||
@@ -97,6 +98,7 @@ export default function MailHistoryPage() {
|
|||||||
<option value="gmail">Gmail</option>
|
<option value="gmail">Gmail</option>
|
||||||
<option value="hotmail">Hotmail</option>
|
<option value="hotmail">Hotmail</option>
|
||||||
<option value="xserver">Xserver</option>
|
<option value="xserver">Xserver</option>
|
||||||
|
<option value="infoseek">Infoseek (転送)</option>
|
||||||
</select>
|
</select>
|
||||||
<select
|
<select
|
||||||
value={filterVerdict}
|
value={filterVerdict}
|
||||||
|
|||||||
Reference in New Issue
Block a user