How to configure chef to send emails via postfix using chef handlers - email

I am trying to configure chef handlers to send email whenever a chef client run fails following https://docs.chef.io/handlers.html . In the example here email is being sent via SMTP server. I don't have SMTP Server and wanted some way to send email using postfix. How can I configure helper.rb in that case? Or is there any other way to send emails with lesser configurations?

No, you'll need a relay host to send through. You can use GMail or something like AWS SES, Mailgun, Sendgrid, or Sparkpost though.

Related

Configure IMAP/SMTP on existing Server for existing Domain (Ubuntu 20.04)

I have a Server (DigitalOcean Droplet) with a domain/website hosted on it using LAMP. I want to add a webmail server, to be able to send e-mails through SMTP and receive e-mails to forward them to external IMAP clients.
I need to send e-mails for app/site notifications, I send e-mails through simple SMTP scripts. And I need to receive e-mails being sent to my email#domain.com to then forward them to external IMAP clients.
I want to configure it with the minimum requirements, cause I want to have it in the same server where I host my site and I don’t want it to consume too much memory/cpu.
Any recommendations?
I’ve seen this Postfix steps (https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-on-ubuntu-20-04) but I don’t know if it’s what I need.
I also believe that I need to configure some DNS records, such as MX, SPF, DMARC and DKIM. But these are not mentioned on above link.
Notes:
I do not own any e-mail hosting server, my intention is to create one with this. Is Postfix what I need?
I want to create e-mail accounts such as: noreply#domain.com, help#domain.com, sales#domain.com
I don’t want to control an external e-mail account, I want to host it here in this server.
Thanks in advance.

Setting up Send only mail server

I am setting a mail server for one of my website for which I am using external ZOHO mail server. But for sending mails through the website I am using postfix mail server. Now the issue I am facing is when I send mail through my website to some other mail eg. tushar#gmail.com it send the mail with no issue but if I send mail to one of my own domain email e.g. care#example.com the mail is not received.
I have follows this tutorial to setup send the only postfix: and followed SPF record and DKIM setup using this and this.
I resolved the problem by removing $myhostname variable from mydestination, which probably changed the way mail was sent. Earlier it was through local and now it is being sent through smtp

send/receive mail from OWIN self-host webapp with custom domain

I have a domain, a Console Application with OWIN self-host.
The Console app host on AWS EC2 server windows server 2012.
My mail feature of server is sending Verification Mail
I've google many owin mail send or receive infomation,
but all of them are smtp/pop3 on google or some other smtp/pop3 server.
Is it possible to do send / receive mail in a console with current ip or custom domain?
I've try method.
Use hMailServer:
No luck in this. can't send/receive any mail, and set gmail for add smtp and pop3,
but fail.
the error msg: "We were unable to locate the other domain. Please contact your other provider."
Use AWS SES:
Still fail on this.
AWS SES need vail domain with anyaccount#domain, but i have no mail feature on my server.
Use my gmail:
Connect gmail need SSL. I have no SSL.
And research hours for host ssl on OWIN self-host,
Is there other solution for this?
I set a DNS MX Record from my DNS provider.
Now,I can send/receive mail with hamilserver and gmail smtp/pop3.
not best solution, but my problem solved.

AWS SES - Sending Emails

I have created an SES Account and I have verifed my domain - easy as the A record is already with AWS route53. I now need to send emails. Note: I have also created an smtp user account and have the keys.
Question - can I use any (lets say PHP as I like PHP) php script to send emails via SES?
I have found a couple of sites that appear to have scripts for SES like http://www.orderingdisorder.com/aws/ses/ but wanted to ask if now my domain is verified and I have user/keys etc is SES really just an SMTP gateway and I can use any (working) script to send emails via this interface?
thx
You can use their SMTP gateway or send emails via the AWS SDK for PHP programmatically. Just download the SDK, include it in your PHP file and you're good to go.
http://aws.amazon.com/about-aws/whats-new/2011/12/13/amazon-simple-email-service-gets-simpler-with-smtp/
http://docs.aws.amazon.com/AWSSDKforPHP/latest/#i=AmazonSES
http://aws.amazon.com/sdkforphp/

How to send mails from Magento?

I have installed Magento 1.7 on my mac. What should I do to send emails about orders from localhost. I'm developing store localy and just want to check how it works.
Use the tool give on this link Test mail tool
For sending the emails you need SMTP server which listens to port number 25.By default there is no SMTP server with wamp. So you need to use some SMTP tool to check email sending feature in local environment.