Amazon SES - Reject mails based on size - email

I have been trying to configure Amazon SES for receiving emails to my domain, and reject mails which are above a certain size limit.
I am able to get the notification data into a lambda service, where I can see all the common headers but the "Content-Length" header as mentioned in Amazon documentation does not exist in the data I received in the Lambda event.
Is there any configuration I have to do to get those headers? Or is there any other way I can stop accepting mails which is above a certain size?

Ignoring AWS for the moment. When it comes to attachments there are 2 limiting factors, the SMTP configuration and the recipient mail server limitations.
SES has a maximum message size (message including attachments) of 10MB.
http://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html
Amazon WorkMail (as an example of a recipient mail server) has a maximum message size (message including attachments) of 25MB.
https://aws.amazon.com/workmail/faqs/
These configurations are Amazon defaults. I would recommend raising a support request with AWS if you want the SMS maximum message size to be reduced.

Related

Can we send and receive email via Amazon SES?

I have set up Amazon SES for sending emails from my Java application. I also need to receive emails. I see that there is an option to receive emails using SES. But the docs are bit confusing. If I understand them correct, we can only receive emails from the domains that we own using SES.
The following doc says the same:
SES Doc
I just want to know if SES will help me to receive emails from or to various domains including Gmail or only from the domains I own.
You can receive emails from any email address/domain using AWS SES.
Edit: The process of verifying the domain is to prove that you own/control it (the domain), but once you verify it you can send email to any domain, and receive email from any domain. The verification has to do with allowing you to receive email for that domain, or send email via that domain - it has nothing to do with the domain of the people that send you an email.
Before you can receive email for a domain using Amazon SES, you must
prove that you own the domain by verifying it with Amazon SES.
Although Amazon SES enables you to verify single email addresses, you
must verify a domain if you want to use Amazon SES for email
receiving. You can verify and receive email with Amazon SES for any
domain that you own, but it is easier to set up a domain that you have
registered with Amazon Route 53.
http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-getting-started-verify.html
Currently Amazon do additional restriction. When you create new SES account, you are in sandbox.
However, when your account is in the sandbox, we apply the following restrictions to your account:
You can only send mail to verified email addresses and domains, or to the Amazon SES mailbox simulator.
You can only send mail from verified email addresses and domains.
You can send a maximum of 200 messages per 24-hour period.
You can send a maximum of 1 message per second.
To be able to send emails to different domain you should Moving Out of the Amazon SES Sandbox
To be able to receive emails, you must forward them to services like S3 or WorkMail for example
See also

Can't receive email on Amazon SES service

I am developing the application that receives emails from the different users and processes them in some way.
For this purpose, I started to use Amazon SES service. According to the documentation, I verified my domain (set up MX record, added email-smtp.us-east-1.amazonaws.com and so on). Also, I set up the rule for processing received an email (it is lambda function). I didn't add any IP Address Filter so it has to receive emails from all sources.
Now, I trying to send the email to a random address on my domain (for example, admin#mydomain.com) from my Gmail account. But my message isn't delivered and response from the remote server is 530 Authentication required.
I googled my error and saw only issues related to sending emails.
What have I missed with receiving email on AWS SES?
EDIT:
This how my records look. Name fields are mostly empty because system skip my domain name (for example: change _AMAZONSES.mydomain.ext to _AMAZONSES).

AWS and o365 emails are delayed

We have a problem with sending transactional emails out of our web app. When number of sent emails was increasing some of the emails were delivered with delay - even up to 300min.
Using Amazon AWS and o365 smpt server.
Amazon AWS has email sending limitations on your account using default port (if you are using external email solution)?
It's resulting like some emails are delivered with delay (up to 300 min in our case).
To save your time please take a look this thread https://forums.aws.amazon.com/thread.jspa?threadID=37650
Solution: https://portal.aws.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request
Hope that this saves your time too.

Email that allows auto responses via subject line with attachments

i want to host a email client on my web server that allows messages to be processed via subject line, i looked into roundcube's autoreply but that was only a global message for all incoming emails, for example, if my customer emailed me with subject line HOSTING, it would be filtered and sent an auto response with an attached pdf file of our hosting plans
I would actually use Gmail's filters to do this, as otherwise it would be quite complicated. I would forward all the mail to Gmail, and use Gmail's filters (and canned response lab feature) to respond with the PDF attachment.

unable to deliver a pdf attachment to clients

On our website which is asp.net, we make a sale and an automated email is sent out to the client with an attached PDF invoice we create using a 3rd party app. We are having trouble getting these delivered successfully to some corporate clients. Yet we also send a copy of that same email to ourselves which we receive fine. We can then forward this on to the client and they do receive it no problems. So the original is not received but the forwarded mail is.
The webserver is a seperate IP address to our office Exchange server which sends the forwarded mail.
I have tried to find the difference between the 2 mails and it looked like a rich text issue, except that the mail is plain text or html!
The question is a little vague i know as i do not know where to look for the best. It seems to make no differenec which mail program is used, we tried MailEable and it was the same thing.
Mail is logged on the web server as leaving and that is the last we see of it. It doesnt bounce but it is definatley delivered to the client server, but doesnt reach the recipient. We used to track thru Message Labs and it would say it had reached the destination server ok. We do not use ML anymore until we find the issue, keeping it simple.
We have no issues sending to AOL, Hotmail and Yahoo etc.
It appears something in the email is upsetting server based spam software.
We havnt been able to get hold of any email logs from clients.
any suggestions?
Check out this link mentioning a reason not related to size issues
The SMTP (internet mail protocol) RFC (An RFC is a document describing
the standards that make the Internet work.) explicitly states that the
length of a single unterminated line can be 1000 bytes, no larger.
Some SMTP servers violate this, and the Firebox (this is our firewall)
will drop the connection when the line length exceeds the configured
length, which defaults to 1000.
which might indicate your pdf generator and/or mail generator creates output that's not 100% standards compliant. Might be a good point to check as it could explain why certain customer suffer fom this problem only.
552 Requested mail action aborted: exceeded storage allocation
This means there was a violation at the client's ("customer's") mail server. The message exceeded a threshold/limit of some kind. It's not clear if this is a per-message limit or if the user's mailbox is just so full that it cannot accept another message.
Either way, this is mostly out of your control. Only thing you can do it try to keep your e-mail messages and attachments as small as possible. If you can, compress (zip) any attachments before sending.