I setup a mail server on VPS and I installed roundcube to manage webmail. when i send e-mail in intern it work's but when i try to send an e-mail to another mail server (gmail) i get this error :
SMTP Error (454): Failed to add recipient "user#gmail.com" (4.7.1 : Relay access denied).
but when i send the same e-mail with thunderbird it works so here what i found at logs:
with roundcube:
Dec 4 18:44:09 vpsxxxxxx postfix/smtpd[3013]: connect from xxx.xxx.xxx.xxx
Dec 4 18:44:09 vpsxxxxxx postfix/smtpd[3013]: warning: connect to Milter service inet:127.0.0.1:8891: Connection refused
Dec 4 18:44:09 vpsxxxxxx postfix/smtpd[3013]: NOQUEUE: reject: RCPT from xxx.xxx.xxx.xxx: 454 4.7.1 <user#gmail.com>: Relay access denied; from=<user#domain.com> to=<user#gmail.com> proto=ESMTP helo=<mail.domain.com>
Dec 4 18:44:09 vpsxxxxxx postfix/smtpd[3013]: disconnect from xxx.xxx.xxx.xxx ehlo=1 mail=1 rcpt=0/1 rset=1 quit=1 commands=4/5
with thunderbird :
Dec 4 18:44:55 vpsxxxxxx postfix/smtpd[3016]: connect from unknown[xxx.xxx.xxx.xxx]
Dec 4 18:44:55 vpsxxxxxx postfix/smtpd[3016]: warning: connect to Milter service inet:127.0.0.1:8891: Connection refused
Dec 4 18:44:58 vpsxxxxxx postfix/smtpd[3016]: 64DCD5EEC4: client=unknown[xxx.xxx.xxx.xxx], sasl_method=PLAIN, sasl_username=user#domain.com
Dec 4 18:44:58 vpsxxxxxx postfix/cleanup[3019]: 64DCD5EEC4: message-id=<9bf8a7ca-9d6a-847c-5350-0f5c4350951f#domain.com>
Dec 4 18:44:58 vpsxxxxxx postfix/qmgr[2865]: 64DCD5EEC4: from=<user#domain.com>, size=1810, nrcpt=1 (queue active)
Dec 4 18:44:58 vpsxxxxxx postfix/smtpd[3016]: disconnect from unknown[xxx.xxx.xxx.xxx] ehlo=2 starttls=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=8
Dec 4 18:44:59 vpsxxxxxx postfix/smtp[3020]: connect to gmail-smtp-in.l.google.com[2a00:1450:400c:c07::1b]:25: Cannot assign requested address
Dec 4 18:45:00 vpsxxxxxx postfix/smtp[3020]: 64DCD5EEC4: to=<user#gmail.com>, relay=gmail-smtp-in.l.google.com[66.102.1.27]:25, delay=1.7, delays=0.25/0.01/0.52/0.91, dsn=2.0.0, status=sent (250 2.0.0 OK 1543945500 f16si12703624wrt.428 - gsmtp)
Dec 4 18:45:00 vpsxxxxxx postfix/qmgr[2865]: 64DCD5EEC4: removed
Dec 4 18:45:01 vpsxxxxxx dovecot: imap-login: Login: user=<user#domain.com>, method=PLAIN, rip=xxx.xxx.xxx.xxx, lip=yyy.yyy.yyy.yyy, mpid=3025, TLS, session=<HDgM0zV8EcXE5dog>
Dec 4 18:45:01 vpsxxxxxx dovecot: imap-login: Login: user=<user#domain.com>, method=PLAIN, rip=xxx.xxx.xxx.xxx, lip=yyy.yyy.yyy.yyy, mpid=3026, TLS, session=<dIQM0zV8EsXE5dog>
Dec 4 18:45:01 vpsxxxxxx dovecot: imap(user#domain.com): Logged out in=1669 out=552
config.inc.php
<?php
$config['db_dsnw'] = 'mysql://databaseuser:password#localhost/database';
$config['default_host'] = 'localhost';
$config['smtp_server'] = 'mail.domain.com';
$config['support_url'] = '';
$config['ip_check'] = true;
$config['des_key'] = 'DES_KEY';
$config['username_domain'] = 'domain.com';
$config['product_name'] = 'domain Webmail';
$config['plugins'] = array(
'acl', 'additional_message_headers', 'archive', 'attachment_reminder', 'autologon',
'debug_logger', 'emoticons', 'enigma', 'example_addressbook', 'help', 'hide_blockquote',
'http_authentication', 'identicon', 'identity_select', 'jqueryui', 'krb_authentication',
'managesieve', 'markasjunk', 'new_user_dialog', 'new_user_identity', 'newmail_notifier',
'password', 'redundant_attachments', 'show_additional_headers', 'squirrelmail_usercopy',
'subscriptions_option', 'userinfo', 'vcard_attachments', 'virtuser_file', 'virtuser_query', 'zipdownload'
);
$config['language'] = 'en_EN';
$config['enable_spellcheck'] = false;
?>
domain.com is my Domain name
It was a configuration problem. I add this to config.inc.php, and it works
$config['smtp_server'] = 'tls://mail.domain.com';
$config['smtp_port'] = 587;
$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';
$config['smtp_conn_options'] = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
),
);
Related
I'm new to Freeswitch and looking for help from experts. My problem is below.
I'm trying to do below scenario in Perl:
When I'm getting an incoming call to script (test.pl) I play a file to it and then put inbound session to on-hold. Then I try to make new outbound session from a separate script (test2.pl). If outbound call get answer, then I break inbound session from on-hold and bridge both sessions. The scrips are like below.
test.pl
use strict;
use warnings;
our $session;
if( $session->ready() ) {
$session->setVariable( 'hangup_after_bridge', 'false' );
$session->setVariable( 'continue_on_fail', 'true' );
$session->answer();
my $api = new freeswitch::API;
$api->execute('perlrun', '/usr/share/freeswitch/scripts/test2.pl ' . $session->get_uuid());
$session->setVariable('playback_timeout_sec', '70');
$session->execute("playback", '$${hold_music}');
if ($session->getVariable('outbound_answered') == 'true') {
my $outbound_uuid = $session->getVariable('outbound_uuid');
my $outbound_session = new freeswitch::Session($outbound_uuid);
if ($outbound_session->ready()) {
$session->bridge($outbound_session);
} else {
# outbound session disconnected.
}
} else {
# outbound session didn't answer.
}
} else {
# Inbound disconneected.
}
1;
test2.pl
use strict;
use warnings;
my $api = new freeswitch::API;
my $inbound_uuid = $ARGV[0];
my $inbound_session = new freeswitch::Session( $inbound_uuid );
my $originate_str = "sofia/gateway/outbound/0416661666";
my $outbound_session = new freeswitch::Session( $originate_str );
my $hangup_cause_out = $outbound_session->hangupCause();
$inbound_session->setVariable( 'outbound_uuid', $outbound_session->get_uuid() );
if ( $outbound_session->ready() ) {
if ( $inbound_session->ready() ) {
$inbound_session->setVariable('outbound_answered', 'true');
$outbound_session->streamFile("/usr/share/freeswitch/sounds/en/us/callie/ivr/8000/ivr-please_hold_while_party_contacted.wav");
$inbound_session->execute('break');
while ($inbound_session->ready()) {
sleep(10);
# Inbound sessnio ok, continue outbound session.
}
} else {
# Inbound session got disconnected while we trying outbound.
}
} else {
# Outbound call failed.
}
1;
Debian syslog:
Jul 19 13:14:50 XXX systemd[1]: freeswitch.service: Main process exited, code=killed, status=6/ABRT
Jul 19 13:14:50 XXX systemd[1]: freeswitch.service: Unit entered failed state.
Jul 19 13:14:50 XXX systemd[1]: freeswitch.service: Failed with result 'signal'.
Jul 19 13:14:50 XXX systemd[1]: freeswitch.service: Service hold-off time over, scheduling restart.
Jul 19 13:14:50 XXX systemd[1]: Stopped freeswitch.
Jul 19 13:14:50 XXX systemd[1]: Starting freeswitch...
The expected scenario work without issues. But my issue is Freeswitch getting restart when inbound session hangup by incoming call party while Freeswitch ringing outbound party.
UPDATE1:
I think I need to handle inbound session hangup event but kinda lost here. May be I'm doing all wrong.
UPDATE2:
I been seen this issue in Freeswitch 1.8.7. I tried testing the same code in Freeswitch 1.6.20 and it didn't crash, but gave below error,
[ERR] freeswitch_perl.cpp:114 session is not initalized
So it seems Freeswitch 1.8 mod_perl module not handling it properly.
Looking for suggestions from Freeswitch experts.
Thank you!
I am trying to automatically move mails detected as spam to the junk folder but my sieve filters are not running.
I can send and receive mails and mails are detected as spam.
X-Virus-Scanned: amavisd-new at ...
X-Spam-Flag: YES
X-Spam-Score: 999.802
X-Spam-Level: ****************************************************************
X-Spam-Status: Yes, score=999.802 tagged_above=-999 required=5
tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, GTUBE=1000,
HTML_MESSAGE=0.001, SPF_PASS=-0.001, TVD_SPACE_RATIO=0.001]
autolearn=no autolearn_force=no
I think the problem is, that postfix does not deliver mails via dovecot but I can not figure out why.
My System:
Arch Linux
postfix 3.3.2-3
dovecot 2.3.4.1-1
Things I have done or checked again and again...
pidgeonehole is installed
The dovecot-lmtp socket exists in /var/spool/postfix/private and is read- and writable to postfix
The virtual_transport in postfix main.cf is set to lmtps:unix:private/dovecot-lmtp
lmtp service and protocol blocks in dovecot.conf are present and protocols value contains lmtp
path to global sieve scripts seems to be correct
sieve scripts are compiling without errors
Folder junk exists
Dovecot never logs anything related to lmtp even if mail_debug = yes is set
I really dont have any idea anymore. So below are some relevant information. Being in hope that someone can help me to get this to working.
Here is an excerpt of the postfix log where postfix always sais ...status=sent (delivered to maildir)
Feb 10 19:37:59 hostname postfix/w.x.y.z/postscreen[1133]: CONNECT from [209.85.208.174]:44008 to [w.x.y.z]:25
Feb 10 19:37:59 hostname postfix/dnsblog[1136]: addr 209.85.208.174 listed by domain dnsbl.sorbs.net as 127.0.0.6
Feb 10 19:37:59 hostname postfix/dnsblog[1138]: addr 209.85.208.174 listed by domain hostkarma.junkemailfilter.com as 127.0.0.3
Feb 10 19:37:59 hostname postfix/dnsblog[1138]: addr 209.85.208.174 listed by domain hostkarma.junkemailfilter.com as 127.0.1.1
Feb 10 19:38:00 hostname postfix/w.x.y.z/postscreen[1133]: PASS OLD [209.85.208.174]:44008
Feb 10 19:38:00 hostname postfix/w.x.y.z/smtpd[1142]: connect from mail-lj1-f174.google.com[209.85.208.174]
Feb 10 19:38:00 hostname postfix/w.x.y.z/smtpd[1142]: Anonymous TLS connection established from mail-lj1-f174.google.com[209.85.208.174]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
Feb 10 19:38:00 hostname postfix/w.x.y.z/smtpd[1142]: NOQUEUE: client=mail-lj1-f174.google.com[209.85.208.174]
Feb 10 19:38:02 hostname postfix/smtpd[1159]: connect from unknown[127.0.0.1]
Feb 10 19:38:02 hostname postfix/smtpd[1159]: 6262DAE1876: client=unknown[127.0.0.1]
Feb 10 19:38:02 hostname postfix/cleanup[1160]: 6262DAE1876: message-id=
Feb 10 19:38:02 hostname postfix/smtpd[1159]: disconnect from unknown[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Feb 10 19:38:02 hostname postfix/qmgr[28602]: 6262DAE1876: from=, size=5817, nrcpt=1 (queue active)
Feb 10 19:38:02 hostname postfix/smtpd[1159]: connect from unknown[127.0.0.1]
Feb 10 19:38:02 hostname postfix/smtpd[1159]: 67345AE1879: client=unknown[127.0.0.1], orig_client=mail-lj1-f174.google.com[209.85.208.174]
Feb 10 19:38:02 hostname postfix/cleanup[1160]: 67345AE1879: message-id=
Feb 10 19:38:02 hostname postfix/smtpd[1159]: disconnect from unknown[127.0.0.1] ehlo=1 xforward=1 mail=1 rcpt=1 data=1 quit=1 commands=6
Feb 10 19:38:02 hostname postfix/qmgr[28602]: 67345AE1879: from=, size=3901, nrcpt=1 (queue active)
Feb 10 19:38:02 hostname postfix/w.x.y.z/smtpd[1142]: proxy-accept: END-OF-MESSAGE: 250 2.0.0 from MTA(smtp:[127.0.0.1]:10035): 250 2.0.0 Ok: queued as 67345AE1879; from= to= proto=ESMTP helo=
Feb 10 19:38:02 hostname postfix/virtual[1161]: 6262DAE1876: to=, orig_to=, relay=virtual, delay=0.05, delays=0.02/0.02/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
Feb 10 19:38:02 hostname postfix/qmgr[28602]: 6262DAE1876: removed
Feb 10 19:38:02 hostname postfix/virtual[1161]: 67345AE1879: to=, relay=virtual, delay=0.02, delays=0.01/0.01/0/0, dsn=2.0.0, status=sent (delivered to maildir)
Feb 10 19:38:02 hostname postfix/qmgr[28602]: 67345AE1879: removed
In postfix master.cf I set:
...
lmtps unix - - - - - lmtp
-o lmtp_use_tls=yes
-o lmtp_tls_loglevel=1
-o lmtp_tls_CAfile=/etc/ssl/certs/ca-certificates.crt
-o lmtp_enforce_tls=yes
-o lmtp_tls_mandatory_protocols=!SSLv2,!SSLv3
-o lmtp_tls_protocols=!SSLv2,!SSLv3
-o lmtp_tls_mandatory_ciphers=high
-o lmtp_tls_ciphers=high
-o lmtp_send_xforward_command=yes
-o lmtp_tls_security_level=encrypt
-o lmtp_tls_note_starttls_offer=yes
...
In postfix main.cf I set:
...
virtual_transport = lmtps:unix:private/dovecot-lmtp
...
dovecot.conf:
...
protocols = imap lmtp sieve
...
service managesieve-login {
inet_listener sieve {
port = 4190
}
service_count = 1
process_min_avail = 2
vsz_limit = 128M
}
service managesieve {
process_limit = 256
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}
user = vmail
}
...
protocol lmtp {
mail_plugins = quota sieve acl notify
auth_socket_path = /var/run/dovecot/auth-master
postmaster_address = ...
}
protocol sieve {
managesieve_max_line_length = 65536
mail_max_userip_connections = 10
mail_plugins =
managesieve_logout_format = bytes=%i/%o
managesieve_implementation_string = Dovecot Pigeonhole
managesieve_sieve_capability =
managesieve_notify_capability =
managesieve_max_compile_errors = 5
}
...
plugin {
...
sieve_extensions = +spamtest
sieve_spamtest_status_type = score
sieve_spamtest_status_header = \
X-Spam_score: (-?[[:digit:]]+\.[[:digit:]]).*
sieve_spamtest_max_value = 5.0
# Own sieve filters are located in the home directory
sieve = file:~/sieve;active=~/.dovecot.sieve
# The global filter is located outside
sieve_before = /var/lib/dovecot/sieve/move_to_spam_folder.sieve
sieve_max_script_size = 1M
sieve_quota_max_scripts = 0
sieve_quota_max_storage = 0
# Continue even if the quota can not be determined
# Valid for the Postfix policy service provided from Dovecot
quota_status_success = DUNNO
quota_status_nouser = DUNNO
quota_status_overquota = "552 5.2.2 Mailbox is over quota"
sieve_plugins = sieve_imapsieve sieve_extprograms
# From elsewhere to Spam folder
imapsieve_mailbox1_name = Junk
imapsieve_mailbox1_cause = COPY
imapsieve_mailbox1_before = file:/var/lib/dovecot/sieve/report-spam.sieve
# From Spam folder to elsewhere
imapsieve_mailbox2_name = *
imapsieve_mailbox2_from = Junk
imapsieve_mailbox2_cause = COPY
imapsieve_mailbox2_before = file:/var/lib/dovecot/sieve/report-ham.sieve
sieve_pipe_bin_dir = /var/lib/dovecot/sieve
sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment
}
Finally the global sieve script:
require "fileinto";
if header :contains "X-Spam-Flag" "YES" {
fileinto "Junk";
}
I am trying to get an image of a web page using pageres package, And post the image to slack using hubot. I am able to get the image, but for some reason i am not able to post it to slack using slack upload api. Here is my code, can you tell me what could be wrong? (not a coffee lint issue)
fs = require("fs")
Pageres = require('pageres')
util = require("util")
request = require("request")
module.exports = (robot) ->
robot.respond /screenshot page (\S*)?( at )?(\S*)?/i, (msg) ->
pageres = new Pageres({delay: 30})
domain = msg.match[1].replace("http://", "")
if msg.match[3] == undefined
size = '960x1024'
else
size = msg.match[3]
dest = './screenshots'
msg.send "Acquiring screenshot of #{domain}"
pageres.src(domain, [size]).dest(dest)
pageres.run (err) ->
if err
robot.logger.error err
msg.send "Um..., you better check the log"
else
opts = {
method: 'POST',
uri: 'https://slack.com/api/files.upload',
formData: {
channels: process.env.HUBOT_SCREENSHOT_SLACK_CHANNEL,
initial_comment: "Screenshot of #{domain}",
token: process.env.HUBOT_SLACK_TOKEN,
file: fs.createReadStream("#{dest}/#{domain}.png")
}
}
request.post opts, (error, response, body) ->
if error
robot.logger.error error
else
robot.logger.debug 'screenshot posted to slack'
return
The bot is connected to slack, and receiving messages from slack, parsing them fine and getting the image back to the local destination, but not able to post it to slack, There are no errors as well in the log.
[Wed Apr 11 2018 16:16:47 GMT+0000 (UTC)] DEBUG Received message: '#hubot screenshot page http://www.google.com' in channel: ****, from: ******
[Wed Apr 11 2018 16:16:47 GMT+0000 (UTC)] DEBUG Message '#hubot screenshot page http://www.google.com' matched regex //^\s*[#]?hubot[:,]?\s*(?:screenshot page (\S*)?( at )?(\S*)?)/i/; listener.options = { id: null }
[Wed Apr 11 2018 16:16:47 GMT+0000 (UTC)] DEBUG Executing listener callback for Message '#hubot screenshot page http://www.google.com'
[Wed Apr 11 2018 16:16:47 GMT+0000 (UTC)] DEBUG Sending to *****: Acquiring screenshot of www.google.com
You can use curl command which can be called using child_process to upload a file in the channel.
curl -F file=#dramacat.gif -F channels=C024BE91L,#general -F token=xxxx-xxxxxxxxx-xxxx https://slack.com/api/files.upload
It seems the formData property in your opts variable should be slightly different like this:
formData: {
token: process.env.HUBOT_SLACK_TOKEN,
title: "Screenshot of #{domain}",
filename: "image.png",
filetype: "auto",
channels: channel_id,
file: fs.createReadStream("path_to_your_image"),
}
The channel_id is your slack channel id which you can see in the browser address bar when you access the channel.
I am using logstash to collect data from android device using http-poller as input plugin. I want to store the collected data in a NoSQL(mongodb) using mongodb as output plugin. I have successfully set up the configuration file but when I run my set-up, I get the following error:
Failed to send event to MongoDB {:event=>#, #cancelled=false, #data={"error"=>501, "#version"=>"1", "#timestamp"=>"2016-10-03T18:02:11.337Z", "http_poller_metadata"=>{"name"=>"some_other_service", "host"=>"s18660276.domainepardefaut.fr", "request"=>{"method"=>"post", "url"=>"http://127.0.0.1/web/app.php/api/addsmartlog"}, "runtime_seconds"=>0.526, "code"=>200, "response_headers"=>{"date"=>"Mon, 03 Oct 2016 18:02:11 GMT", "server"=>"Apache/2.2.22 (Debian)", "x-powered-by"=>"PHP/5.5.30-1~dotdeb+7.1", "cache-control"=>"no-cache", "content-length"=>"13", "keep-alive"=>"timeout=5, max=100", "connection"=>"Keep-Alive", "content-type"=>"application/json"}, "response_message"=>"OK", "times_retried"=>0}}, #metadata={}, #accessors=#501, "#version"=>"1", "#timestamp"=>"2016-10-03T18:02:11.337Z", "http_poller_metadata"=>{"name"=>"some_other_service", "host"=>"s18660276.domainepardefaut.fr", "request"=>{"method"=>"post", "url"=>"http://127.0.0.1/web/app.php/api/addsmartlog"}, "runtime_seconds"=>0.526, "code"=>200, "response_headers"=>{"date"=>"Mon, 03 Oct 2016 18:02:11 GMT", "server"=>"Apache/2.2.22 (Debian)", "x-powered-by"=>"PHP/5.5.30-1~dotdeb+7.1", "cache-control"=>"no-cache", "content-length"=>"13", "keep-alive"=>"timeout=5, max=100", "connection"=>"Keep-Alive", "content-type"=>"application/json"}, "response_message"=>"OK", "times_retried"=>0}}, #lut={"http_poller_metadata"=>[{"error"=>501, "#version"=>"1", "#timestamp"=>"2016-10-03T18:02:11.337Z", "http_poller_metadata"=>{"name"=>"some_other_service", "host"=>"s18660276.domainepardefaut.fr", "request"=>{"method"=>"post", "#timestamp"=>"2016-10-03T18:02:11.337Z", "http_poller_metadata"=>{"name"=>"some_other_service", "host"=>"s18660276.domainepardefaut.fr", "request"=> "runtime_seconds"=>0.526, "code"=>200, "response_headers"=>{"date"=>"Mon, 03 Oct 2016 18:02:11 GMT", "server"=>"Apache/2.2.22 (Debian)", "x-powered-by"=>"PHP/5.5.30-1~dotdeb+7.1", "cache-control"=>"no-cache", "content-length"=>"13", "keep-alive"=>"timeout=5, max=100", "connection"=>"Keep-Alive", "content-type"=>"application/json"}, "response_message"=>"OK", "times_retried"=>0}}, "#timestamp"]}>>, :exception=>#"admin"}, #server_selection_timeout=30>>, :backtrace=>["/opt/logstash/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/server_selector/selectable.rb:99:in select_server'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/cluster.rb:122:innext_primary'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/collection.rb:190:in insert_many'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/mongo-2.0.6/lib/mongo/collection.rb:175:ininsert_one'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-mongodb-2.0.5/lib/logstash/outputs/mongodb.rb:56:in receive'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/outputs/base.rb:109:inmulti_receive'", "org/jruby/RubyArray.java:1613:in each'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/outputs/base.rb:109:inmulti_receive'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/output_delegator.rb:130:in worker_multi_receive'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/output_delegator.rb:114:inmulti_receive'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/pipeline.rb:301:in output_batch'", "org/jruby/RubyHash.java:1342:ineach'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/pipeline.rb:301:in output_batch'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/pipeline.rb:232:inworker_loop'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/pipeline.rb:201:in `start_workers'"], :level=>:warn}
^CSIGINT received. Shutting down the agent. {:level=>:warn}
Can anyone help out?
i'm trying to send an email using phpmailer, it works fine on my laptop using xampp localhost server but when i tried to run the php class on my windows server 2008 with wamp installed on it it didn't work.
i already checked if the ssl is enabled from the php.ini
i'm getting this error:
2016-09-06 10:01:22 Connection: opening to smtp.mail.yahoo.com:587, timeout=300, options=array ( ) 2016-09-06 10:01:44 SMTP ERROR: Failed to connect to server: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (10060) 2016-09-06 10:01:44 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting Message could not be sent.Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
here's my code:
SendOutlook();
function SendOutlook(){
//$recipient = 'alghomlas.dk#pg.com';
require 'PHPMailer/PHPMailerAutoload.php';
$Emp_recipient = "alghomlas.dk#pg.com";
$mail = new PHPMailer;
$mail->SMTPDebug = 4; // Enable verbose debug output
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = "smtp.mail.yahoo.com"; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'xxxxxxxxx'; // SMTP username (server username)
$mail->Password = 'xxxxx'; // SMTP password
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 587; // TCP port to connect to
$mail->setFrom('alghomlas.dk#yahoo.com', 'One');
$mail->addAddress($Emp_recipient,"dalal alghomlas"); // Add a recipient
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = 'test';
$mail->Body = "scheduled on your outlook calender";
if(!$mail->send()) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
exit();
}else {
echo '<p>Message has been sent</p>';
}
echo !extension_loaded('openssl')?"Not Available":"Available";
AddOutlookEvent($Mng_recipient, $Emp_recipient, $Mng_Name, $Emp_Name, $Date, $Time);
}