Can my ip address be taken as spammer for using Net::DNS too much? - perl

I have to check the validity of around 1 million email addresses, I don't care if the email is "deliverable", I just want to check if the structure is right and the domain exists. To accomplish this I'm using Email::Valid module with the option -mxcheck which use Net::DNS module as well, but I'm afraid of to be taken as spammer for using it too much (as happen with nslooukup utility). So, can this happen with Net::DNS module?
Hope you can help me.
Regards

Net::DNS does the same thing as nslookup and other tools, it sends a DNS query to a DNS server and processes the reply. I don't know which DNS server you used with nslookup but with both nslookup and Net::DNS you can specify the DNS server to use and maybe you'll find some DNS server which does not consider your activity as spamming. As an example you might try the DNS server provided by google: 8.8.8.8.
Alternatively you can setup your own recursive DNS server on the local machine it let this server resolve all the queries and cache the results. When setup without forwarder the server will not use your ISP's DNS server to resolve all queries but instead ask the DNS servers responsible for the specific domains.
In case you did not understand any of these recommendations I would suggest to have a look at how DNS works.

Related

How to configure a sendmail to relay email from and to a mail server

I've a full server with mail and web behind a dynamic IP access.
This is all configured to update the ip in case it changes and works well with everything except mail.
Although I've implemented SPF DKIM and DMARK, since the address are listed in PBL, many servers refuse the connection.
I'm trying to solve this issue setting up a relay machine for my domains in a small VPS with Fixed IP and Reverse DNS to avoid PBL's.
I've found a link from a guy that implemented a similar solution, but he changes the sendmail.cf file, that is not supposed to be touched.
This link:
https://www.akadia.com/services/sendmail_relay.html
How can I do this in the sendmail.mc file for compilation with m4?
My idea is to set the mx records pointing to this vps acting as relay, and also configure my postfix mailserver to forward mail to the relay, which I think I've found were to do this in webmin.
Hope someone can shed some light in my head.
Thanks in advance.
You can specify default relay for outgoing email in sendmail.mc file using SMART_HOST.
define(`SMART_HOST', `name.of.smart.host')dnl
Useful tip: You may put smart host name in square brackets to avoid lookup for DNS MX records.
define(`SMART_HOST', `[name.of.smart.host]')dnl
WARNING
sendmail uses *.cf files as configuration. *.mc fIle must be "compiled" into *.cf file.

Mail Server DNS configuration of MX Records for Forwarding

I have an account with an internet provider, the majority of my company is based on the mail server they provide which is a bog standard UX style server from what I can tell. They offer the ability to edit the DNS records in the admin login, and you can edit the MX records.
What I want to do is introduce a subset of email accounts that are managed by a second mail server, this being an MS Exchange server. So what I want, I think, is to configure the Authoritative server as the 1and1 server, and configure the Exchange server as a non-Authoritative server and have the Authoritative server forward all non local addresses, or specified addresses, on to the Exchange server. Thus all addresses would look the same old_mx#ab.com and exchange#ab.com, but they would be resolved by different mail servers, working in tandem. My assumption had been you could specify a destination for unresolved e-mail addresses before they are declared void and bounced.
I spoke to a support engineer at 1and1 who said it was possible but they needed the exchange server address. Seemed reasonable, MS seem to think it's possible and provided an address. I just phoned the ISP back with the Exchange server details as provided by MS... and the next engineer says it isn't possible.
Can we confirm this is possible firstly, and how would I go about configuring it?
Not much help has been forthcoming on this question, but I do have some leads on answers myself. It would seem that there is no DNS record solution to the problem, not one commonly supported anyway. The DNS can only really be used for primary and secondary MX definition.
The only way to set this form of triaged MX server seems to rely on the MS Exchange server being defined as the first link in a chain of mail servers. i.e. The DNS referenced server. Once this is done the MS Exchange server can be configured as a non-Authoritative reference, within the server. Once that is done the MS Exchange is then provided with the subsequent servers to reference. On receipt of an e-mail that the MSE server doesn't recognise it will then forward the mail to another server that might be another non-authoritative MSE or an authoritative server of any description. The end server would then be responsible for returning any error messages back to the sender.
If anyone finds a better solution that doesn't involve redefining the master mail MX records I would be very interested, as I don't really want the MSE setup as the primary MX record.

Is it possible to see connection attempts to a Google Cloud SQL instance?

We are currently encountering the following error when trying to connect to a Cloud SQL instance: Lost connection to MySQL server at 'reading initial communication packet', system error: 0.
This is a familiar error, and as detailed here usually means the IP address needs to be whitelisted. However, we believe we have done so.
Is there a way to see connection attempts and their IP addresses that have been made (and refused) to the Cloud SQL instance?
Currently we don't expose that information but it is something we would like fix. :-)
According to #Razvan, as of September 2014, this information isn't exposed.
We ended up using CIDR blocks to search the space and find the actual IP address. This is unsatisfying, obviously, but it's a way to pin down the problem.
If other people want to sanity check that the problem is their IP is being refused, you can add 0.0.0.0/0 in order to accept all ranges and try to connect. If it works, you know what is the problem.
Be absolutely sure to remove this as an accepted range, after you are done, however!
Figured I might help someone who stumbles here.
Had exactly the same issue essentially trying to connect to a GCP SQL instance from a hosting provider.
Whitelist the IP address that is shown in my cpanel and it will not connect. (It used to, but the provider made some changes with their infrastructure lately and it stopped working)
put 0.0.0.0/0 in my Cloud Platform whitelist and it connects no problem.
So now I know that my cpanel IP is not the IP trying to connect to GCP.
After some hair pulling (figured that the bare metal server had a different IP than my cpanel IP, it did, but this also didn't work.)
finally tried the IP address for the name servers that point to my domain and bam. All is good.
If you are facing this issue, try your name server (usually something like NS1.hostingprovider.com etc..). I put both the NS1 and NS2 ip's in the whitelist and we are working fine.

How can I get the machine name of a server from its IP address?

Can anyone tell me how to get the machine name where the server is hosted
i know its IP address.
I know it can be sent from the server itself but still was curious about how it could be done from the Iphone.
Thnks in advance
Regards
Nitesh
I assume you're trying to do a reverse DNS lookup. There are some web-based services which you could use from an iPhone. For example: http://www.ipchecking.com/
However, if the IP address is being used by more than one server, this may not give you helpful results. It's also possible that the service you're looking for on the server could respond only to a name different than the one listed.

Get Azure public IP address from deployed app

I'm implementing the PASV mode in a FTP server, and I send to the client the IP address and port of the data end point. This is stupid because the IP is actually where the client is already connecting, so there ire two options:
How could I get the public IP
address from a given instance? Not
the VIP, but the public one.
How could I get the original target
IP address that the user used from
a Socket object? Considering routers and load balancers in the middle :P
An answer to any of this questions would do, although there is another way that could work... may I get the public IP address doing a DNS look up of myapp.cloudapp.net?
A fourth option would be use the Azure Management API library... but, too much trouble :P.
Cheers.
Not sure if you ever figured this out, but here's my take on it. The individual role instances are all behind the Windows Azure load balancer and have no idea what the original, outward-facing IP address is. Also, there's no Management API call that returns IP address - Get Deployment returns the URL but not the IP address. I think the only option is going to be a dns lookup.
Having said that: I don't think you can host a passive ftp server in your role instance (at least not elegantly). You may open up to 25 input endpoints on your role (up from 5 - see my recent blog post about this update), but there's manual work involved in the configuration. I don't know if your ftp application lets you limit your port range to such a small number of ports. Also:
You'd have to define each port as its own input endpoint (this is the manual labor part I mentioned) - input endpoints don't allow a port range to be specified, unlike the internal endpoints.
You'd have to specify the port number that's used internally, and the port numbers would need to be sequential
One last thing on ftp: you should be able to host an sftp server with no trouble, since all traffic comes through one port.
The hack that I'm contemplating right now is to retrieve http://www.icanhazip.com/. It isn't elegant and is subject to the availability of that service, but it gets the job done. A better solution would be appreciated!