I have setup redmine and configure email sending feature with smtp.
It takes around 15 seconds for any user action to complete if email is enabled( sending email takes time at our smtp server as it has a configured delay).
So I have tried using async_smtp as shown below.
production:
delivery_method: :async_smtp
async_smtp_settings:
enable_starttls_auto: true
address: "smtp.xxx.com"
port: 25
domain: "smtp.xx.com"
authentication: :plain
user_name: "yyy#xxx.com"
password: "xxx!"
Redmine shows that email is sent, but I couldn't see the email. Log also doesn't show any error.
Can someone help?
Adding more detail below:
with the above settings, I get success log as shown below:
Sent email "Redmine test" (16ms) to: [email]
Redirected to http://[ip]/redmine/settings?tab=notifications Completed 302 Found in
328ms (ActiveRecord: 0.0ms) Started GET
"/redmine/settings?tab=notifications" for [ip] at 2015-10-05 15:13:04+0530
note: I have replaced ip and email with [ip] and [email]
I made it work!
I found that you need to add extra level in the config file, email_delivery. Its hinted at elsewhere in the file, but all the examples on redmine.org miss it out. Seems that only async requires it.
production:
email_delivery:
delivery_method: :async_smtp
async_smtp_settings:
address: ...
It's look like it's the same problem I had, your smtp server can't reroute your request. I had to let my configuration to smtp instead of async_smtp as our smtp server can't handle it.
Is it your own smtp server or a hotmail, gmail, etc?
BTW can you try to add this config.action_mailer.logger = nil to your config/environments/production.rb configuration file, and give us the output of log/production.log
EDIT: Look like redmine have problem handling certain SSL certificate.
Related
Good day!
I am trying to configure user invitation with email confirmation.
Invited user accept email, but when he push 'confirm account' button he get an error.
First there was a certificate error. but when I added the certificate, another error occurred. As I understand it, the error is quite logical, because the certificate was issued to our hostname. Is there any way to change localhost to our hostname? or are there other ways to solve this problem?
ERROR {org.wso2.carbon.identity.mgt.endpoint.util.client.ApiClient} - Error while performing the request method: POST on the resource: https://localhost:9443/api/identity/user/v1.0/validate-code com.sun.jersey.api.client.ClientHandlerException: javax.net.ssl.SSLHandshakeException: No subject alternative DNS name matching localhost found.
Editing RecoveryEndpointConfig.properties in repository/deployment/server/webapps/accountrecoveryendpoint/ dont solve this problem
You can configure the hostname by adding the following entry to the <IS_HOME>/repository/conf/deployment.toml config file,
[server]
hostname = "your_host_name"
Since by default IS uses localhost as the internal hostname, you will need to add it as a SAN for the certificate.
Another option is to define the hostname and internal_hostname both in the toml config as below,
[server]
hostname = "your_host_name"
internal_hostname = "your_host_name"
You may refer to the following official documentation to get a detail understanding of changing the hostname
https://is.docs.wso2.com/en/latest/deploy/change-the-hostname/
I checked quite a few stackoverflow questions about this and none doesn't seem to be the exact case as me and didn't really work for me so posting this question. So I'm trying to setup weblate using docker which wants me to set weblate email host user, password etc. to send mails to users when using the site, my current docker-compose.override.yml looks like this:
version: '3'
services:
weblate:
ports:
- 1111:8080
environment:
WEBLATE_EMAIL_HOST: smtp.mymailserver.com
WEBLATE_EMAIL_PORT: 465
WEBLATE_EMAIL_HOST_USER: translate#domain.com
WEBLATE_EMAIL_HOST_PASSWORD: password
WEBLATE_SERVER_EMAIL: translate#domain.com
WEBLATE_DEFAULT_FROM_EMAIL: translate#domain.com
WEBLATE_SITE_DOMAIN: translate.mydomain.com
WEBLATE_ADMIN_PASSWORD: mypass
WEBLATE_ADMIN_EMAIL: myemail#domain.com
I checked this with gmail app in mobile with the same outgoing server configuration and it worked perfectly fine there (I was able to send mails from it) but whenever I try it with weblate, I'm seeing this error:
SMTPAuthenticationError: (535, b'Authentication credentials invalid')
This is the whole error I get in the logs
You don't have SSL enabled, that might be reason for server rejecting the crendentials. Try enabling WEBLATE_EMAIL_USE_SSL.
PS: In the upcoming release, this will be turned on automatically for port 465, see https://github.com/WeblateOrg/weblate/commit/efacbf5d7e36c7207e985744639564e7edfc2fbb
I have my domain-name hosted on Ionos. Along with the domain-name , I also purchased mail server from ionos.
I have migrated my nameservers from ionos to aws.
I have also added a record for my mail-servers to point to existing records on ionos. (MX record)
It all seems to work but whenever my mail servers have to send data to hotmail account this message is received at my mail-server and hotmail email account is unable to receive required data.
This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of
its recipients. This is a permanent error. The following address(es)
failed:
abc#hotmail.com:
SMTP error from remote server for MAIL FROM command, host: hotmail-com.olc.protection.outlook.com (some-ip) reason: 550 5.7.1 Service unavailable, Client host [my-ip] blocked using S
pamhaus. To request removal from this list see https://www.spamhaus.or
g/query/ip/my-ip (AS3130). [BN8NAM12FT047.eop-nam12.prod.prote
ction.outlook.com]
--- The header of the original message is following. ---
Received: from [127.0.0.1] ([aws-ip]) by mail server name
(mreue109 [some-ip]) with ESMTPSA (Nemesis) id
some-id-value for <abc#hotmail.com>; Date
Content-Type: text/html; charset=utf-8
From: mail server
To: abc#hotmail.com
Subject: Welcome
Message-ID: <xyz>
Content-Transfer-Encoding: quoted-printable
Date: --------
MIME-Version: 1.0
X-Provags-ID: some junk values
X-Spam-Flag: YES
X-UI-Out-Filterresults: some junk values
I have tried to contact both Ionos and AWS Team regarding this issue , so far I have not received any help .
I am looking for guidance on how to solve this issue.
Hotmail.com is notorious for "eating" mails. I am also using Ionos and I am usually not able to send mails to hotmail addresses.
For some unknown reason hotmail has blacklisted ionos as spammer and nobody seems to know how to fix it.
I hoped that they managed to fix it over the last years, but reading your post that seems not to be the case. At least you got an answer. I have sent mails to hotmail and neither I nor the receiver got any information that the mail failed.
I follow this doc to enable wso2is to sent email for self user registration :
https://docs.wso2.com/display/IS520/Self+Sign+Up+and+Account+Confirmation
But I am not receiving any email.
I would like to investigate but there is no message in the log althoug I add the following logger in log4j.properties :
log4j.logger.org.apache.axis2.transport.mail=DEBUG
log4j.logger.com.sun.mail=DEBUG
And also put -Dmail.debug=true in server.sh but nothing about smtp error or mail execption shows up in the log...
How can I fix it and investiguate ?
Regards
If you are using a gmail account for sending emails, you have to go to [1] and select "Turn on" option for allowing 3rd party apps to send emails using gmail.
However if that is not the case, you can enable debug logs for following.
log4j.logger.org.wso2.carbon.identity.mgt=DEBUG
and identify the issue based on the logs.
[1] https://www.google.com/settings/security/lesssecureapps
It might even be that a virusscanner blocks the gmail port (587) for spamming.
Using DevNullSmtp.jar helps to see what is going out.
See also
https://www.yenlo.com/blog/wso2easy-errors-sending-otp-emails-in-wso2-identity-server
I have posted this question on the Amazon AWS Forums, but figured I might get a quicker, better answer here. I apologize if you see it twice.
My company uses an Amazon AWS SMTP server to send emails via a Java-based web interface. This is just a small part of our application, intended to allow users to invite other users to our application.
We have discovered on a very few number of occasions that certain email addresses are not receiving the invitations. Initially we thought it was related to hyphens in the email addresses, but now I've determined that this isn't necessarily the case. I have been troubleshooting this for some time using my own email domains, and I have determined that the following two email addresses NEVER receive any emails sent using the AWS SMTP server (email-smtp.us-east-1.amazonaws.com), but there are no errors reported during the sending process -- the emails just never arrive. The second list shows similar email addresses that always DO receive invitations sent using our system. Note that the addresses on the first list NEVER receive emails, I have tried from all of our deployed instances many, many times.
ADDRESSES THAT DO NOT RECEIVE EMAIL:
jeremygoodell#jeremygoodell.com
jeremy-goodell#jeremygoodell.com
ADDRESSES THAT DO RECEIVE EMAIL:
test#jeremygoodell.com
jeremy-goodell#pinkymcberry.com
jeremy-goodell#hotmail.com
jeremygoodelk#jeremygoodell.com
There are very, very few email addresses that end up with this problem. I was somewhat lucky to find two in my own domain that are exhibiting the problem. I have of course verified that this has nothing to do with spam filtering.
The application is written in Java using the play framework. Play uses Apache Commons Email library under the hood. You can read more about this here: http://www.playframework.com/documentation/1.1/emails.
Here are some of the steps I have taken during my troubleshooting efforts:
1) Try with a different SMTP server (using my personal ISP SMTP -- smtp.gvtc.com) -- ALL addresses DO receive emails when I use this SMTP server. This would seem to isolate the problem as being specific to the AWS SMTP server.
2) Set up my own AWS account and use the SMTP settings for this account (after verifying the addresses in question) -- I have the exact same issues using my own AWS SMTP account settings. This would seem to indicate that the problem is not specific to our company's AWS account.
3) Turn on the play email debug setting (mail.debug=true in the configuration file). A great deal of information is shown in the console for each email sent by the system, but there is absolutely no difference between emails sent to good addresses and those sent to bad addresses. There is no indication whatsoever of any errors.
Here is the contents of the log for one of the emails that never arrived. Note that this is using the AWS server I set up for myself. It looks exactly the same when I use our company's AWS SMTP server except that the from email address is different. I have removed the actual email content, since it's in HTML, somewhat confidential, and not relevant to the problem.
May 15, 2013 8:44:47 AM play.Logger info
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems,
Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "email-smtp.us-east-1.amazonaws.com", port 465, isSSL false
220 email-smtp.amazonaws.com ESMTP SimpleEmailService-376766033
DEBUG SMTP: connected to host "email-smtp.us-east-1.amazonaws.com", port: 465
EHLO 0.1.0.5
250-email-smtp.amazonaws.com
250-8BITMIME
250-SIZE 10485760
250-AUTH PLAIN LOGIN
250 Ok
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "SIZE", arg "10485760"
DEBUG SMTP: Found extension "AUTH", arg "PLAIN LOGIN"
DEBUG SMTP: Found extension "Ok", arg ""
DEBUG SMTP: Attempt to authenticate
DEBUG SMTP: check mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM
AUTH LOGIN
334 VXNlcm5hbWU6
QUtJQUk3WDNURUI0NEVKNlRSU1E=
334 UGFzc3dvcmQ6
QXJwZjl4eU1FTVc1WFNFR3ZxVXVPODNhRjFkcG8xMFpSeURXY0ZsNGVHQXM=
235 Authentication successful.
DEBUG SMTP: use8bit false
MAIL FROM:<jeremy-goodell#hotmail.com>
250 Ok
RCPT TO:<jeremygoodell#jeremygoodell.com>
250 Ok
DEBUG SMTP: Verified Addresses
DEBUG SMTP: "jeremygoodell#jeremygoodell.com" <jeremygoodell#jeremygoodell.com>
DATA
354 End data with <CR><LF>.<CR><LF>
Date: Wed, 15 May 2013 08:44:47 -0500 (CDT)
From: "jeremy-goodell#hotmail.com" <jeremy-goodell#hotmail.com>
Reply-To: "jeremy-goodell#hotmail.com" <jeremy-goodell#hotmail.com>
To: "jeremygoodell#jeremygoodell.com" <jeremygoodell#jeremygoodell.com>
Message-ID: <2322287.7.1368625487826.JavaMail.UGOODJ3#SAOTXWL-9X913M1>
Subject: Please join the ACT Aspire Hari AV test delivery portal
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_6_16196755.1368625487826"
------=_Part_6_16196755.1368625487826
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
>>>> HTML EMAIL BODY REMOVED <<<<
------=_Part_6_16196755.1368625487826--
.
250 Ok 0000013ea86fb2de-0bd70205-8e9a-4042-972f-ad94b28c3101-000000
QUIT
221 Bye
I'm going to follow up here with what turned out to be the solution to the problem. The Amazon AWS SMTP service maintains a "14-Day Suppression List" which is a list of email addresses that have bounced during the last 14 days. Any email sent via the Amazon SMTP service will fail when attempting to send to an address on the Suppression List. Unfortunately, they don't report the error, but instead, send an "Undeliverable" reply to the sender. So, if you have an automating sending service, you'll never know.
I happened to find it because when I set up my own AWS SMTP server, I put in one of my own email addresses as the sender of the automated email. When I logged into that email account, I saw the Undeliverable messages, which explained that the target email is on the Supression List.
Amazon does allow you to log into your Email Service Console and remove email addresses from the Suppression List. You just put in the email address, click Remove, and the address is immediately removed from the list. You have no way to see which email addresses are on the Suppression List, but you can remove any address you want.
So, in the case of my email failures, I believe what happened was that I tried to email to them before the email creation was complete, resulting in a bounce. Once the email address bounces, it goes on the Supression List. For the next 14 days any email sent via ANY AWS SMTP server (not just mine) would fail. After 14 days (apparently) the email address is removed from the Suppression List until the next bounce is encountered.
This Amazon software is very new, they actually just announced this Suppression List service in early May. So they may still need to work out a few kinks. This particular issue seems to present a somewhat serious issue for automated senders like ours. After all bounces do occur on occasion for reasons beyond our control.