Classic asp emails are going to spam instead of inbox - asp-classic

I have moved my classic asp websites from vps to dedicated server(windows server 2012). All the emails are going to spam instead of inbox(gmail and hotmail), emails are not at all receiving at yahoo. I have properly configured smtp on windows server.

Most receiving email servers are quite picky about where your email is sent from. They check your sending IP address and can choose to classify your email as spam or reject it all together unless all of the following things are true:
reverse-DNS for you IP address should give a proper name (and not look like a dynamic or dial-up address)
the reverse-DNS should again forward resolve to the same IP address
your IP address must not be on any blocklist or have a bad reputation. The problem here is that there are may different blocklists and you do not necessarily know what lists they check. You could test your IP address at http://multirbl.valli.org and see if there are any known issues
the domain-name of your sender email address can have SPF policies published in DNS that explicitly tells the world what IP addresses are allowed to send emails for that domain, and if your IP address is not included you are considered a fake sender
And there can be any number of other anti-spam/forgery checks in place that cause trouble for you. The best bet would be for you to relay your outgoing emails via an official mail server (for the domain your are trying to send from), as that already has the above things covered, but that usually requires some authentication mechanism or other agreement with the real mail server you want to use.
All these checks by the receiving end are there to stop spam and other unwanted emails. In order to not be classified as a spammer, you cannot just set up a random server at a random address and start sending emails from a random email address (or email address that normally are sent from some more official email server).

Related

Send email to Gmail server from IOT devices

