Mail using Ansible

52 views
Skip to first unread message

Akshay Jadhav

unread,
Mar 10, 2022, 2:21:19 AM3/10/22
to Ansible Project
Hi Guys,
I have written a play for sending an email.
 I am able to send an email but in receivers inbox it's going into spam folder. Can someone please help so that mail will go in inbox.
Thanks in advance.

- name: Mail sending Using mail Module mail: host: localhost port: 25 to: x...@example.com subject: Ansible Port Configuration Output body: <pre> {{ lookup('file', "./output/{{ inventory_hostname }}.txt") }} </pre> delegate_to: localhost

Dick Visser

unread,
Mar 10, 2022, 2:58:30 AM3/10/22
to ansible...@googlegroups.com
This is a case of "don't shoot the messenger".
Talk to the receiver and find out why it ends up in their spam folder,
and fix that.
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/0271ddb2-e27b-4c1b-92d4-78993716f5ddn%40googlegroups.com.



--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

Nico Kadel-Garcia

unread,
Mar 10, 2022, 4:08:54 AM3/10/22
to ansible...@googlegroups.com
Unless your ansible server is set up with SPF DNS records, or going
through an appropriate SMTP services, especially from cloud deployed
Ansible servers, yeah. You're likely to get blocked. The RFC is
https://datatracker.ietf.org/doc/html/rfc7208 .
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAL8fbwO1vysn6g2Vgd%2ByVTCWNi6fxSDPUwAuFFyNdGTdsnddMw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages