How to configure email notifications in Redmine? [closed] - smtp

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I have installed Redmine in offline mode by using Bitnami and configured email notifications as follows, as says in Redmine: Email Configuration
My environment:
Environment:
Redmine version 2.3.2.stable
Ruby version 1.9.3-p231 (2012-05-25) [i386-mingw32]
Rails version 3.2.13
Environment production
Database adapter Mysql2
Redmine plugins: no plugin installed
Part of configuration.yml:
# default configuration options for all environments
default:
# Outgoing emails configuration (see examples above)
email_delivery:
delivery_method: :smtp
smtp_settings:
address: ...here smtp.domain or ip of smtp- server...
port: 25
domain: ...some domain...
authentication: :login
user_name: ...name#domain...
password: "..."
In the same domain runs the mail server.
I requested my password from Redmine UI:
However, the message does not come.
What I have in production.log:
Started POST "/redmine/account/lost_password" for 127.0.0.1 at 2013-08-22 21:38:21 +0400
Processing by AccountController#lost_password as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"252n1tBNbFP/BzQ6spgzVTx/yKnltmhd9jHhzcgyTwU=", "mail"=>"...name#domain...", "commit"=>"Submit"}
Current user: anonymous
Rendered mailer/lost_password.text.erb within layouts/mailer (0.0ms)
Rendered mailer/lost_password.html.erb within layouts/mailer (1.0ms)
Redirected to http://localhost/redmine/login
Completed 302 Found in 886ms (ActiveRecord: 68.0ms)
Started GET "/redmine/login" for 127.0.0.1 at 2013-08-22 21:38:22 +0400
Processing by AccountController#login as HTML
Current user: anonymous
Rendered account/login.html.erb within layouts/base (7.0ms)
Completed 200 OK in 20ms (Views: 16.0ms | ActiveRecord: 1.0ms)
When I tested this configuration outside the intranet, I used the gmail. Part of configuration.yml:
# default configuration options for all environments
default:
# Outgoing emails configuration (see examples above)
email_delivery:
delivery_method: :smtp
smtp_settings:
address: smtp.gmail.com
port: 587
domain: gmail.com
authentication: :login
user_name: ...name#gmail.com
password: "..."
When I requested the password in this configuration, the message has come.
message:
To change the password, click on the following link:
http://localhost:3000/account/lost_password?token=dd36a006157cfa8d208ba11822c9283f14ef5f65
User: alexey
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://hostname/my/account
What I see in production.log now:
Started POST "/redmine/account/lost_password" for 127.0.0.1 at 2013-08-22 22:09:40 +0400
Processing by AccountController#lost_password as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"252n1tBNbFP/BzQ6spgzVTx/yKnltmhd9jHhzcgyTwU=", "mail"=>"...name#domain...", "commit"=>"Submit"}
Current user: anonymous
Rendered mailer/lost_password.text.erb within layouts/mailer (3.0ms)
Rendered mailer/lost_password.html.erb within layouts/mailer (1.0ms)
Redirected to http://localhost/redmine/login
Completed 302 Found in 2769ms (ActiveRecord: 73.0ms)
Started GET "/redmine/login" for 127.0.0.1 at 2013-08-22 22:09:43 +0400
Processing by AccountController#login as HTML
Current user: anonymous
Rendered account/login.html.erb within layouts/base (4.0ms)
Completed 200 OK in 10ms (Views: 8.0ms | ActiveRecord: 1.0ms)
So,
If I use gmail, the message are sent and delivered
If I use other, the message are not sent or sent but not delivered
What I'm doing wrong? How to configure email notifications in Redmine?

Please have a look at the syntax.
production:
email_delivery:
delivery_method: :smtp
smtp_settings:
address: ********.com
port: 25
domain: ********.com
enable_starttls_auto: false
authentication: :login
user_name: "##############***.com"
password: "####"
Also the keyword 'production' should be environment specific.
I referred their official configuration page.
https://www.redmine.org/projects/redmine/wiki/EmailConfiguration

Related

How can I do an ssh tunnel with port forwarding on a Windows runner in Github actions?

