Skip to content
WIP mail filter
C Makefile
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
module
.gitignore
Makefile
README.md
b64_pton.c
bytebuf.c
bytebuf.h
dumpstack.c
local.h
mailfilter.c
mailfilterctl.c
parser.c
parser.h
rfc2047.c
rfc5322.c
rfc5322.h

README.md

メールフィルター

作業中

mailserver = mailfilter.pop3("pop3s://mailserver", "username")
mailserver:getpass()

inbox = mailfilter.mh_folder("inbox")
spam  = mailfilter.mh_folder("spam")

for _,msg in pairs(mailserver:list()) do
  spam = false
  msg:top({
    on_header = function(key, val)
      if key == "subject" and val:find("未承諾広告") then
	spam = true
      end
    end
  })
  if not spam then
    inbox:save(msg, {"X-Spam-Check", "passed")
  else
    spam:save(msg)
  end
end

Mailfilter

WIP

You can’t perform that action at this time.