Password Reset policy in OpenSSO - smtp

I had to implement Password Reset policy....For which I had OpenSSO deployed on Glassfish server and OpenDS as the Data Store...I followed Indira's blog...
Password Reset With OpenDS
And executed all commands....Since I did not configure SMTP, when I try to Reset the Password of a particular User (Note: I hav specified a Gmail ID as the email Address of that user) after answering the Question, I get confirmation saying
"Your password has been reset but we are unable to send it to you. Contact your administrator."
How do I configure SMTP in OpenSSO and OpenDS?

OpenDS (and OpenDJ, the continuing open source project) has some global properties to point to the SMTP server.
Note that it doesn't support authentication at this point.
$ dsconfig set-global-configuration-prop --port 4444 --hostname hostname --bindDN "cn=Directory Manager" --bindPassword password --set smtp-server:smtp.example.com --trustAll --no-prompt
Kind regards,
Ludovic

I just had this problem, so for the record I think it's probably because you need to replace <Password-Administrator> in the WEB-INF/classes/amPasswordResetModuleMsgs*.properties files with a real email address.
I found that my Authentication debug log file had this error in it:
ERROR: Could not send email to user [Ljava.lang.String;#30720e48
com.sun.mail.smtp.SMTPSendFailedException: 553 5.5.4 <Password-Administrator>... Domain name required for sender address Password-Administrator
;
nested exception is:
com.sun.mail.smtp.SMTPSenderFailedException: 553 5.5.4 <Password-Administrator>... Domain name required for sender address Password-Administrator
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2057)
I found the solution on the OpenAM mailing list originally: http://lists.forgerock.org/pipermail/openam/2012-April/005912.html
I used this sed command to do update all the files at once:
sed -i -e 's/\<Password-Administrator\>/user#address\.com\.au/g' amPasswordResetModuleMsgs*.properties

Related

Forgot password system using Gmail & Laravel 8

I am using built in Laravel 8 login system with its scaffolding have a project that has a forgot password for its login system which sends emails from requests. I'm trying to use Gmail and XAMPP for sending the email. I am unable to send an email using the Gmail account, So I tried configuring my .env and other configuration files in XAMPP. But I get the following error upon sending the request
Swift_TransportException
Connection could not be established with host smtp.googlemail.com :stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:ssl3_get_record:wrong version number
Could someone tell me why I'm getting this error and what should I do to get rid of this? Thanks a lot.
<**env**>
MAIL_MAILER=smtp
MAIL_HOST=smtp.googlemail.com
MAIL_PORT=587
MAIL_USERNAME=********#gmail.com
MAIL_PASSWORD=*********
MAIL_ENCRYPTION=ssl
MAIL_FROM_ADDRESS=********#gmail.com
MAIL_FROM_NAME="${APP_NAME}"
<** php.ini**>
inside xampp\php\php.ini under the function under the tab [mail function]
SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = ******#gmail.com
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
<**sendmail.ini**>
inside xampp\mail\sendmail.ini under the function [sendmail]
smtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
auth_username=*******#gmail.com
auth_password=******
force_sender=*******#gmail.com

SMTP Mailgun Throwing Error with Mastodon

I'm currently trying to run a mastodon server I've installed everything correctly and I haven't gotten an error till now
I'm setting up my SMTP this is the info I've put in
SMTP server: smtp.mailgun.org
SMTP username: mastodon#notifications.example.com
SMTP password:
SMTP authentication: plain
SMTP OpenSSL verify mode: peer
Then when I try to send a test e-mail it throws this error
E-mail could not be sent with this configuration, try again.
SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)
Ahh! So someone just pointed out on this thread (https://mastodon.social/#slackz/99772551531768277) that authentication SMTP_AUTH_METHOD and SMTP_OPENSSL_VERIFY_MODE should be commented out in the config. The mastodon:setup rake task automatically adds them (gonna look into making a PR to change that), but if you:
comment out the two lines in .env.production with the above env variables
ensure all your mailgun account records are verified, that you can send email with a curl command they supply on their site
restart the mastodon processes:
sudo systemctl restart mastodon-*
Opened an issue about the behavior here:
https://github.com/tootsuite/mastodon/issues/6975

Open EdX (Bitnami install) fails Gmail authentication for email registration.

I am unable to get Open EdX to authenticate to my Gmail account to send registration emails. Here's what I'm working with:
New installation of Open EdX via Bitnami.
Edited lms.env.json and cms.env.json based on this guide from the Bitnami wiki, including adding EMAIL_HOST_USER and EMAIL_HOST_PASSWORD fields.
Recompiled and restarted server.
Registered a new user and got a successful response via the LMS (account created and let me in).
However, no email confirmation came through.
Google account that I'm using allows access for less secure apps.
Log shows the following:
File "/opt/bitnami/python/lib/python2.7/smtplib.py", line 731, in sendmail
raise SMTPSenderRefused(code, resp, from_addr)
SMTPSenderRefused: (530, '5.5.1 Authentication Required. Learn more at\n5.5.1 support.google.com/mail/answer/14257 x123sm6973392pfb.54 - gsmtp', u'nyedid#sandtontechnologies.com')
2016-05-10 19:22:38,850 INFO 13202 [audit] models.py:1802 - Login success - user.id: 5
2016-05-10 19:22:38,919 INFO 13202 [audit] views.py:1822 - Login success on new account creation - Test2
I can log in to the account with no problem.
The link provided in the error message (https://support.google.com/mail/answer/14257) notes that you may receive this error if you have 2-factor authentication enabled on your account. In that case, you should generate an App Password (https://support.google.com/accounts/answer/185834?hl=en#ASPs) specifically for your Open edX instance, and use that in place of your normal GMail password.
Does that help?

ejabberd contribution mod_apns does not work

I have added mod_apns to my ejabberd server. You can find this module here.
my ejabberd.yml configuration is like this:
mod_apns:
address: "gateway.sandbox.push.apple.com"
port: 2195
certfile: "/Applications/ejabberd-15.10/conf/cert.pem"
keyfile: "/Applications/ejabberd-15.10/conf/key.pem"
password: "myPassword"
the address is sandbox since I am still in development phase. And I have tested my cert.pem and key.pem and they are valid and working.
I send my device token to ejabberd server like this:
<iq type="set" to="myEjabberdServer.com">
<register xmlns="https://apple.com/push">
<token>myDeviceTokenWithoutAnySpace</token>
</register>
</iq>
I can see my device token is saved in apns_users database.
But I still do not get notifications when my user is offline.
Am I doing anything wrong?
Does it work with gateway.sandbox.push.apple.com?
should my device token be without space and only characters?
I appreciate your help..
You have asked for an alternate approach. This alternate approach takes the process of triggering push notifications by the ejabberd server.
1. Use the mod_interact library. This will provide you an ability to transfer your messages to another url.
2. From there on you can use the direct HTTP call for push notifications

Smtp error 451 Temporary local - please try later on Cpanel Server

I have a Cpanel Server.
It send emails correctly expect from 1 domain which hosted on the server , so when I try to send email from that domain using roundcube or Horde I got the errror
SMTP Error (451): Failed to add recipient "recipient#exmple.com" (Temporary local problem - please try later).
does anyone know why and how to fix this?
I found the porblem:
After reviewing the file /var/log/exim_mainlog using
tail -f /var/log/exim_mainlog
I noticed that the error was:
2013-05-29 20:04:28 SMTP connection from [127.0.0.1]:36797 (TCP/IP connection count = 1)
2013-05-29 20:04:28 lowest numbered MX record points to local host: domain.com (while verifying <user#domain.com> from host localhost.localdomain (domain.com) [127.0.0.1]:36797)
2013-05-29 20:04:28 H=localhost.localdomain (domain.com) [127.0.0.1]:36797 sender verify defer for <user#domain.com>: lowest numbered MX record points to local host
2013-05-29 20:04:28 H=localhost.localdomain (domain.com) [127.0.0.1]:36797 F=<user#domain.com> A=dovecot_login:narena temporarily rejected RCPT <recipient#exmple.com>: Could not complete sender verify
2013-05-29 20:04:28 SMTP connection from localhost.localdomain (domain.com) [127.0.0.1]:36797 closed by QUIT
so the main problem was:
lowest numbered MX record points to local host
after couple of search I found the soluation in http://forums.cpanel.net/f5/lowest-numbered-mx-record-points-local-host-73563.html
which was to:
login to WHM and go to Main >> DNS Functions >> Edit MX Entry for the domain
set MX priority to 0 for the related domain and save.
I had the same problem after running a script to fix directory permissions on a cPanel-powered server (CentOS 6.5). I checked the logfile (tail -f /var/log/exim_mainlog) and found this error:
require_files: error for /home/user_name/etc/domain.com: Permission denied
Just ran the following command and the issue was fixed:
chown -R user_name:mail /home/user_name/etc/
Hope this helps someone.
check the the file /var/log/exim_mainlog to see more information about the error
tail -f /var/log/exim_mainlog
while trying to send email
Check your MX Entry in Cpanel, if the existing domain priority is less than or equals to 0, set it to 1. Mine is fixed. Hope it will help you.
Wow, after about an hour of searching and meddling with different files, I'd caution any novice not to venture out editing anything before you have a backup or image if your server, as you can cause irrevocable damage to your server. So many people talking garbage about what you should do or test without any real solution.
Anyways, here's what worked for me:
Real problem: Exim was updated to latest version which has loads of bugs like this issue.
How I fixed my server:
Authenticate to Linux via SSH and run the command lines through which we download and install the old version of EXIM.
Command Line 1: wget https://ca1.dynanode.net/exim-4.93-3.el7.x86_64.rpm
Command Line 2: rpm -Uvh --oldpackage exim-4.93-3.el7.x86_64.rpm
Command Line 3: systemctl restart exim
Command Line 4: Systemctl restart clamd
Command Line 5: systemctl restart spamassassin
Optional: just type "Reboot" to restart your server
The command lines above does the following:
Downloads the old package (I'm sure you can google other sources with this file)
Install the old package without prompt
Restart the Exim service
Restart the Clamd Service (AV)
Restart the spamassassin service (Spam Filter)
Restart outlook or whatever you use for mail client and send an email. Mine works, hope yours do too.