Get original email headers of forwarded email using domain-wide-delegation - python-3.x

We have all spam and phishing emails being forwarded to an IT department for review. We currently have individuals downloading the original email in their gmail inbox and then attaching it to an email to the spam box. This has caused a lot of complaints from less technical users.
I am trying to build a python script that can read forwarded emails and then use domain wide delegation to access their email boxes and retrieve the original headers of the forwarded message.
Do any of the fields in the gmail headers stay constant when forwarding an email so that a forwarded email can be used to query the original email in a users inbox ?
The current method that I have tried reads the message ID's of the spam box, retrieves the message, identifies the sender and messageID's of the messages in the spam box and then uses domain-wide-delegation to query the mailbox of the sender for the original message. This fails however as Gmail messageID's and threadID's of the forwarded emails don't match the original email.

Related

The sender’s email address uses abnormal characters, which might be used to spoof real addresses. Avoid clicking links, downloading attachments.Amazon

Gmail shows a red banner above email messages sent from my custom email. And I have registered the domain. my domain name contains a special character (-). And this issue is for the email is also from the domain, I am using AMAZON`S SES for email services.
All other mail domains not showing this error/warning message.
both emails and domains are verified.
all other mailboxes and web versions are not showing this warning
Only exists when sending mail b/w my custom domain

Dealing with bounced emails

Currently we are using AWS SES to send an authentication email to the user. (This email is not related to the usual login/register authentication, it's our own)
The email address is entered by the user and we are sending one and only one email per email address.
This leads to many bounced emails and AWS suspended our service (around 9000 sent emails and 15% bounce rate).
My question:
How to deal with this problem? Users will mistype their email all the time. There is no way to verify if an email is valid without sending an actual email, right? That means that all SMTP providers will suspend our ability to send emails sooner or later.
Using nodejs to send the email but that is not really relevant I think.
Check the bounces by adding a sns topic and subscribe to it to get more information when bounces emails. (It's not always because of faulty email)
Ask users to enter their email address twice
There are some services out there that you can pass email addresses to that will give you a classification as to how likely the address is to be a “good” address
Here is a document from AWS which describes your problem:
https://aws.amazon.com/blogs/messaging-and-targeting/what-do-i-do-if-my-registration-emails-themselves-have-high-bounce-rates/

How to auto-receive all Gmail messages in a Google Group

I am using a Google Workspace account and wanted to create a backup of all the emails received in my Gmail Inbox so that even after cleaning the inbox (deleting the emails from Gmail), the backup of emails would be there in Google Groups.
To do this, I am thinking of creating a google group with only one member (me).
After deleting the emails from my Email ID, the emails will still be present in the Google group.
But to achieve this, if I add a Gmail forwarding rule, then I might receive all the messages from my name instead of the original sender's name.
Is there a way through which I can auto-receive the original messages on Google Group which I received on my Email ID?
You won't be receiving the email from your email address when adding a forwarding rule.
Therefore, if you plan on forwarding all the incoming mail to your group, you should proceed by adding a forwarding rule and adding the email address of the group.
Afterwards, you will end up receiving the email in the group looking something similar to this:
Reference
Automatically forward Gmail messages to another account.

Allow customer to send me email

I'm bulding website where I want to allow future customers to send me an email. I'm using Node.js to handle sending and thought SendGrid would be good solution. There's actually problem, because SendGrid requires me to define sender and that's impossible because I'd like to customer fill form with his email, etc so I would get this data on my inbox. Is it even possible with SendGrid or maybe there's other tool that would fit me better?
Thanks in advance
what I have implemented in the past was a solution where the application sends an email to it self, and the email address of the user was added to the email header reply-to, this way whenever somebody with the access to the email client would press the Reply button, the user's mail would be the destination.
Example:
admin#yoursystem.com ---> Sends an email to ---> admin#yoursystem.com (with the user's message and his email address in the mail header reply-to).

Sent mail from gmail not showing in cpanel sent mail

I have set up my cpanel email address in Gmail under Check mail from other accounts (using POP3) and also under Send mail as (Mail is sent through: mail.mydomain.com Secured connection on port 587 using TLS)
Looking at Roundcube, I can see the received mails in there, but no sent mails - even though Gmail is sending via my domain server.
Is there a way to be able to view received AND sent mails that go through Gmail ?
Unfortunately emails do not work like that. There is no security as to where an email can be sent from.
I can send an email to anyone in the world and make it look like it was sent from you, most SMTP servers don't verify this information (hence why Gmail can send email from your domain even without your credentials).
Also, although this should theoretically be possible since it's being sent through your domain's SMTP server, it would take a lot of data to be able to store ALL mail that passes through it as associate it with every account. That's why some web email clients only store sent items for around 30 days.
Good luck with finding a suitable solution. This is why many companies use an Exchange server since it provides complete tracking of sent and received emails and disallow the use of Gmail.

Resources