Can I use my web server as mail server? - email

I have a dedicated Linux web server where my website is running like www.example.com.
Now I want to start another service for my users and want to give mailing features like Gmail and Yahoo mail.
I want to give facility to my users to create email IDs as they create on Gmail or Yahoo Mail and use it as their email address like XYZ#example.com or ABC#example.com.
Is this possible for me to use my dedicated web server as mail server too,
or I need to hire a new specific mail server for this purpose.
Also, if I can use my server as mail server and can give IMAP and POP like features then what are the PROs and CONs in that?
My hosting company says that I have facility to create unlimited email addresses
and I have created a few for mt like support#example.com and feedback#example.com
and I am getting emails on these IDs.
Is that mean, my hosting already have setup a mail server for me (the same I mentioned in my question and want to setup)
Or this is just for me to use and manage my website and I can not share these email addresses with my users by giving an email service.

Yes you can run simultaneously a web and mail server. Follow part 3 of this guide: http://mysql-apache-php.com/ to set up email. Just make sure that your router is fully capable (supports NAT etc.) - it should be able anyway
However it does appear from your question that your hosting company has set up its own mail server. Which does mean unlimited emails, however the only issue could be the amount of space they are willing to host for you (As in you can only have 2 GB of space on their mail server). Hope this helps.

Related

How to set up website domain email address for access on Windows Mail and others

I have recently developed a website for a client and don't have much experience working with emails. I have set up and configured an info#ourdomain.com email address and can access it through our web hosting service.
However I want to be able to get my client to log into the email so they can begin working with it, ideally with Windows mail.
This is the information I have been given by the host (I changed all the information for security).
Information Provided
Would be great if I could get a step by step on what options to choose, account type, and where to put the certain port numbers etc.
Thanks in advance

Sending email from GCE or AWS on behalf of users

How could I use Google Compute Engine (or a similar service, like AWS) to send email on behalf of users via their SMTP server?
I am interested in building an online email client which allows users to enter their SMTP and POP servers and send/receive email, like they would with their desktop clients. GCE blocks all SMTP ports to prevent abuse and recommends using a mail service like SendGrid instead. However, after researching dozens of these services, they all seem to only support transactional email using their own SMTP servers, or possibly a pre-cleared smtp server. I simply want to send email using the user's SMTP server (ex smtp.mail.yahoo.com), just like they would if they were using a desktop client.
I realize I could host my own servers but I am not interested in maintaining the infrastructure. I would like to host everything on a cloud service. Is there any way I can work around Google's restrictions with an existing service?
As I'm sure you are aware, you would have to have the user enter their SMTP server information and account credentials. You would then use that information to connect to their SMTP server.
By default AWS EC2 instances have SMTP traffic on port 25 rate limited. To remove this limitation, you would need to fill out and submit the following form:
https://aws-portal.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request
If you're looking to send mail as a Gmail, Hotmail, or Yahoo user, you'll probably want to call the service's API to have the server send mail on the user's behalf. There are several benefits of this:
You'll need to get authorization from users (usually via an OAuth flow)
in order to access their mail. This means that users shouldn't be
surprised that you're sending mail from their accounts, and they'll
have some control over your access.
The mail will be signed and come from the appropriate IP addresses to
comply with the various spam-control mechanisms set up by those
companies. Without this, it's likely that the mail you send will end
up in the bit-bucket of the recipient.
By using the API, the service should be able to keep a copy of the
sent mail in the user's outgoing mail folder. This will let the user
see and search for the original message sent if they want.
Unfortunately, this may also mean that each mail service you want to send from will need separate integration, and that you may not be able to send as the user's email address from smaller providers.
Note that the App Engine mail API allows you to send mail as the currently logged-in user (when logging in, users have a similar consent screen to the OAuth process mentioned above).

Sending emails from websites on shared hosting - what solutions do I have

