Skip to content

Latest commit

 

History

History
73 lines (61 loc) · 1.81 KB

README.md

File metadata and controls

73 lines (61 loc) · 1.81 KB

unspammer the IMAP robot

Unspammer watches IMAP folders of your choice and acts on mail arriving in these folders.

Unspammer can do the following:

  • remove SpamAssassin headers from mail, accidentally tagged as spam
  • forward mail to another address
  • add a running counter to the subject of the mail to act as a ticket number

Unspammer is written on golang. It can act on multiple IMAP accounts in parallel.

If you have complex configuration needs, you can use jsonnet for configuration.

Installation

To install unspammer as a service, run unspammer -config path/to/config.yaml -service install

Sample Config File

Config formats supported: yaml, json and jsonnet

imapAccounts:
  support:
    username: "[email protected]"
    password: "asdfasdf"
    server: "aaa.xxx.ch:993"

smtpAccounts:
  smtp:
    server: "bbb.xxx.ch:25"

tasks:
  unspam:
    imapAccount: support
    smtpAccount: smtp
    watchFolder: INBOX/DeSpamMe
    # we only act on SpamAssassin detected spam
    selectMessage: spam
    # remove SpamAssassin Headers
    editCopy: un-spam
    # save copy into folder UnSpammed
    storeCopyIn: INBOX/UnSpammed
    # delete original message
    deleteMessage: true
  minrt:
    imapAccount: support
    smtpAccount: smtp
    watchFolder: INBOX/UnSpammed
    # we only act on non-spam
    selectMessage: ham
    # we add a running counter to the subject
    editCopy: rt-tag
    # forward the mail
    forwardCopiesTo:
      - [email protected]
    # remove the original
    deleteMessage: true
  forward:
    imapAccount: support
    smtpAccount: smtp
    watchFolder: Inbox
    # we only act on non-spam
    selectMessage: ham
    # no message editing
    editCopy: no
    # forward the mail
    forwardCopiesTo:
      - [email protected]    
    # remove the original
    deleteMessage: true