Old linux user here; but only recently started using Google Cloud solutions to create a few VM instances running CentOS. Works great and have been using them for a few years successfully.
I am adding some new functions and I would like to be able to get emails that normally go to root to be sent to me.
In the past, I simply added a line in /etc/aliases at the end of
root: myemail#gsuitedomain.com
This worked well as most of the boxes that I managed were inside a network where I also controlled the local mail server and could just send through it.
It appears that I need to setup some sort of relay using G-Suite?
Is that the right path?
Also, I really don't want to relay the email. I just want to send it to one of the G-Suite accounts. So, no real relaying needed.
Can someone direct me in the right direction for the easiest path to accomplish this?
Thank you for your help,
Tamer
GCP by default blocks all outbound traffic on port 25 so you have to use different one. You can read about it in more detail in the GCE documentation.
In my opinion you will have to run sendmail, postfix or anything else to send emails out but you have to configure them to some other port than 25.
Related
I have created a hosting instance in GCP but unable to send or receive email from it. I have used Vesta-cp as control panel and Ubuntu 18.04 minimal as OS. I have opened all required ports in firewall rule and apply them to instance but still get nothing. Any one interested in this issue please answer. Thank You !
See this guide: https://cloud.google.com/compute/docs/tutorials/sending-mail/ Port 25 is always blocked and can't be used to send emails.
Having said that, you probably are better off using managed service for sending emails. Managing security and compliance for mail servers are increasingly getting difficult to manage. So you are better off using a managed service to send emails.
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.
I'm using a custom root server to handle multiple domains on one IP. The basic OS is Debian and the WWW is done with: Nginx+MariaDB.
Now I'm trying to install any working non MySQL based Email service on it. I've watched several tutorials and googled the whole web for a solution.
My last attempt was to work with Postfix and Dovecot. The emails was kind of identified but getting the error:
<domain.org/info#mail.domain.com> (expanded from <info#domain.org>):
mail for mail.domain.com loops back to myself
Is there a step by step explanation for multidomain mail alias setting that is not running on any MySQL?
Do I need to run my virtual emails on MySQL?
Any Cpanel or Plesk like interface that could handle virtual Email aliases on non MySQL basis?
postfix can use mysql as a backend, but it's not required. Usually you can find tutorials on the net just using the db files.
no, you don't have to.
No idea. I usually do that stuff directly in the files or with a database backend.
This question might be better suited for serverfault, but it's pretty generic as it stands.
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 want to be able to run an EC2 instance (CentOS LAMP based) as a mail server and create email addresses for users when they sign up so that they can upload files via email. The emails would be parsed and attached files processed and added to S3 for storage.
Is this feasible?
What mail package would I need for this?
I would like to be able to create email address such as username#uploads.domainname.com
my domainname points to a webserver not on amazon web services so I realise this may not be possible.
where do I start with this, are there any good resources for setting up a mail server on EC2
many thanks
To answer the question, yes it is possible. As paul says, if you require 24x7 and long term then EC2 may be more expensive than some other providers. But it can make sense if you're a startup or if you're doing this to learn more about these topics.
Basic steps would be:
Create a linux EC2 Instance http://docs.amazonwebservices.com/AWSEC2/2008-02-01/GettingStartedGuide/?ref=get-started
Install a mail package http://flurdy.com/docs/postfix/
Change your DNS MX record http://en.wikipedia.org/wiki/MX_record
Amazon has had trouble in the past with blacklisting.. but they're trying to address that. Read here: http://developer.amazonwebservices.com/connect/thread.jspa?threadID=37650
Edit: You could also use a pre-configured CentOS image (combining step 1+2), this one has postfix already installed: http://developer.amazonwebservices.com/connect/entry.jspa?externalID=821
Using EC2 as a mail server does not seem like a good fit to me. You're not using either the "Elastic" or the "Cloud" part of the "Elastic Compute Cloud". You need something that has to be up 24x7, has the same IP all the time, and doesn't need to expand or contract on demand, so a VPS would be a better solution.
It can probably be done with the use of an elastic IP along with the correct configuration of the mail server on the ec2 instance to receive mails.
However, it might be easier to use Google AppEngine. You can forward the messages from username#uploads.domainname.com from your existing mail server to your appspot email address, then process the messages and store the files on S3 with a some appengine code in python. See the appengine documentation on receiving email for more information: http://code.google.com/appengine/docs/python/mail/overview.html