Skip to content

Flow of Information

Zane Hooper edited this page Feb 28, 2017 · 2 revisions

Syncing Emails

The Abuse Reports package checks an email account every few minutes for reports of server abuse.

Note: On development machines where the cron job has not been setup, you will need to run php artisan abuse:sync-email manually to load the abuse reports instead. Make sure to set the settings to the Test Email account.

When syncing, the EmailFetcher reads each email thread in the account and checks for IP addresses in the body of the emails. It stores one report per IP address in the database and makes a list of them accessible to administrators. It automatically tracks down the server that owns each IP address (if any). If there is a server that owns the IP and is in use by a client, it automatically assigns the report to the client which makes it visible to that client on their own list of abuse reports. It also sends an email to the client reporting the abuse.

Status of a Report

Administrators can comment on any abuse report. Clients can comment on any abuse report that is assigned to them. Administrators can resolve abuse reports which moves them to archived.

  • If a report has been Marked Resolved by an Administrator, its status is Archived.
  • If a report does not have any client assigned, its status is Unknown.
  • As a client, Answered is only true if the client was the last person to comment on the report. Otherwise, it is Unanswered. So if an admin comments after the client does, it goes back to Unanswered.
  • As an admin, Waiting on Admin is only true if the client was the last person to comment on the report. Otherwise, it is Waiting on Client.

Typical Flow

  • Someone sends a report of abuse on IP 127.0.0.1 to our abuse email.
  • The next time the abuse:sync-email command is run, the EmailFetcher discovers this report.
  • The Report is generated. The database is checked for an IP entity 127.0.0.1:
    • If one is found and the entity has a Server with a Client:
      • The Report is assigned to the client/server.
      • An email is sent to the client.
      • The report is visible to admins under Waiting on Client and clients under Unanswered.
    • Otherwise, the report becomes visible only to admins in Unknown.
  • The client comments on the abuse report, saying that the activity has been removed.
    • The abuse report gets moved to Answered client side.
    • The abuse report gets moved to Waiting on Admin admin side.
  • If an admin comments on the report:
    • It gets moved back to previous status (Unanswered, Waiting on Client)
    • An email is sent to the client.
  • An admin marks the report as resolved.
    • The abuse report gets moved to Archived client and admin side.
Clone this wiki locally