I have an IoT device (SEL). I want to send an email to a company gmail email (random.email#mycomp.com).
The IoT device requires the numerical IP address of the server, but I was informed that the IP address of the Gmail server always changes. How could I get the fixed IP address of the Gmail server?
Thanks.
With the limitation of this device, I am afraid you will need a proper mail server/service that you can send to (specifying an ip) and that will send the email to the gmail servers.
you can find the ip address of gmail servers with the dig command under linux
dig +short gmail.com MX
dig +short gmail-smtp-in.l.google.com A
or online : https://www.digwebinterface.com/
but it is most likely that gmail will flat out refuse your email for a few reasons; lack of spf record, lack of dkim record lack of reverse dns and lack of a matching A record and if the email comes from a redidential ip, although it is not part of the email standards, it might also get refused.
if you can authenticate as an existing existing user in gmail (with user and password) (the screenshot provided does not show if it is a possibility) then you might be able to send as this specific user.

Obtaining MAC address

According to Obtain client MAC address in ASP.NET Application, it is not possible. I am not entirely convinced because whenever I connect to Tim Hortons WiFi, my MAC address is known.
Occasionally, the network is slow and I see this URL like this before being redirected to the Connect page:
http://timhortonswifi.com/cp/tdl3/index.asp
?cmd=login
&switchip=172.30.129.73
&mac=60:6c:66:17:1a:83
&ip=10.40.66.229
&essid=Tim%20Hortons%20WiFi
&apname=TDL-ON-NEP-02177-WAP1
&apgroup=02177
&url=http%3A%2F%2Fweather%2Egc%2Eca%2Fcity%2Fpages%2Fon-72_metric_e%2Ehtml
So according to this URL, the site knows the IP address of the router, my MAC address, the IP address assigned to my device by the router, the network SSID, some other pieces of information, and the URL I was trying to access prior to connecting.
There's two options: Tim Hortons WiFi Basic and Tim Hortons WiFi Plus, where the "Plus" option allows me to connect to any Tim Hortons WiFi access point in Canada automatically with this device. Registration requires an email address, so I'm assuming this is possible by checking the MAC address and storing it in a database that routers ping upon connection. More info here.
According to the extension of this page, I can safely assume it is ASP. How are they obtaining this information?
When your client traffic reaches the first router, that router will route the traffic to the adecuated port, changing the response MAC address with its own MAC address so the answer will be routed to it. And this will happen for each of the routers the packets travel by. So, at the end, the web server will only see the MAC address of the last router where the answer will be sent to be routed back to the previous roter, and this process repeated until the answer reaches the client.
No, there is not way to obtain the MAC address of client from server side.
But, what you are seeing is a client sending its information to a server. So, the answer can be converted into "how can i obtain my local mac address and send it to the server?".
Browsers do not allow to read this information. Some properly signed/configured ActiveX or Java applets can do it, but they can be blocked, or you can have some device that will not execute java nor activex, so it is not a reliable way of doing it.
In the case in your post, the easiest way of doing it is configuring the wifi access point dhcp or dns server to serve a proxy configuration file that will allow to configure a redirection to the desired web server, redirection that has been created inside the access point, which have all the shown information in your post.

IP Spoofing in HTTP Request?

I know someone that is able to take a list of emails + ip addresses and
subscribe each email to an autoresponder (GetResponse / Aweber).
But the amazing thing is that he can do it with the ip address that's provided
in the list.
So if he has an email xxx#abc.com and IP 185.252.123.321
he's able so subscribe this email to the autoresponder but
if you enter into the autoresponder account and look on the
lead record, you'll see 185.252.123.321 in the IP address field
and not the real IP address that the request sent from.
Does someone have any idea how could he do it?
If the software is using the X-Originating-IP mail header to determine the IP address of the email, then this can be easily spoofed.
X-Originating-IP: 185.252.123.321
It is trivial to set this header from a mail client that allows customer headers to be set or if the person is connecting to an SMTP server directly and setting it themselves. You may find this answer relevant too.

how to get mac address from ip address from client site in asp.net?

i want to store details of visitor in site like
ip and mac address
i got ip address of client
but how can i get mca address of client ?
Simple answer: you can't. The MAC address is never transmitted. The best you can hope is to get the IP but remember that this IP could be the one of a proxy server situated anywhere in the world if the user configured some proxy to access the internet.
If your website has been compromised you will have to contact the authorities in order to attempt to catch the person who did it. In most countries regular citizens do not have the power or authority to request the type of information you need from ISPs.

How does client-machine/browser handle unrequested HTTP response?

Imagine the following:
User goes to script (http://sample.org/test.php),
Script sends an HTTP request to some other page (http://google.com/). For this example, we'll say using curl.
The script sets the IP address of the request to the user's IP, via CURLOPT_INTERFACE.
I know already that the requesting script will not receive the response, as the remote-host will send any responses to the IP address given in the request.
What I am wondering is what happens to this response? Assuming the client is on a LAN that has one external address and that all traffic sent to that IP is handled by a router acting as a DHCP server, will the response even get back to the user's machine? If it did, would there be any way to ensure that it was handled by the user's browser? And if so, how would the browser handle this, typically? Would it open a new window with Google in it?
I definitely have a follow up to this question, but I am very curious what goes on at this level, before I experiment further.
The script sets the IP address of the request to the user's IP, via CURLOPT_INTERFACE.
Usually, this won't work. Your ISP knows which IP address you are supposed to have and will not forward traffic coming from "fake" IP addresses.
In particular, since you can only communicate one-way with a fake IP (since the answer won't reach you), you would not be able to establish a working TCP connection, since TCP requires a three-way handshake. Thus, you wouldn't be able to submit your web request.
What I am wondering is what happens to this response? Assuming the client is on a LAN that has one external address and that all traffic sent to that IP is handled by a router acting as a DHCP server, will the response even get back to the user's machine?
If the user's PC has an internal IP address and uses NAT, the router will not know which LAN machine to forward the packet to (since it did not see any outgoing request to which it could match that response). Therefore, the answer would be dropped.
Even if you could get the response to reach the client:
If it did, would there be any way to ensure that it was handled by the user's browser?
No. As stated above, a TCP request consists of a three-way handshake. This handshake has not been completed, so the operating system would just drop the packet.
CURLOPT_INTERFACE is for use on computers that have multiple IP addresses assigned to them, to specify which of those addresses should be used as the source IP for the connection. You can't use it to spoof some other computer's IP address. Most likely you'll either get an error, or the option will be ignored and the OS will choose a source interface automatically (the default behavior).
The response will be returned on the same TCP connection as the request.

Resources