I have a MongoDB instance on a Google compute engine running that I want to connect to from my Github action (On a windows runner if it makes a difference) to insert test and performance results.
Currently, I am trying to open an SSH tunnel with port forwarding and just test that the port is open.
Here is what my GIthub action step is:
- name: 'Create ssh tunnel'
if: (runner.os == 'Windows')
run: |
gcloud config set auth/impersonate_service_account *****#***.iam.gserviceaccount.com
gcloud compute config-ssh
$sshTunnelJob = Start-Job -Name SshTunnelJob -ScriptBlock { ssh -o "User=*****_iam_gserviceaccount_com" *****.us-east1-b.**** -vvv -fNT -L 27017:0.0.0.0:27017}
Get-Job
Receive-Job -Name SshTunnelJob | Format-List -Force -Expand CoreOnly
netstat -aon
Test-NetConnection localhost -port 27017
gcloud config unset auth/impersonate_service_account
gcloud compute config-ssh --remove
I expect this, Test-NetConnection localhost -port 27017, to succeed, but it fails. Forwarding port 80 is succeeding, though.
Here is the output:
WARNING: TCP connect to (::1 : 27017) failed
WARNING: TCP connect to (127.0.0.1 : 27017) failed
ComputerName: localhost
RemoteAddress: ::1
ResolvedAddresses: {::1, 127.0.0.1}
PingSucceeded: True
PingReplyDetails: System.Net.NetworkInformation.PingReply
TcpClientSocket:
TcpTestSucceeded: False
RemotePort: 27017
TraceRoute:
Detailed: False
InterfaceAlias: Loopback Pseudo-Interface 1
InterfaceIndex: 1
InterfaceDescription:
NetAdapter:
NetRoute: MSFT_NetRoute (InstanceID = "DD;9;?B55;55DD55;")
SourceAddress: ::1
NameResolutionSucceeded: True
BasicNameResolution: {Microsoft.DnsClient.Commands.DnsRecord_AAAA,Microsoft.DnsClient.Commands.DnsRecord_A}
LLMNRNetbiosRecords: {}
DNSOnlyRecords: {Microsoft.DnsClient.Commands.DnsRecord_A}
AllNameResolutionResults: {Microsoft.DnsClient.Commands.DnsRecord_AAAA,Microsoft.DnsClient.Commands.DnsRecord_A}
IsAdmin: True
NetworkIsolationContext: Loopback
MatchingIPsecRules:
What am I missing? Is GitHub limiting ports? I couldn't find any documentation on what ports are blocked or not.
Solution 1 :
The issue might be that the connection from client to server is blocked by a firewall. Can you Please check if the relevant GCP firewall setting is enabled for port 27017.
Also , Please check the target tags and update it accordingly if required . This will allow instances tagged with mongodb-instance to accept connections on port 27017.
Solution 2 :
As per the below output provided by you, it is observed that PingSucceeded was True. Whereas, the response returned as False for the PingSucceeded. In such cases, it is observed that the ICMP requests might be disabled on the remote server/device.
PingSucceeded: True
TcpTestSucceeded: False
As you are expecting Test-NetConnection localhost -port 27017 to succeed,please follow the below steps.
Open PowerShell in the Windows server and type the following command:
tnc <ip_address> -port <PortNumber>
If the device was having issues where it powered off or it got disconnected from the network, a response like below is expected.
PingSucceeded : False
TCPTestSucceeded : False
If the connection is healthy (i.e. MongoDb Server is able to successfully connect) then the following response in PowerShell is expected.
TcpTestSucceeded : True
The above response tells us specifically that the Port 27017 is open and the Test-NetConnection module was able to validate TCP handshake, so the port should be ready to establish a connection.
The above information is derived from the link which was drafted by Rodrigo Restrepo

Email is not being sent by SMTP in bitnami redmine

Email is not being sent by SMTP in bitnami redmine(4.1.0-8).The following error is coming: 'Email delivery error: SMTP From address may not be blank: nil'.This is my configuration.yml file.
default configuration options for all environments
default:
# Outgoing emails configuration
# See the examples below and the Rails guide for more configuration options:
# http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration
email_delivery:
delivery_method: :smtp
smtp_settings:
address: 'smtp.gmail.com'
port: 587
domain: 'mycompanydomain.com'
authentication: :login
user_name: 'username'
password: 'password'
This configuration.yml file is working perfectly fine in bitnami redmine(4.1.0-0).
Bitnami Engineer here:
Email settings can be configured in the /opt/bitnami/apps/redmine/htdocs/config/configuration.yml file. In older versions, use the /opt/bitnami/apps/redmine/htdocs/config/email.yml file.
The file includes sample configuration settings for most common scenarios, including Gmail. To use Gmail as the SMTP server, find and uncomment the Gmail settings such that you end up with the result below. Remember to update the user_name and password variables with the correct credentials for the Gmail account you plan to use.
# ==== SMTP server at using TLS (GMail)
# This might require some additional configuration. See the guides at:
# http://www.redmine.org/projects/redmine/wiki/EmailConfiguration
#
email_delivery:
delivery_method: :smtp
smtp_settings:
enable_starttls_auto: true
address: "smtp.gmail.com"
port: 587
domain: "smtp.gmail.com" # 'your.domain.com' for Google Apps
authentication: :plain
user_name: "USERNAME#gmail.com"
password: "PASSWORD"
You can find more information in our documentation https://docs.bitnami.com/general/apps/redmine/configuration/configure-smtp/
It's an old thread, but it bugs me for an hour to find the answer.
Log into your redmine app and go to settings
br/settings?tab=notifications
The field for the settings[mail_from] MUST be filled

what else to do to enable XML-RPC in ejabberd?

I have configure ejabberd on my server but when i tried to access ejabberd i am getting the error the port 4560/rpc2 is not responding.I have uncomment out XML-RPC in ejabberd.yml file but after uncomment the ejabberd stop working.Here is the code which i uncomment.
-
## port: 4560
## module: ejabberd_xmlrpc
## maxsessions: 10
## timeout: 5000
## access_commands:
## admin:
## commands: all
## options: []
i have search almost everything what else i have to install or uncomment to enable this port and function.
I have configure ejabberd on my server
You don't mention what ejabberd version you are using. I guess the latest released, ejabberd 19.09.1
but when i tried to access ejabberd i am getting the error the port 4560/rpc2 is not responding.
That may be because you must configure a listener for port 4560 in ejabberd.yml
I have uncomment out XML-RPC in ejabberd.yml file but after uncomment the ejabberd stop working.Here is the code which i uncomment.
You don't mention what error messages are shown in the ejabberd log files. Was it like this?
11:22:26.482 [critical] Failed to start ejabberd application: Invalid value of option listen->3: Unknown option: maxsessions.
It means the option maxsessions is no longer supported by ejabberd_xmlrpc.
I configure it like this:
-
port: 4560
module: ejabberd_xmlrpc
Then I do a simple test, visiting this website:
http://localhost:4560/
And the ejabberd_xmlrpc replies as expected that this GET query is not supported:
400 Bad Request
I have installed the latest version of ejabberd-20.01 so now i am not getting xml-rpc error any more.But now i am facing user register error.

Zabbix JMX Tomcat monitoring

