Why can't grafana send email? - email

Pull grafana helm chart from official site.
https://github.com/kubernetes/charts/tree/master/stable/grafana
Set email send configuration in values.yaml file:
https://github.com/kubernetes/charts/blob/master/stable/grafana/values.yaml#L363
[smtp]
enabled = true
host = smtp.gmail.com:587
user = sender#gmail.com
password = sender_password
;cert_file =
;key_file =
skip_verify = true
from_address = sender#gmail.com
Then install it at local:
$ helm install grafana
Test send email, failed. Don't know why.

You should probably check grafana logs first:
$ kubectl logs <grafana-pod-name> --tail=20
Logs will have the error. I tried with gmail and had to enable Allow less secure apps under Apps with account access in security settings of gmail account.
P.S: I am using smtp port 465 for gmail.

I think I know what is up.
The
user:
password:
fields are not for your email address and password, but SMTP user and SMTP password credentials.

Looks like a firewall issue. Please share the error logs

Related

Sendgrid setup on SQL Database Mail

I have been trying to setup sendgrid on SQL Database Mail but all the time it says Cannot send mail to mail server.
This is what i have done.
I have sendgrid accound with abc#mydomain.com and created api key and SG.xxxx password.
As this is prod setup instance, i had done domain level authentication and my webmaster updated CNAME as requested by sendgrid.
Tested using TELNET smtp.sendgrid.net 587 and authenticated with SG.xxxx password Base64 encoded and this was able to send email from abc#mydomain.com to xyz#mydomain.com
I setup profile with abc#mydomoain.com as SQL notification Profile and selected Basic Authentication and provided 'apikey' as username and 'SG.xxx' as password in Database Mail - 'Configure Database Mail' option in SQL SSMS. Unchecked - 'The server requires secure authentication (SSL) connection' Port 587
I tried to 'Send Test Mail' with 'abc#domain.com' to 'xyz#mydomain.com' but the Database Mail reflects as below screenshot error
I have tried using abc#mydomain.com and sendgrid account password in Database Mail Config wizard for Basic authentication, but sendgrid suggested they don't accept Basic authentication. Please help how and where should i pass the api key if not under Basic Authentication ?
I tried updating with msdb.dbo.sysmail_add_account_sp nad updating records but it too didn't resolve and send email from Database mail.
Any help/ guidance would be greatly appreciated or if you had faced this how have you resolved it.
Hi the solution is as follows
Create a dbmail profile
server name: smtp.sendgrid.net
port : 25
SMTP Authentication
Basic Auth
User name: apikey
Password: : {the api-key for your sendgrid account}
Thats it. Send a test email.
If it still doesn't work, if you are on AWS EC2 ensure that security group allows outbound port:25
Here is the link from sendgrid about apikey authentication.
https://docs.sendgrid.com/for-developers/sending-email/upgrade-your-authentication-method-to-api-keys

Has anyone configured SMTP relay for Outbound Emails in G Suite?

Has anyone been able to route outgoing mail through Google using another non-Gmail SMTP service?
I currently have a website running with Bitnami vm running a CanvasLMS application on a Google Cloud Platform server.
When entering my GSuite Gmail Advanced Settings, the required steps have been done to configure the SMTP relay service. (TLS set to true)
https://support.google.com/a/answer/2956491?hl=en&authuser=3&ref_topic=2921034
I have also configured the setup for the outgoing email server at /apps/canvaslms/htdocs/config/outgoing_mail.yml (replacing username and password with my application's credentials)
production:
enable_starttls_auto: true
address: smtp-relay.gmail.com
port: 587
user_name: USERNAME#gmail.com
password: PASSWORD
authentication: plain # plain, login, or cram_md5
domain: smtp-relay.gmail.com
outgoing_address: USERNAME#gmail.com
default_name: CANVAS LMS
Saved the changes and restarted the server. When trying to send an email in Canvas for new user registration, it never reaches the receivers email inbox.
I have reviewed my application logs and have not discovered any errors related to this
Any thoughts on troubleshooting this SMTP issue???
https://docs.bitnami.com/installer/apps/canvaslms/configuration/configure-smtp/
https://community.canvaslms.com/t5/Question-Forum/emails-are-not-sent-to-users-students/m-p/230561#M128347

Cannot connect to Tigase Admin panel?

I am using Tigase XMPP server, Server parameters that I have set are:
Jabber domain name: chat.example.com >> this is public DNS
Administrator:admin#chat.example.com
Admin Password: tigase
After installation, I can get access to admin panel by URL: http://localhost:8080/ui/ , but unfortunately I can't login with username and password that I have created during installation process. This makes me really crazy, please help.
Point is that, I can login to the server with android client with above username and pass, also when I delete and reinstall tigase and set the domain to ip address of computer in internal network it's working, but when I use DNS I everything looks good but cannot login to admin environment with username and password.
You can find the answer at this post:
https://projects.tigase.org/boards/15/topics/6939?r=6942

SwiftMailer not send mail with Google App account

I'm using Symfony and I'm trying to send an email with swiftmailer. I have an account set up with google app (produccion#mydomain.com) and when I try to send shows me the following error:
Failed to authenticate on SMTP server with username
"produccion#mydomain.com" using 2 possible authenticators
I tried it with my personal gmail account and send the message correctly with the same settings. Just change the username and password.
# Swiftmailer Configuration
swiftmailer:
transport: smtp
host: smtp.gmail.com
username: produccion#mydomain.com #email#gmail.com
password: google_app_password #gmail_password
auth_mode: login
port: 587
encryption: tls
I've been searching the internet and I've found this page from Google, where I can change the access to less secure applications.
https://www.google.com/settings/security/lesssecureapps
In my gmail account this option is active, but if I turn shows me the same error when sending email.
I've been trying to change this setting in google app account but it tells me that this option is not available for google app.
Any idea to send emails from this account by google app? I have to set something else?
EDIT
It seems Gmail prefers OAuth, Swiftmailer supports this authentication mech but its not really documented.
https://developers.google.com/gmail/xoauth2_protocol
https://github.com/swiftmailer/swiftmailer/blob/5.x/lib/classes/Swift/Transport/Esmtp/Auth/XOAuth2Authenticator.php
Any idea how I use it in Symfony?
Have you tried setting the transport parameter to gmail as mentioned in the cookbook? http://symfony.com/doc/current/cookbook/email/gmail.html
# Swiftmailer Configuration
swiftmailer:
transport: gmail
username: your_gmail_username
password: your_gmail_password

Configuring gmail, postfix with my domain?

I have a gmail account with my domain (contact#mybus.com) also I have my website at DigitalOcean with postfix working fine.
My domain "www.mybus.com" has his dns point to my website at DigitalOcean and I wanted to use my gmail account to receive and send e-mails instead of postfix, how can I configure to do this?
Another question, is possible to receive e-mail at gmail accounts and send trought postfix at DigitalOcean?
Thanks!!
Add below to main.cf in postfix
install
yum -y install cyrus-sasl cyrus-sasl-plain
myhostname=<hostname>
relayhost = [smtp.gmail.com]:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_CAfile = /etc/ssl/certs/ca-bundle.crt
smtp_tls_security_level = encrypt
/etc/postfix/sasl_passwd
add gmail account details to above file
[smtp.gmail.com]:587 xxxxx#gmail.com:passwd
use postmap to create db
postmap sasl_passwd
Restart postfix then
this should work.
To solve this I login in my google's account with my domain and I get google's test domain, like:
contact#mybus.com.test-google-a.com
and I forward all my received email to the domain above, this configuration was made in postfix at DigitalOcean.
Now I'm receiving and delivering e-mails at DigitalOcean with postfix and using gmail services to consult my e-mails.
=)