Forwarding mail from Cloudflare through Mailgun - cloudflare

I have a domain that is run through Cloudflare. I want to receive custom emails for my domain such as hi#domain.com. I want those emails to be forwarded to my personal gmail address.
I set up Mailgun with my domain, and it verified the MX, TXT, and CNAME records are set up correctly at Cloudflare. I set up a route on Mailgun to forward any mail sent to my domain to my personal gmail account. However, I am still not receiving email send to hi#domain.com.
I have set up mailgun using the recommended domain mg.domain.com

I have had a similar issue that turned out to be related to the Spam Experts system, called Professional Spam Filter in Cpanel. Within that subsystem under Incoming there is an Edit Route. That needed to be changed from the domain name to the Server name (name of the host server).
I tested it on two different domains and it worked instantly.

Related

How to pass dkim and dmarc at alias forwarded email adress on google domains

I have purchased a domain at domains.google.com mainly for the reason to get cloud dns/dns service aswell.
Googles email service (google workspace) is pretty expensive (on many other providers custom mail costs 5€ per year not month), so i created a alias which forward the mail to a gmail account (works perfectly).
The problem is answering to emails from gmail with the alias. Mechanically its working fine, i can add the alias at gmail (https://support.google.com/domains/answer/9437157) but im not able to get dkim and dmarc passed.
How i can setup dkim and dmarc correctly at a alias forwarded email adress if possible ?

Setup Mailgun with Cloudflare subdomain

I'm trying to setup my domain to receive emails through Mailgun and Cloudflare, and i think i'm really closest but can't make it work.
In Mailgun, i've all DNS verified:
I think the problem is in Cloudflare, configuring the subdomain (that Mailgun suggest me to create mg.mydomain.com)
I have not got any record related with the subdomain (mg.mydomain.com). Is any change i'm something?
Also, I already setup a Route in mailgun to redirect incoming emails to my email address.
Thanks in advance!
I found the answer here:
https://community.cloudflare.com/t/setting-mx-records-for-a-subdomain/4942/2
What you need to do is:
On Mailgun:
Setup a domain for your incoming email (e.g.: foo.example.com)
On Cloudflare:
Go to DNS
Add an A record for your subdomain (foo.example.com)
Add an MX record. For the first field (name), put: foo.
When you click 'click to configure', it will open a dialog box where you can put the values for mxa.mailgun.org
Repeat for mxb.mailgun.org
For the CNAME record, you just need to make sure that the status is configured as 'DNS Only' (the little cloud on the right is grey)

AWS CloudFront to host SSL and forward on to sendgrid not working

I am trying to have links in my emails from my application register as SSL/HTTPS secure links. This helps deliverability and other things email clients may do treating links as http vs https.
Our application is using SendGrid to send emails, which also supports click tracking on our links for us. In order to do this SendGrid, and most other email sender services replace the original link we put in, which was an https://blahblah.com link with their own link, http://clicktrack.sendgrid.net or something that is not https, but rather http.
SendGrid supports "white labeling" the click tracking link with something like
http://subdomain.blahblah.com and also https version if we set it up properly. SendGrids requirements for https/ssl link are shown here
https://sendgrid.com/docs/Classroom/Build/Add_Content/content_delivery_networks.html
Basically they are asking us to setup a CDN or other server that will host our SSL certificates, terminate the SSL, and then forward the request on to their servers. Once that is in place they can "turn on" ssl on their end for our email links.
I tried setting this up in AWS CloudFront with the origin as sendgrid.net and the distribution having our SSL certificate and a route 53 CNAME pointing to our distribution. So the subdomain.blahblah.com points to distribution CDN, CDN points to sendgrid, and all should work.
Testing this though it does NOT work. If I go to the http version of subdomain it does work, CDN forwards properly. AWS support has suggested it was an issue related to host headers and the CDN not being able to validate the origin when I had a 2nd CNAME for the origin on my subdomain2.blahblah.com. That led me to remove 2nd cname and direclty put sendgrid as origin, but that hasn't worked and they haven't provided a solution yet. I get error like this..
ERROR
The request could not be satisfied.
CloudFront wasn't able to connect to the origin.
Generated by cloudfront (CloudFront)
Request ID: pl1bS3OObC6mUd2vyyhM6bNFt3xyLsfzVIqNmiPkEO7mQgJyQCn_pA==
Any ideas welcome or a different way to do this?
The issue was in behaviors I was forwarding all headers. Should NOT forward "Host" header in this situation or the origin ssl call will break as it wont match expected. AWS support did finally figure this out and recommend to me :)

How to allow the application visible only through some IP?

I'm developing a Windows application, using Eclipse, Tomcat server and Struts2.
I am using LDAP verification to log in.
I only want to allow specific people to view my application, i.e person with IP 173.12.12.12 can view it, while 173.12.12.72 should not.
How should i do this?
Also if someone enters an ID which is disabled, the application should not work on his terminal anymore. How should i do this?
If you want to handle your IP address Whitelist within your web-application (eg. on a database), you can detect user's IP address server-side by reading the X-Forwarded-For HTTP Header from the Request.
If you want to handle your IP address Whitelist within your application server, (in this case, Tomcat), you must put a RemoteAddrValve in your context.xml (source).
Both this methods work, but both fail at detecting real IPs in case of IP spoofing. It's naive for a malicious user to spoof their own IP address, for example with CURL, or with a Firefox AddOn like anonymoX.
You shouldn't rely on IP address to protect your system. But you can use them to enhance the user experience to your authenticated, trusted users... once they're in, you can assume they're not malicious and start profiling their devices by IP to provide targeted functionalities.
if it is a range of IP, fetch the IP value from a property file and verify against it.
if it is a single value, fetch the value from the database assigned to users and verify against it.

Can a Facebook App for remote login be identified with IP instead of domain name?

I have a list of sites running on the same server, so they all share the same IP address. a facebook app was created in order to have login functionality on the sites, but as I see, the app needs one and only domain (for security reasons...) that is enabled to use the login process.
Is there a way to identify remote sites with IP instead of one domain name?
Thanks!
No, you must use a domain name, you can enter multiple domain names though, or run the logins through login.yoursites.com or something like that