I have been trying to setup Zabbix to monitor my 2 tomcat servers on 2 different Amazon EC2 machines, but in vain.
The Z on the host is green, however te JMX is red with these errors
- ZBX_TCP_READ() failed: [4] Interrupted system call
- Someother error [111] connection refused
and many such errors, one after another, in the sense I resolve an error to see one more new error popping up.
These are some assumptions
All the machines run Ubuntu 12.10 and later
Server's IP address: 66.55.12.120 (Runs Zabbix server v2.2.4 (revision 46772) (23 June 2014) )
Agent's IP address: 87.52.45.198 ( Runs Zabbix agent v2.2.2 (revision 42525) (12 February 2014) )
My local machine's IP address: 76.89.54.111
Here is what I've done so far.
On Server Side:
1) Installed Zabbix_server using sudo apt-get install zabbix-server-mysql.
2) The GUI, mysql database all have been installed and configured.
3) The following are the only 3 changes that I've made in the file /etc/zabbix/zabbix_server.conf
...
JavaGateway=localhost
JavaGatewayPort=10052
StartJavaPollers=5
...
4) The Zabbix Java gateway was installed using sudo apt-get install zabbix-java-gateway.
5) The following are the only 3 changes that I've made in the file
/etc/zabbix/zabbix_java_gateway.conf
...
LISTEN_IP="127.0.0.1"
LISTEN_PORT=10052
START_POLLERS=5
...
On Client Side:
1) Installed Zabbix Client using
sudo apt-get install zabbix-agent
2) The following are the only 3 changes that I've made in the file
/etc/zabbix/zabbix_agentd.conf
...
Server=66.55.12.120
StartAgents=5
ServerActive=66.55.12.120:10051
Hostname=Security-test-JMX-EC2
... <br />
3) The Hostname is the same as the one that is mentioned while creating the Host on the GUI.
I believe that there are some issues with the IP and ports. So, here are the outbound rules for both the machines as obtained from Amazon EC2 Security Groups for the machines
OUTBOUND RULES for SERVER SECURITY GROUP:
Type Protocol Port Source Reasoning
Custom- TCP 8080 0.0.0.0/0
TCP Rule
All ICMP All N/A 0.0.0.0/0
Custom- TCP 10052 27.52.52.128/32 For access from Agent
TCP Rule
Custom- TCP 8081 76.84.120.130/32 To access Zabbix GUI from-
TCP Rule -my local machine's web browser
Custom- TCP 10051 27.52.52.128/32 As the agent responds to-
TCP Rule -the server on Port 10051TCP Rule-
-Must allow inbound communications-
- from the agent.
Custom- TCP 11000 27.52.52.128/32 The agent's JMX reporting-
TCP Rule -happens on port 11000(not on 12345).
OUTBOUND RULES for CLIENT SECURITY GROUP:
Type Protocol Port Source
HTTPS TCP 443 0.0.0.0/0
Custom- TCP 10050 66.55.12.120/32
TCP Rule
Custom- TCP 10052 66.55.12.120/32
TCP Rule
Custom- TCP 11000 66.55.12.120/32
TCP Rule
HTTP TCP 80 76.89.54.111/32
Custom- TCP 8080 76.89.54.111/32
TCP Rule
Custom- TCP 8443 76.89.54.111/32
TCP Rule
What am I missing? Please guide me.
Any help is appreciated.
Thanks
Goutham
If you can, then run VisualVm (probably using a tunneled X session) on the zabbix host, and see if you can connect to the target JVM with that. If you can't connect from that, you won't be able to connect from Zabbix.
Try with the following CATALINA_OPTS, replacing with the IP on the target that you want JMX to listen on:
export CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.local.only=falseom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=<LOCAL_IP>"
This will disable all JMX security so be aware!
Once you hopefully get it to connect, the "Tomcat JMX" items in Zabbix are also all incorrect! e.g.
Incorrect Zabbix default:
jmx["Catalina:type=GlobalRequestProcessor,name=http-8080",bytesReceived]
Correct entry:
jmx["Catalina:type=ThreadPool,name=\"http-bio-8080\"", bytesReceived]
Note the escaped quotes and incorrect thread name. Add the Mbeans plugin to VisualVM, and use that to browse the MBeans on the target VM, and check the Zabbix names.
It does work eventually, but is a real pain to setup. Zabbix is however one of the few open source monitoring tools that supports JMX at all!
By default, JMX does not work very well with firewalls. You might find related bug reports on Zabbix tracker useful: ZBX-5326 and ZBX-6815. The first one contains a workaround for Tomcat which might work for you.
#gvatreya wrote:
Server: (Runs Zabbix server)
Agent: (Runs Zabbix agent)
It looks like you have to start Zabbix Java gateway as well on host where it is installed (it is a daemon/service).
I configured as follows:
Server: (Runs Zabbix server, Zabbix Java gateway)
Agent: (Runs Zabbix agent)
I think it is possible to install it on a dedicated host.
Have you tried adding -Djava.net.preferIPv4Stack=true to the VM options?
to make it work add next java_opts to your tomcat startup script
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.port=2345
-Dcom.sun.management.jmxremote.rmi.port=12345
-Djava.rmi.server.hostname=<tomcat_hostname>

Redmine Email through SES SMTP

Has anybody successfully configured a redmine installation to send mail through Amazon SES SMTP?
My settings are:
production:
email_delivery:
delivery_method: :smtp
smtp_settings:
tls: true
enable_starttls_auto: true
address: email-smtp.us-east-1.amazonaws.com
port: 465
domain: example.com
authentication: :plain
user_name: ***
password: ***
When I try to send a test email through the redmine settings, it just times out, with no clear errors in the log or anything.
Note, this does the same if I remove the enable_starttls_auto: true line.
I've been able to get it working using authentication: :login.
Here is the full setup:
production:
email_delivery:
delivery_method: :smtp
smtp_settings:
enable_starttls_auto: true
address: email-smtp.us-east-1.amazonaws.com
port: 587
domain: mydomain.com
authentication: :login
user_name: credentials_username
password: credentials_password
Just one more note: my Redmine is not set in 'mydomain.com'.
I haven't tried doing that, but if your Redmine runs inside an instance you control, you can setup a local PostFix server that your redmine will talk. Configure it to respond only to local requests (127.0.0.1) and have it forward everything via SES SMTP integration. That should probably do the trick.
I have set this up as you have above and it works Redmine 1.3.2
You need the enable_starttls_auto: true and I made sure the domain is the same the one that the redmine server is setup