I'm using Gitlab 7.1 CE on debian.
I set up smtp in /etc/gitlab/gitlab.rb
unicorn['port'] = 8081
external_url 'http://server_hostname.com:8081'
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.smtp_host.com"
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = "gitlab#smtp_host.com"
gitlab_rails['smtp_password'] = "secret"
gitlab_rails['smtp_domain'] = "smtp_host.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = false
I'm getting error
WARN: 553 5.7.1 : Sender address rejected: not owned by user gitlab#smtp_host.com
I don't know why sender email is set to gitlab#server_hostname.com instead of gitlab#smtp_host.com and no idea how to change it.
From email can be set in gitlab.rb:
gitlab_rails['gitlab_email_from'] = "gitlab#smtp_host.com"
Do you use Exim? https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md#1-packages-dependencies Note: In order to receive mail notifications, make sure to install a mail server. By default, Debian is shipped with exim4 whereas Ubuntu does not ship with one. The recommended mail server is postfix and you can install it with:
Related
I am new to the Kannel gateway. I installed kannel by referring some vids and docs.
After editing the kannel.conf, opensmppbox.conf, sqlbox.conf, I ran the below line
/usr/local/kannel/sbin/bearerbox -v 0 /etc/kannel/kannel.conf &
but got the error in the attached image.
This the MySQL connection lines in kannel.conf
#--------------------------------
group = mysql-connection
id = dlr-db
host = localhost
username = kannel
password = **********
Database = kannel
max-connections = 1
Do you guys have any idea what's the issue?.
Solved it. Its just a typo issue. I accidently used Database instead of database.
:-(
I tried installing poplib on my Mac, I tried with Conda, pip and Homebrew, but I couldn't manage to install this module.
Do you have any suggestion that I can try or an alternative module?
I'm using Python 3.5.1 installed with Anaconda.
Thanks!
I solved using impalib,and resolved an error with smtplib, but now I got even more stuck...
I cannot authenticate with the smtp server and cannot connect to the imap server.
This is my code:
class EmailController:
def __init__(self):
# Check for connection, connect to servers.
internetConnection = requests.get('http://www.google.com')
while not internetConnection:
internetConnection = requests.get('http://www.google.com')
self.addrFrom = 'My address'
print('connecting smtp')
self.smtpServer = smtplib.SMTP('smtp-mail.outlook.com', 587)
print('starting tls')
self.smtpServer.starttls()
print('authenticating')
self.smtpServer.login(self.addrFrom, 'password') #Here it gets stuck
print('connecting imap')
self.imapServer = imaplib.IMAP4('imap-mail.outlook.com', 993) #Here is gets stuck too
print('starting tls')
self.imapServer.starttls()
Could it be the server or I'm doing something wrong? Ho do you start SSL encryption on imaplib?
I am trying to build my own sms gateway by compile Kannel 1.5.0 on my mac 10.10. I installed all depends that Kannel required. I configured Kannel to work with Postgresql 9.3.5. BearerBox and smsBox are in good work order. I can send/receive sms from my HUAWEI E3131 3G WCDMA modem.
After I got sms gateway worked, I go next step by trying compile Kannel addons sqlbox to support sms sql storage and insert sms to database to trigger sms services. Following steps used:
use bootstrap to configure environments
.bootstrap
configure sqlbox with Kannel support
./configure --with-kannel-dir=/usr/local/kannel --disable-docs --enable-drafts
make to compile
make
make install to install sqlbox to proper location
make bindir=/usr/local/kannel install
configure sqlbox by edit sqlbox.conf file like:
group = pgsql-connection
id = pgsqlbox-db
host = "10.0.1.100"
username = any
password = any
database = dlr
max-connections = 1
port=5433
group = sqlbox
id = pgsqlbox-db
smsbox-id = sqlbox
global-sender = ""
bearerbox-host = localhost
bearerbox-port = 13001
smsbox-port = 13002
smsbox-port-ssl = false
sql-log-table = sent_sms
sql-insert-table = send_sms
log-file = "/usr/local/var/log/kannel/kannel-sqlbox.log"
log-level = 0
configure postgresql to add table send_sms and sent_sms and test by using PSQL client to test, data base is working order
start services from terminal
./bearerbox -v 1 /usr/local/kannel/conf/smskannel.conf
./smsbox -v 1 /usr/local/kannel/conf/smskannel.conf
bearerbox and smsbox is in working order.
start sqlbox service
./sqlbox -v 1 /usr/local/kannel/conf/sqlbox.conf
error message was given:
2015-05-01 10:06:01 [11407] [0] INFO: Debug_lvl = 1, log_file = <none>, log_lvl = 0
2015-05-01 10:06:01 [11407] [0] INFO: Starting to log to file /usr/local/var/log/kannel/kannel-sqlbox.log level 0
2015-05-01 10:06:01 [11407] [0] INFO: Added logfile `/usr/local/var/log/kannel/kannel-sqlbox.log' with level `0'.
2015-05-01 10:06:01 [11407] [0] INFO: PGSQL: Connected to server at '10.0.1.100'.
Segmentation fault: 11
in my understanding, Segmentation fault: 11 was thrown out by Postgresql server. So I configured Postgresql server to get more detail level debug information. Seems Postgresql is working fine.
Does anyone have a better idea about it? I totally lost my direction. Any advice are welcome.
Kannel is probably too old to care out the work in new system.
I changed it to Gammu 1.36.0,
make sure cmake installed.
autoconf and other required depends installed.
download Gammu 1.36.0
compile and install
.configure
make
sudo make install
configure Gammu by using [gammu] and [smsd] sections
enable log file in system
use newest db schema to create tables in database
start service by
gammu-smsd
check log make sure it works
10.send test message by
gammu-smsd-inject
11.receive sms
12.check database tables inbox and sentitems
13.done
I got the error on ubuntu but works on mac
But if I run the curl command on ubuntu , it works. is curb a buggy gem?
2.1.0/gems/curb-0.8.6/lib/curl/easy.rb:72:in `perform': SSL peer certificate or SSH remote key was not OK (Curl::Err::SSLPeerCertificateError)
RUBY
resp = Curl::Easy.http_post(server_url, content_to_send) do |curl|
curl.ssl_verify_peer = false
curl.headers = header.clone
end
Detail
/home/poc/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/curb-0.8.6/lib/curl/easy.rb:72:in `perform': SSL peer certificate or SSH remote key was not OK (Curl::Err::SSLPeerCertificateError)
from /home/poc/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/curb-0.8.6/lib/curl/easy.rb:398:in `http_post'
from /home/poc/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/curb-0.8.6/lib/curl/easy.rb:398:in `http_post'
from curb.rb:12:in `curl_query'
from curb.rb:21:in `<main>'
I had the same error, turns out for linux machines you need ssl_verify_host=0
To be safe I use both:
resp = Curl::Easy.http_post(server_url, content_to_send) do |curl|
curl.ssl_verify_peer = false
curl.ssl_verify_host = 0
curl.headers = header.clone
end
Also a heads up—you might be developing on mac, but deploying to a server running linux, so better to use both even on a mac.
OK, I know there has been a lot of discussion regarding APNS connection failures. Most of the discussion recommends checking the outgoing server port 2195 to be sure it will allow the connection. This is not my problem, although I am experiencing the 'connection refused' error (111).
I have validated communication between my server and the sandbox server be receiving a 200 response from the Apple Gateway. I know my certificates are good because I have tested the connection using openssl from a Mac. I have also been able to connect with the gateway once from my server but cannot get a consistent connection.
The test code I am using is as follows:
$ctx = stream_context_create();
stream_context_set_option($ctx,'ssl', 'local_cert', $pem);
stream_context_set_option($ctx, 'ssl', 'passphrase', $key);
$gateway = 'gateway.sandbox.push.apple.com';
$port = '2195';
$remote_socket = 'ssl://'.$gateway.':'.$port;
$fp = stream_socket_client($remote_socket, $err, $errstr, 60,STREAM_CLIENT_CONNECT, $ctx);
if (!$fp){
echo $err.'<br>';
echo $errstr.'</br>';
echo 'error=apple failed to connect';
} else {
fclose($fp);
echo 'success';
}
I have placed the .pem file in the same directory as the script file, removed the use of the passphrase, specified verify_peer, used the STREAM_CLIENT_ASYNC_CONNECT and the STREAM_CLIENT_PERSISTENT flags without success.
Is this an issue with something that I am doing, an issue with the apns sandbox server or is this what I should expect from the apns? Any insights or help you can provide is greatly appreciated -- my hair is getting pretty thin!
Regards.
PS -- If I remove the passphrase I get a 115 error saying the key cannot be accessed.
Despite being able to connect at least once, it turns out that you cannot get access to the APNS gateway without, at least, a virtual dedicated server on GoDaddy. At a minimum of $80 per month, paid upfront, that is too expensive. On to other means.
Some other things to try :
Use STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT in the stream_socket_client call
Don't use verify_peer
Check that the owner of the PHP script has enough rights to read the pem file and connect to a port located elsewhere (ie/ not just localhost)