Intercepting mail via IMAP server

Setting up a policy

To enable the mail interception policy, go to “Filters” - “Policies” - “System Policies” - “Mail Collector” and enable the policy by adding the “Policy is active” checkbox and fill in the parameters of your IMAP server. You can also set up a policy for deleting email messages.

Illustration 1 — Intercepting mail via IMAP server

Note

Only mail from the “Inbox” folder is intercepted

After enabling the policy, incoming mail will be intercepted and captured in the “Mail” event type, without specifying the username.

Illustration 2 — Intercepting mail via IMAP server

The interception can be checked on the server by running the command

ibatyr grab --server=imap.gmail.com --login=test@gmail.com --password=XXXXX

Configuring the Exchange Server for Interception to Work

Create a business mailbox from which information will be collected.

Illustration 3 — Intercepting mail via IMAP server Illustration 4 — Intercepting mail via IMAP server

In the created mailbox you need to specify the following values:

  • General: Do not appear in the address list

  • Mailbox Features: Message Size Limits

  • Set Maximum message size to 0 kb

Illustration 5 — Intercepting mail via IMAP server Illustration 6 — Intercepting mail via IMAP server Illustration 7 — Intercepting mail via IMAP server

Set up email interception rules

Illustration 8 — Intercepting mail via IMAP server Illustration 9 — Intercepting mail via IMAP server

Don’t forget to enable IMAP in your Exchange settings

Illustration 10 — Intercepting mail via IMAP server Illustration 11 — Intercepting mail via IMAP server

And start the corresponding services

Illustration 12 — Intercepting mail via IMAP server

Setting up mail interception from your Gmail mailbox

  1. It is necessary to enable support for the Imap protocol in the mailbox settings

Illustration 13 — Intercepting mail via IMAP server
  1. In your Google account settings, you must explicitly allow access to third-party services by enabling a special security setting for access to your mailbox

Illustration 14 — Intercepting mail via IMAP server
  1. In the mail collector settings, specify the server address and credentials.

Illustration 15 — Intercepting mail via IMAP server

Setting up a Zimbra mailbox to intercept mail:

In the main.cf file

/opt/zimbra/postfix/conf/main.cf

or on version 8.8

/opt/zimbra/common/conf/main.cf

add line

always_bcc = service_box@domain.ru

A copy of all mail is sent to service_box@domain.ru, and then iBatyr Monitor picks it up via an IMAP grabber.