Skip to content
/ s3email Public

Client for reading or summarizing S3 encrypted email

Notifications You must be signed in to change notification settings

daqqad/s3email

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

s3email

Script to forward encrypted messages stored in S3 buckets by SES as attachments via SES.

Purpose:

I wrote this because I have a bunch of domains where I don't actively use email, but also don't want to bounce everything. This script allows me to schedule a cron job that runs once a day and sends me all emails that arrived on catchall accounts for these domains as attachments for simple review.

Requirements:

# composer require aws/aws-sdk-php phpmailer/phpmailer

AWS actions:

ses:SendRawEmail
s3:DeleteObject
s3:GetObject
s3:ListBucket
s3:ListAllMyBuckets
kms:Decrypt

Usage:

Modify the following variables to your own:

$kmsKeyId // This is ID of KMS key SES uses to encrypt messages stored in S3
$mail->setFrom("[email protected]", "S3 Mailer") // From address and subject for summary emails
$mail->addAddress("[email protected]") // Address where you want to receive summary emails

You will also need to set region for various AWS clients to match your own

I use EC2 roles for access to all required AWS services. You can also configure authentication inside PHP if you're not running this on EC2 instance.

About

Client for reading or summarizing S3 encrypted email

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages