Need help in configuring sendmail for registration emails

25 views
Skip to first unread message

Ulhas Shah

unread,
Apr 17, 2017, 6:42:15 AM4/17/17
to opentreemap-user
Hi,
I have setup the otm-core successfully in a docker container.

But now i am facing issue in sendmail as I am not receiving registration mails .

Can anyone guide me what all things I should check?

For example, ports to be opened, send mail configuration steps and Django local settings for mails.

Thank you,

Rick Mohr

unread,
Apr 17, 2017, 10:13:05 AM4/17/17
to opentree...@googlegroups.com
While configuring an email server is not part of OpenTreeMap, we'd like to have basic setup steps in the wiki.

Please try these steps and let us know what happens:

1) Add to local_settings.py:

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'localhost'
EMAIL_PORT = 25
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_USE_TLS = False
DEFAULT_FROM_EMAIL = '<email-address-you-w...@yourdomain.com>'

2) Install the postfix email server:

sudo DEBIAN_FRONTEND=noninteractive apt-get install postfix

3) Restart the Django app:

sudo service otm-unicorn restart

4) Register a new user and see if you get an email

--
You received this message because you are subscribed to the Google Groups "opentreemap-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opentreemap-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Rick Mohr, Software Developer
Azavea  |  990 Spring Garden Street, 5th Floor, Philadelphia, PA
215.701.7504  |  Web azavea.com  |  @azavea
Message has been deleted

Ricard Roca Munárriz

unread,
Jun 23, 2017, 12:04:12 PM6/23/17
to opentreemap-user

Regarding the sendmail configuration I edited /etc/mail/sendmail.mc in order to use SMTP

dnl SET OUTBOUND DOMAIN
MASQUERADE_AS(`sam.net')
MASQUERADE_DOMAIN(sam.net)
define(`SMART_HOST', `smtp.sam.net')dnl
...

MAILER_DEFINITIONS dnl #MAILER(`local')dnl MAILER(`smtp')dnl

and

m4 sendmail.m4 > sendmail.confg.

Test it as its says in the wiki
echo "Subject: test" | /usr/lib/sendmail -v your...@yourdomain.com

and check /var/log/mail.log for errors

Hope it helps

El dilluns, 17 abril de 2017 12:42:15 UTC+2, Ulhas Shah va escriure:
Reply all
Reply to author
Forward
0 new messages