热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

javapostfix,使用Java解析Postfix中的收件箱

IamusingPostfixasamailserverandIconfiguredittoreceiveemailstosomedestination.IwanttomakeaJ

I am using Postfix as a mail server and I configured it to receive emails to some destination.

I want to make a Java code that parse the incoming emails and do some action. Any idea where to start or what to use?

解决方案

I see two approaches:

Parse the mailbox (or mail) itself using jcup or jflex for instance

Add an imap server and use some java lib to query the imap server. (it can provide you filters for instance)

The imap approach lets you select unread mail, mail by id (single or multiple), move mail from one directory to an other, and so on.

Some links:

It is for C, but tips may be helpful for java. I mean the theoretical background.

This one is a collection of imap sample with java. It seems to use a lib, but in all case, it gives you an overview of what is doable with imap.

finally, there was a question about imap and java on stackoverflow:



推荐阅读
author-avatar
天佑忍者忍着
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有