I have a VM instance on Google Compute Engine, which is running Windows Server 2012 R2. I have my Apache web server, PHP, MySQL, FTP, and various other things running great, easily accessible from the world. I installed MDaemon Messaging Server (Alt-N's email server), which I had on my old physical box for years. I am able to use port 110 just fine, but I simply cannot get SMTP to work. Yes, I'm well aware of (Compute Engine's Blocked SMTP Ports). Knowing these blocked google ports, I would like to choose port 2525 as Mdaemon's SMTP port. I added firewall rules on the server to allow it, and I added the Compute Engine Network port exceptions as well, and of course changed the Mdaemon's server settings for 2525. I still cannot send email. Hell, I even tried port 2626 and nadda.
I understand I could sign up through google's recommended "sendgrid" that would force me to use mail.sendgrid.com, port 2525, and have a maximum of 25,000 per month limit (on free sendgrid account), but I personally think it's ridiculous needing to sign up and have limits on email when I paid $2,400 for Mdaemon email server. I should be able to use my own domain's mail.mydomain.com and authenticate through MY email server, not sendgrid's.
Is there something simple I'm missing to be able to use my own email server software on my google compute engine VM instance? Or is it just fact that this is the right I give up by choosing google's cloud server services?
SMTP server, in your case MDaemon, sends all outbound emails directly to the recipient's mail servers on their inbound SMTP port which is 25. This is the port you will need to configure on your MDaemon's SMTP outbound port setting. So changing it to 2525 or 2626 won't help because recipient's SMTP servers usually do not listen on those ports.
As you also mentioned all outgoing traffic to port 25 (SMTP) is blocked on Compute Engine. Therefore you'll need to configure a smart host for your MDaemon message routing which listens on a non-blocked port. This is something like using a third party service (e.g. SendGrid).
Related
I have a web server running CentOS and a separate mail server running Microsoft Exchange. I have the web server connecting to the mail server via SMTP on port 587 to send emails.
Sometimes the connection to the mail server refuses, but it's rare. Could an intermittent failure be related to port settings? I would have thought it's all or nothing.
For the CentOS web server, what rules should I be looking to configure in the iptables if any? Do I need to add an entry for port 587 on this server? Or do I just need to allow incoming connections on the mail server for 587?
Thanks in advance.
You don't need to set up any iptables rules on your webserver, since outgoing connections are allowed by default. Your occasional drops won't have anything to do with the webserver's firewall, so you'll want to look at tuning your Exchange server, if the error is impactful enough to worry about it.
Network policies at my workplace (a University outside the US) are rather inconsistent. While every port other than 80 and 443 is blocked, no websites are restricted (at least for professors). Gmail/pop and smtp sockets are open as an exception to the rule (which makes both me and the Dean think there is no particular policy against personal e-mail).
I'm faculty at this University, but also teach at a different one, for which I use a university-specific, non-gmail e-mail address. I have all of my e-mail history in Outlook, however, as you can suspect I can access that alternative e-mail address through webmail but not through smtp/pop/imap from my workplace. We asked the sockets to be open but have been given no response by the IT guys in more than a month.
I've been considering port tunneling, but haven't access (right now) to a server with ports 80 and 443 to ssh-tunnel through. I know I could use one port at home to tunnel either the incoming or the outgoing e-mail. But I think it's too power consumming for just half the job.
Is there a way I can do the tunneling with the help of some free service like no-ip, for example?
So far, the best solution I've found is to ssh-tunnel the imap socket. This way, I can get both incoming and outgoing mail through one tunnel. I plan to wake-on-lan and hybernate my home server in order to save power.
I have a web app that sends email via SMTP (Gmail, Zoho Mail servers). The thing is, the email sending works in my localhost but not on my VPS (using WHM).
I contacted support and the guy replied:
If your VPS has ConfigServer Firewall (CSF) installed then this would
most likely be causing the problem. As it is working on localhost but
not externally this certainly sounds like it might be the case. You
will need to review the firewall configuration on the VPS and ensure
hose ports are allowed outbound.
But when it comes to server management and configuration, I'm totally lost. I did check the CSF settings page on WHM but not sure where to start.
Any recommendation or solution would be appreciated.
You have to allow outgoing traffic to ports 25, 465, 587 and in the case of Mandrill 2525 as will. You should actually be fine enabling only the one you will connect to. So:
sudo vim /etc/csf/csf.conf
add 25,2525,465,587 to TCP_OUT, and to TCP6_OUT if you use IPv6.
You might also need to remove that ports from SMTP_PORTS if you have SMTP_BLOCK enabled (if it is set to 1).
Source: https://community.centminmod.com/threads/csf-firewall-info.25/#post-6613
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 have no trouble sending out email with my EC2 server, but how can I check the email that is sent to me? I have an elastic IP setup and modified reverse DNS records. Do I need to install Postfix to receive email?
Ensure that port 25 is active and open on your server. Install an SMTP service on your instance ...postfix is mighty fine.
Ensure you have also set up some MX records if you want to receive email from the world...
I suppose the first thing to do is testing if you can open a telnet connection to port 25 on your server. Then you know if anything is listening for incoming mail.
If not, then you should probably install postfix as well as test your firewall settings (I seem to recall the EC2 having some sort of firewall setting for which ports to allow in the web interface)
edit: correct port number