shivas/bouncer-bundle
Composer 安装命令:
composer require shivas/bouncer-bundle
包简介
Symfony2 bundle for AWS SES/SNS Bounce topic listener and swiftmailer filter
README 文档
README
Symfony2 bundle to automate AWS SES users using swiftmailer to filter out bouncing email recipients inside project.
AWS SES users know, if you get big amount of Bouncing emails, AWS will send you into probation period. In some cases, there is no easy way to solve issue. This bundle solves problem transparently filtering recipients lists trough own database built by listening on AWS SNS Bounce topic that it creates and hooks to your identity.
Requirements:
- You use AWS SES to send your emails
- You have AWS API key
- You have confirmed email identity (email or whole domain)
Installation
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require shivas/bouncer-bundle "~0.1"
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2: Enable the Bundle
Then, enable the bundle by adding the following line in the app/AppKernel.php
file of your project:
<?php // app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new Shivas\BouncerBundle\ShivasBouncerBundle(), ); // ... } // ... }
Step 3: Add configuration
# Default configuration for "ShivasBouncerBundle" shivas_bouncer: db_driver: orm # currently only ORM supported model_manager_name: null # if using custom ORM model manager, provide name, otherwise leave as null aws_api_key: key: ~ # Required, your AWS API KEY secret: ~ # Required, your AWS API SECRET region: us-east-1 # Required, region of AWS to use bounce_endpoint: route_name: _shivasbouncerbundle_bounce_endpoint protocol: HTTP # HTTP or HTTPS host: localhost.local # hostname of your project when in production filter: enabled: true # if false, no filtering of bounced recipients will happen filter_not_permanent: false # if false, all temporary bounces will not make that address to be filtered forever mailer_name: # array of mailer names where to register filtering plugin - default
Add routing file for bounce endpoint (feel free to edit prefix)
# app/config/routing.yml bouncer: resource: @ShivasBouncerBundle/Resources/config/routing.yml prefix: /aws/endpoints
Step 4: Update your database schema
$ php app/console doctrine:schema:update --force
Step 5: Setup subscription to Bounce topic
Run in console:
./app/console swiftmailer:sns:setup-bounce-topic Bounce
This will use your AWS keys to fetch available identities, and provide you option to choose what identities to subscribe to. "Bounce" in console is name of topic to setup (Naming rules should follow AWS naming rules for topics)
What will happen:
- Bounce topic will be created
- All chosen identities will be configured to send Bounce notifications to that topic
- Your project url will be provided as HTTP or HTTPS (configuration) endpoint for AWS
- Automatic subscription confirmation will occur on AWS request to confirm (if your endpoint is reachable)
Contribute
Contribute trough issues or pull request.
Todo
Mapping for MongoDB and other supported databases by Doctrine
shivas/bouncer-bundle 适用场景与选型建议
shivas/bouncer-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.83k 次下载、GitHub Stars 达 6, 最近一次更新时间为 2015 年 02 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「aws」 「swiftmailer」 「bounce」 「ses」 「blacklist」 「SNS」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 shivas/bouncer-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 shivas/bouncer-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 shivas/bouncer-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Parse a generic mail stream, and convert it to a SwiftMailer Message
This package includes a script and fail2ban configuration that allows you to use fail2ban when utilizing AWS elastic load balancer (ELB) and an apache webserver.
Database Spool Bundle for SwiftMailer and Symfony 3
Integrate Emogrifier plugin into SilverStripe.
Elastic Driver for Laravel Scout
simple api library.
统计信息
- 总下载量: 1.83k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-02-08