So I have a shared hosting account that uses DirectAdmin. I have a domain that I own that is my live site. I wanted a testing environment too, but since DirectAdmin costs money, instead of setting up a local dev server, I set up a new domain (devsite.org) on my shared host. Since I didn't want to buy another domain name for testing, I just edited the hosts file (C:\Windows\System32\drivers\etc\hosts) pointing devsite.org to my shared IP address.
This works great, until I try to do any kind of work with email on my dev site. What I need to accomplish (and mimic from my live site) is to send an email to announce#devsite.org that is piped to a cgi script (handled through email forwarding in DirectAdmin). However, when I send an email from my gmail, it is undelivered because gmail doesn't know about this made up domain address.
I talked with my hosting company and they said I could set up a local mail server to work around this, but I'm fairly lost in what that means. Does anyone have any input or thoughts or even search terms to google? Is it as simple as editing some hosts file, but for emails?
Any help is appreciated! Thanks.
Gmail won't deliver to your host because it doesn't know what IP address maps to "devsite.org" because you didn't buy "devsite.org" on the public internet. Your host knows which IP address maps to that because you edited the hosts file.
The alternative being suggested is that the mail be sent from your machine, which has the mapping between devsite.org and the IP address you want to associate with that (for private testing). Setting up a mail server so you can send mail from that machine with the altered hosts file is relatively common compared to other server setup tasks, and you can likely find some tutorials online. Did your hosting company mention any specific mail server they suggest setting up?
As another possible alternative, have you tried emailing that address but replacing "devsite.org" with the public IP address of the server, in the e-mail address?
Related
I bought a domain.
I pointed his name servers to:
ns1.digitalocean.com
ns2.digitalocean.com
I have added a CNAME record point to #
I want to send and receive emails using my Mac mail program.
I know that I should probably build a full mail server which is an awful thing to do.
Therefore, I have another server (not digitalocean) running on cPanel. In this cPanel I have a very powerful cPanel's mail server.
How can I point my digitalocean CNAME to the remote server where the cPanel is?
I hope it's clear enough.
In order to make your domain points to the digital ocean server, you will have to create A record that points to the IP of that server, same goes to any subdomain.
Regarding your mail server, you need to make mail.mydomain.com points to the IP of your cPanel server using A record not CName and also modifying other records like SPF/DKIM records.
For your local mail client you can get the configuration by logging into the cPanel user account and view the mail settings
I am planning to send email to my friends (they are in gmail and hotmail) from my local PC which I use at my home (in dynamic IP). Is it ever possible to configure IIS or Apache in my local PC and connect to home broadband and can send email?
I do not want to take any help from any other hosting company (as generally we do by using .Net or Php by taking SMTP address) so if need I can try to configure some website name to my PC (if possible).
I do not need to get any reply from them they will send again to my gmail address.
Is it ever possible as my plan?
This question may be of some help to you: How to send email from local machine to gmail?
You should be able to run a .NET, PHP or other local web service on your home machine and use one of the libraries included in the link above to send e-mails without requiring a 3rd party web host. Out of curiosity, what are you trying to accomplish exactly? There may be a simpler solution within gmail's API.
What you want is to build a SMTP Server!
Things you will need
STATIC IP.
Reverse DNS from your ip to you hostname (type nslookup yourip on cmd.exe the result must be your hostname)
DNS MX entry on your DNS ZONE like 0 your.host.name.com
A program/code that will implement the RFC2821 http://www.ietf.org/rfc/rfc2821.txt
I have build a SMTP server that ONLY receive emails... maybe you can start from there....
https://stackoverflow.com/questions/24834765/how-receive-emails-in-net-listening-connection-from-gmail-yahooo-not-a-pop
I do web development from my ubuntu server, ubuntu is running in virtualbox in my windows 7. What do I need to configure inside of ubuntu in order to send email to any public domain, gmail.com for example? I need this set up for testing email templates etc... Thanks, Jaro.
For testing email on the ubuntu machine, the best way is to create a local account and use email like account#localhost.
It is not a good test otherwise if you want to send mail directly from your system, as many ISPs are not allowing SMTP traffic over broadband DSL, e.g. my provider THREE in UK doesnt allow it, as well many big email companies will reject emails coming from broadband subnets.
Another way would be deploying the mail server, which is complex, also you can test your app at any free hosting provider too.
Basically testing email is nothing close to being simple and to test it properly, you need a production system with mail fully setup and working, whitelisted, not on DSL and so on.
I am trying to avoid running through DNS servers to get an email message to an address on one of my hosted virtual accounts.
I know I can surround the IP address with square brackets but how do I designate the mailbox username for the (virtual) hosted account on the server?
In other words,
I have multiple domains hosted on a virtual server -- all sharing the same IP address
obviously, user#domain.com works fine
but how do I send to user#[123.456.78.90]
Is what I want to do, possible?
Thanks.
A virtual host needs a domain name in order to figure out what to do. You want to send it to an IP address instead of a domain name. Thus it is not going to work through normal methods. You might be able to specify a "default" domain if none match Otherwise, your only hope is to manually forge email. By this, I mean:
telnet 123.456.78.9 25
HELO myhostname.mydomain
MAIL From: <myemail#mydomain>
RCPT To: <user#domain.com>
DATA
From: myemail#mydomain
To: user#domain.com
Subject: Testing
This is a test
.
QUIT
What you want to do is possible, and even secure when using Cjdns IPs. Some clients (e.g. mutt) are "broken" and choke on raw ips as domain. (While technically broken, it is an uncommon use case - mutt is a good client.)
You'll need to tell your MTA to accept the raw ip. E.g. on sendmail, add
[123.456.78.9]
to /etc/mail/local-host-names
You'll also have to turn on accept_unresolvable_domains as sendmail doesn't seem to regard already resolved domains as "resolvable". (Other MTAs may require different tweaks.)
I use thunderbird to send to raw ips, and it works just fine. A friend uses claws-mail with no problems.
I've recently setup my Ubuntu web server with exim4 so my PHP website applications can send email such as "thank you" and "confirmation" notices.
I've got it setup and working such that I can send email to gmail, Yahoo! and my work address. However, my work email gets caught up in our spam filter. I'm new to setting up mail servers so I'm not sure what I might need to look for in making this mail server more trusted, while keeping is secure.
Here are some details:
Server is NATed behind a firewall.
Firewall has port 25 open for outgoing SMTP traffic (from server to anywhere).
Server is virtual hosting a couple different of our websites
The server is running the following exim4 config:
dc_eximconfig_configtype='internet'
dc_other_hostnames='web-serv.example1.com;example2.com'
dc_local_interfacees='127.0.0.1'
dc_readhost=''
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets='' dc_smarthost=''
CFILEMODE='644'
dc_use_split_config='false'
Questions:
Do I need to open port 25 to incoming SMTP mail (anywhere to server)? I wonder if other mail servers need to talk to my mail server to verify itself, in a sort of handshake attempt.
I have not created any MX records primarily because the server has different websites on it the mail server should send mail for all the websites. Do I need to pick/create a domain address and create MX records for it?
One thing of note is that the mail headers look like this:
Return-Path: <www-data#example2.com>
Received: from web-serv.example1.com ([Firewall public IP Address])
Received-SPF: neutral (google.com: [Firewall public IP Address] is neither permitted nor denied by best guess record for domain of www-data#example2.com)
"web-serv" is the host name of the server, such that you get this if you type it into the command line:
$ hostname
web-serv
and "www-data" is the account name for the Apache2 server that Ubuntu gave it as default.
Any other general advice would be appreciated. It's all new to me.
Cheers!
One item of note, since I posted this question time time ago (almost 10 months) is that I found out the biggest issue I had was with setting up the DNS for reverse DNS on our hosting providers side of things.
In other words, our hosting provider (the people who give us our IP address and manage our hardware) had to enter a record to match my server(s) hostname to whatever IP address it used.
There's a specific name for this. I believe it's a "PTR" record but the name escapes me at the moment, but you basically tell them "my server hostname is ..." and they do a quick update to the DNS for reverse DNS purposes.
When I asked this question, we had a different hosting provider who didn't really help explain this to me, and after switching providers, I got to talk to someone who was happy to help me understand that side of the equation.
And as I understand it, this is setup by the people who assign you the IP addresses. But there's probably more to it than that.
Once I got that setup properly, email had no problem getting through the spam filters and Gmail/Yahoo showed SPF as "passed". It was showing neutral before.
Our company email was set to drop any email that would not resolve reverse DNS, which is why I could not even receive the email or find it in the spam filter. Of course, that situation would be dependent on the company and what email policy and software they're using to manage spam. Some might just drop all email that does not reverse DNS and some might dump it in to spam filters instead.
Hope that might help some people with similar issues.
Cheers!