I spent weeks on researching the net on wich solution should I use in order to correctly send emails from my websites hosted on shared hosting accounts, but the more I read - the more confused I get.
So this is my situation!
I have among others, an ecommerce website built on OpenCart, on a shared hosting account and a few email addresses in cPanel, like sales#mydomain.com, newsletter#mydomain.com, contact#mydomain.com, etc. These email accounts are also accessible via roundCube by the user at email.mydomain.com and via IMAP\SMTP on their email clients like Thunderbird.
The website has these email addresses set up and it uses (at leas Opencart does) php mail() to send emails for events (new order, contact, quote, etc).
Since last year or so, providers like Yahoo keeps banning the server's IP address and emails get bounced back with failure messages, Gmail recipients get them in Spam folder, etc. I almost monthly ask my hosting provider to change IP address, ask Yahoo or spam services to unblock the IP address, do tests, etc and I don't even have a large number of emails going, like 100 per month, most of them are Ask for a quote wich are plain text messages.
In other words, it isn't working.
What I am looking for what solution should I use to send emails from websites hosted on shared accounts, that is transactional emails and newsletter emails without upsetting Yahoo,Google,etc. subdomains? external smtp service? configure email accounts in a specific way? What do you guys use ?
If you are able to add extensions to Opencart on your shared host, you may want to consider adding the phpmailer extension (http://www.opencart.com/index.php?route=extension/extension/info&extension_id=3932). This will enable you to send all outgoing mail from Opencart via phpmailer, which can be setup to send mail through a remote SMTP relay (such as smtp.gmail.com, sendgrid, or some other remote SMTP relay). A reputable remote SMTP relay will probably be less likely to be blacklisted than your host's SMTP relay that the php mail() command is currently using.

Sending emails from vendor's multiple domains

We have custom cms that currently sits on a vendor's subdomain, such as cms.vendor.com. It sends email out as coming from user#vendor.com and it seems to be working fine (using Email Queuing + SwiftMailer)
Our vendor asked us to put in the functionality for his users to be able to select from a dropdown, 3-4 other emails address associated with them from other domains he owns. Basically we need to be able to send out emails from our server labeled as being sent from #hisdomains.com, multiple domains.
I am a web programmer and have no clue when it comes to relaying messages. How would I go about being able to send out emails from his other domains? Does he need to setup permissions on his mail servers, or do I need to get into his SMTP servers to send out?
What are some things I should look out for when it comes to SPAM and gmail trusting us?
EDIT:
Not sure if my original question was clear enough. Vendor owns three domains: mysite.com, myothersite.com, mythirdsite.com. He wants a user from our crm to be able to send emails he has on those domains. So my dedicated server will be trying to send an email out as user#mysite.com, user#myothersite.com, and user#mythirdsite.com in the FROM: header.
As long as your server is allowed to send on behalf of a domain your vendor owns, you should not have a problem; just change the From: header to something else when you send out the e-mail.
Stuff like SPF, Sender ID and DKIM have to be properly configured to allow your server to send on behalf of any domain.
See also: http://en.wikipedia.org/wiki/E-mail_authentication
Any domain where the mx record resolves to the same server will work. so user#any.domain will email the same user on the mx contingent server.
To answer your question - just make sure that the mx records in the DNS zone file for each domain name points to the same server as the domain you want to share emails on.
also dependent on server configuration (like shared or whatever) I'm assuming it's dedicated with a simple email server installed. I'm not sure on cPanel/shared servers. but possibly the same.

Development SMTP Server

I need a cross platform (at least windows and mac) development utility that runs as an SMTP server that acts as an SMTP server but will redirect all mail to a single address that's configurable. It would also be helpful if it wrote the contents out to a file or gui. Long ago I configured Apache James to do this but it wasn't that straight forward to figure out. Hoping there's something really simple out there.
I need the emails to be forwarded (to the single address) so I can see how they are rendered on different clients (gmail, outlook, etc.)
Thanks! -Mike
We used Mailtrap for this. It give you remote smtp server account and direct access to all mails in it. So you just enter given smtp credential in your application and after that all email sent by your system will be visible on mailtrap.
On mailtrap you can have as many smtp account as you want( different account for different application environments, or different application) Also you can manage access to your account ( so only trusted people will se your emails) and you can forward some emails to real email addresses.
It doesn't do the forwarding you are looking for, but for most of my testing I make use of fakemail (http://www.lastcraft.com/fakemail.php) it's simply a script that listens on a port an acts as an smtp server, writing any incoming mail to a directory.
You could use Python's smtpd library and override the process_message function to only send to the desired address -- i.e. replace the "to" field with your desired constant email address.
Here's a page with some examples of using smtpd (with asyncore) to actually send out mail.