基于标号表的动态邮件转发
今天早上,客户询问我们是否可以提供订阅服务:
邮件到达云邮件服务器上的特定地址,没有 procmail/maildrop 的可能性
邮件到达云邮件服务器上的特定地址,没有 procmail/maildrop 的可能性Cron 在另一台服务器上运行 Perl 或 PHP 脚本,检查新邮件并根据邮件声称的地址,订阅者是否查找,并转发向所有订阅者发送带有任何附件的电子邮件以及添加的取消订阅链接
脚本删除转发的电子邮件
显然,邮件服务器将具有 IMAP 和 POP 访问权限。
// 编辑 请注意,邮件将来自 220 多个政府机构/组织。用户将使用界面来指定他们希望从哪些组织接收转发。为了像传统的邮件列表一样运行,我们必须设置 200 个邮件列表,然后创建一个处理订阅的界面。提议的界面将允许 1 - 200 个订阅,并通过一封选择加入确认电子邮件和一个选择退出界面进行订阅。 // END EDIT
客户已被警告,标头欺骗是小孩子的游戏,病毒式附件是一个严重的问题,但仍愿意继续。
因此,需要注意的是,这不是我认可的想法,您使用哪些库来完成此类任务?
Client asked this morning if we can provide a subscription service whereby:
Mail arives to a specific address on a cloud mail server with no procmail/maildrop possibilities
Cron runs Perl or PHP script on another server which checks for new mail and based on address mail purports to be from, does a subscriber look up, and forwards the email with any attachments to all subscribers along with an added unsubscribe link
Script deletes forwarded email
Mail server will have both IMAP and POP access, apparently.
// EDIT
Note that mail will be from 220+ governmental agencies/organizations. Users will use interface to specify which organizations they wish to receive forwards from. In order to run like a traditional mailing list we'd have to set up 200 mailing lists and then make an interface to handle subscriptions. The proposed interface will allow 1 - 200 subscriptions with a single opt-in confirmation email and a single opt-out interface.
// END EDIT
Client has been warned that header spoofing is child's play and that viral attachments are a serious concern and is willing to proceed nonetheless.
So, with the caveat that this is NOT an idea that I endorse what libraries have you used to accomplish this sort of task?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您没有提及您正在处理哪种邮件服务器。 Perl 有 Net::IMAP::Client 和 Net::POP3 来处理获取邮件。
对于使用 SMTP 服务器发送电子邮件,有 Email::发件人或Net::SMTP或Net::SMTP::SSL。
您至少需要一个可用于发送电子邮件的电子邮件帐户(这可能是接收邮件的原始帐户)。
在获取和发送之间,您可以使用 Spam Assassin 检查垃圾邮件,并使用 < a href="http://www.clamav.net" rel="nofollow">ClamAV。
我不知道为什么需要删除原始消息,但至少,我会详细记录每一步。
You do not mention what kind of mail server you are dealing with. Perl has Net::IMAP::Client and Net::POP3 to handle fetching mail.
For sending email using an SMTP server, there is Email::Sender or Net::SMTP or Net::SMTP::SSL.
At a minimum, you'll need an email account which you can use to send emails (this might be the original account that receives the messages).
In between fetching and sending, you can check for spam using Spam Assassin and for viruses using ClamAV.
I don't know why the original messages need to be deleted, but at the very least, I would log every single step in detail.
您所描述的是邮件列表。如果可能的话,您应该考虑使用专为管理此类列表而设计的几个现有软件包之一,例如 majordomo、ezmlm 或 mailman,而不是尝试自己推出。
What you're describing is a mailing list. If at all possible, you should look into using one of the several existing software packages designed for managing such lists, such as majordomo, ezmlm or mailman, rather than trying to roll your own.