1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 16:22:43 +01:00
phorge-phorge/resources/sql/patches/20130102.metamtareceivedmailmessageidhash.sql
Bob Trahan 3448781c40 de-duplicate emails received by phabricator multiple times
Summary: this can happen if you have Phabricator and email lists co-mingling such that Phabricator receives an email multiple times. we can prevent this from then spamming everyone or otherwise taking the action multiple times by storing a message id hash and dropping the message if we have more than one message that matches.

Test Plan: simulated sending the same email multiple times on the command line. noted only the first one made it through.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1726

Differential Revision: https://secure.phabricator.com/D4328
2013-01-03 17:04:30 -08:00

3 lines
155 B
SQL

ALTER TABLE `{$NAMESPACE}_metamta`.`metamta_receivedmail`
ADD `messageIDHash` CHAR(12) BINARY NOT NULL,
ADD KEY `key_messageIDHash` (`messageIDHash`);