目录
1 概述
浪潮信息KOS是浪潮信息基于Linux Kernel、OpenAnolis等开源技术自主研发的一款服务器操作系统,支持x86、ARM等主流架构处理器,性能和稳定性居于行业领先地位,具备成熟的 CentOS 迁移和替换能力,可满足云计算、大数据、分布式存储、人工智能、边缘计算等应用场景需求。详细介绍见官网链接https://zh.ieisystem.com/product/kos/9453.html。
IMAPFilter 是一个邮件过滤实用程序,它通过 Internet 消息访问协议 (IMAP) 连接到远程邮件服务器,并向服务器发送搜索查询,并根据结果处理邮箱。它可以用于删除、复制、移动、标记等操作,处理位于同一或不同邮件服务器上的邮件。IMAPFilter 支持 IMAP 协议的 4rev1 和 4 版本,并使用 Lua 编程语言作为配置和扩展语言。详细见官网https://github.com/lefcha/imapfilter.git。
2 安装环境
2.1 操作系统环境
版本信息:KeyarchOS 5.8sp2
硬件平台:aarch64

2.2 软件版本
imapfilter-2.6.12-1
https://github.com/lefcha/imapfilter.git
3 安装与测试
3.1 安装
在https://archives.fedoraproject.org/pub/archive/epel/7/aarch64/Packages/i/下载rpm包

将imapfilter的rpm包上传至服务器
![]()
使用rpm -ivh imapfilter-2.6.12-1.el7.aarch64.rpm安装rpm包

安装报错,缺少依赖
执行yum install lua安装lua库

执行yum install compat-openssl10安装openssl

在https://dl.fedoraproject.org/pub/epel/8/Everything/aarch64/Packages/c/compat-lua-libs-5.1.5-15.el8.aarch64.rpm下载lua-5.1的rpm包,并上传至服务器

执行rpm -ivh compat-lua-libs-5.1.5-15.el8.aarch64.rpm安装

执行rpm -ivh imapfilter-2.6.12-1.el7.aarch64.rpm安装imapfilter-2.6.12-1

执行imapfilter -h

安装完成。
3.2 测试
执行vim /root/.imapfilter/config.lua创建一个配置文件:
options.timeout = 60
options.namespace = true
account1 = IMAP {
server = 'imap.example.com',
username = 'your_username',
password = 'your_password',
ssl = 'tls'
}
account1.INBOX:contain_to('example@example.com'):move_messages(account1['Processed'])

执行imapfilter启动imapfilter(本次测试为离线服务器,无法连接邮箱,外网机器配置上正确的邮箱信息可正常启动imapfilter)

上述表明安装成功。
418

被折叠的 条评论
为什么被折叠?



