-2

I have a VPS server running Ubuntu OS. A developer is creating a NODEJS website and suggests to use a third party service to send emails. Such as Sendgrid.

I'm sure years back there were other ways to send emails because these services never existed, I vaguely recall installing an SMTP server on my VPS to do this and also using libraries such as 'sendmail'.

So I would like to know at a high level, what methods there are to send emails from an web application, how it works and potential issues such as black-listing mails or emails ending up in trash.

Most of the emails will be marketing and registration, I should imagine 20-40 emails a day, but may grow later, should this make a difference.

Look forward to response. Thanks

1 Answers1

0

IMHO, particularly if you are sending marketing emails, the difficulties of running your own server and managing reputation at this scale likely does not add up.

Nevertheless, you can run an MTA on your server and send mails through it. I like postfix (which is an easy, performant, security focussed drop in replacement for sendmail), but sendnail, exim are other common choices.

You will need to ensure you have reverse lookup for your IP address and make sure it matches forward lookup, and you will need to prevent relaying. (Most decent mta's do this out the box - only allowing you to send email from localhost).

You then need to modify SPF for your domain, handle dkim if appropriate and do reputation monitoring. This last one is likely to be very time consuming and there is no silver bullet for it.

davidgo
  • 5,964
  • 2
  • 21
  • 38