My Dovecot and Postfix server on Ubuntu not working - email

I recently started renting a Ubuntu 18.04 VPS from DigitalOcean. The intent was to run a cheaper email system instead of alternatives like GSuite and Microsoft Business for me and a fellow developer, and split the costs. I've setup very basic email servers before, but in this case, since we both have our own domains and users, using virtual domains/virtual users is a must.
I followed a tutorial here, but my server won't let me connect. When I try viewing logs in any sort of way, everything seems fine. Entering the command tail -f /var/log/syslog | grep dovecot, then monitoring the results as I try and log in only produces this:
Sep 29 03:11:16 MEMail dovecot: imap-login: Login: user=<sysadmin#meproduction.org>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=28028, secured, session=<lUrg7Pl2ls9/AAAB>
Sep 29 03:11:16 MEMail dovecot: imap(sysadmin#meproduction.org): Logged out in=44 out=870
That's all the logs I was able to find. /var/logs/mail.log was empty, and postfix doesn't seem to show anything what-so-ever. When I try and login via SquirrelMail, CloudFlare ( my NameServer ) shows a page saying a 502, but only if I login to a valid account. Entering an invalid user just says that my login is incorrect, as you'd expect.
What logs am I missing, or maybe steps the tutorial messed up that you see? I would like to get the email system running ASAP, because I don't want to setup anything else until it's done, and some things require it ( like adding a spam filter, and S/MIME, and adding all those extra DNS and SSL features for security ).

I did find an answer. Apparently the tutorial I followed must've been formatted incorrectly, or done something wrong. After reverting my VPS, and following a different tutorial, I was able to set it up. If anybody else is trying to setup something like I did, follow this tutorial from DigitalOcean. I recommend looking firstly for tutorials from them, as they're usually well made and work well.

Related

Whatsapp Business API production setup not working

I am trying to configure or setup the production environment of whatsapp business api as mentioned in the link https://developers.facebook.com/docs/whatsapp/installation/prod-single-instance
I have done everything mentioned in this my dockers are also running on port:9090 as can be seen in the image
still I can't access it. Whenever I try to call https://localhost:9090 the error with "This site can’t be reached" occurs. Whatsapp business api does not have good documentation or tutorials till now. So this site is the only last way for me.
I had a similar problem which could be your case, I saw the docker containers OK but nothing was working. After a day searching I saw where it happened, my problem was I installed mysql MANUALLY (not docker container) in the same instance where docker is running and in db.env I just used 127.0.0.1, this was passed literally to docker container, then looking at a the wait_on_mysql.sh script, the whastapp docker containers were waiting util the mysql ip has conectivity to actually do something and was printing "MySQL is not up yet - sleeping" each second, of course they wouldn't find any conectivity.
Since my instalation is for development, and I am already using such database to other stuff, my solution was to use the 172.17.0.1(docker gateway of the containers) IP instead, then add two sets of network iptables rules to the host to redirect from the docker containers IP to the IP binded by mysql when using such port (3306, the default in my case). After that everything works well. I think there are better solutions, but I didn't want to go far on it, you should evaluate you case if apply.
check the command:
docker-compose logs > debug_output.txt
That gives you insight about whats happening, hope it can helps someone.
I think your setup is already complete. You just need to start with the registration process and start sending messages. The containers are up and running but calling https://localhost:9090 won't send you any response as this is not any specified API endpoint expected to be used.
Since you're using prod single instance, the documentation can be found here which seems pretty straight forward. https://developers.facebook.com/docs/whatsapp/installation/prod-single-instance
You seem to have completed till the 7 steps. The next step can be to perform a health check to make sure it is healthy. The API endpoint for that would be https://localhost:9090/v1/health https://developers.facebook.com/docs/whatsapp/api/health
Has your db also been setup?
I cannot see it in the docker screenshot.
Also - you have to accept the certificate, as it does not have a public CA issues certificate.

LDAP auth for MongoDB with Pam

I am working to get MongoDB (using the Percona distro) to authenticate using Pam. I can see lots of info about using SASL, but the company standard is pam and I'm not able to change that. I see a project from 2011 in GitHub (pam_mongodb) that says it works, but given the age I'm hoping for a better solution. I have RHEL 7.5, Mongo 3.6.5, and and have cyrus-sasl 2.1.26 installed, but not configured.
Any suggestions? I am completely new to LDAP and trying to fumble my way through, so pointers to web pages are also helpful.
Thanks...

Jenkins won't send e-mails anymore

This might be a tough thing to figure out but i have to give it a try.
With no changes i am aware of, my jenkins just stopped sending out e-mail notifications. I use jenkins 1.609 and email extension plugin 2.40.5. Jenkins runs as a service using a service user who also has the rights on the server to send e-mails. Ports to our smtp-server are unlocked. Used telnet for testing that everything works as expected. SMTP-server works fine, so it has something to do with jenkins and i cant figure out what is going wrong.
For some unknown reason jenkins still fails to send e-mails. When i use the test-feature that jenkins offers i get: javax.mail.AuthenticationFailedException: 535 5.7.3 Authentication unsuccessful which tells me that either user or pw is incorrect, but as mentioned i've checked many times, it's setup correctly. Can anyone help out with this?
UPDATE:
After decrypting the password i can safely say that jenkins does save the password correct. Is there any way i can check that jenkins actually compares the correct encrypted passwords with each other? From my understanding jenkins uses 2 different encrypting techniques, maybe it uses tech1 for stored pw and tech2 for compare pw?
ANOTHER UPDATE:
Just tried adding a new certificate to the keystore, just in case, still no change.
MORE UPDATES:
Tried updating the mailer plugin- no change
Tried different users - all failed with the same error
So no matter what user i try, they all fail, but have jenkins execute a script which sends e-mails using said users it works.
August 18, 2016 - no change

How to get e-mails to work on phpBB with CentOS 6? Experiencing PHP Error

So, I have a phpBB forum on CentOS 6, however there is a problem. E-mails are simply not working.
I tried using e-mails on domain such as admin#domain.com, and I would get this error:
E-mail error
» EMAIL/PHP/mail()
/adm/index.php
so I trued using SMTP with different SMTP hosts and settings, nothing has worked, I would simply get this error:
E-mail error
» EMAIL/SMTP
/adm/index.php
Could not connect to smtp host : 0 : php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
Errno 2: fsockopen(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution at [ROOT]/includes/functions_messenger.php line 1030<br />
Errno 2: fsockopen(): unable to connect to smtp.mail.com:25 (php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution) at [ROOT]/includes/functions_messenger.php line 1030
I got the errors from PHP Error Log from PHP
Oddly enough, the e-mails appear on my VPS in var/spool/mail/root file.
2 people have told be that this may be a DNS issue, I suspect this being true, as I, for some reason, couldn't use "wget" on my VPS, so I set Nameservers in /etc/resolv.conf and suddenly another problem I was experiencing, "could not get latest phpBB version" or something like that, was fixed. So, if that was fixed with such a solution, I would assume this would have something to do with it too.
And, I asked my host about it, they said "everything is virtualized" and how they have no actual control over it (in a sense that it is their configuration's fault) and how they do not support 3rd party software, even though this is not a software issue. And prior to that they said that they talked to "level 3 Linux admin" and how the admin said it is PHP/Apache issue.
I am losing my mind over this. It is a good machine for a good price with a game panel as we are hosting a game server, and it would really be a bother to move it all elsewhere.
Also, full talk and information on phpBB forums can be found here:
https://www.phpbb.com/community/viewtopic.php?f=46&t=2257586
Check your SMTP settings, make sure its set to the correct client (both on your DNS and within phpbb in General-Client Communication-Email Settings). If you have to use an authenticated account, verify that the username and password you are using is correct by typing it into a word doc to see spelling and copy/pasting it into the fields. In some cases, SMTP will only work with authenticated accounts.

How can I use Mandrill App as system message mailer on Parallels Panel?

Currently I have my CentOS system set up with Parallels Panel and have my mailing system working nicely. But I'd prefer to have my system messages to be mailed using Mandrill App (MailChimp guys).
I have it working now with a kind of a mixed setup. Simple, though working. But now I get an error in my mail logs saying the following:
Jan 4 10:41:11 shinjuku postfix/smtp[29469]: certificate verification failed for smtp.mandrillapp.com[46.137.69.113]:25: untrusted issuer /C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting cc/OU=Certification Services Division/CN=Thawte Premium Server CA/emailAddress=premium-server#thawte.com`
After this I've tried configuring the smtp_tls_CApath and smtpd_tls_CApath to point to /etc/ssl/certs, but still no luck on this part.
Does someone have an idea on how I can get this working to have ALL system messages to be sent using Mandrill, instead of built-in config?
Mark, for CentOS try this for your CAPath/CAfile
smtp_tls_CAfile = /etc/ssl/certs/ca-bundle.crt