summary of the issue
I just installed a fresh “ubuntu 18.04.1” server
And installed successfully OTRS 6.0.12 from source
Installation steps was based on OTRS admin guide
I tried the setup on a local vmware VM & on a digital ocean droplet
Both connected to internet, and can access gmail servers
The system works, I can navigate the web admin interface, create tickets, create agents, queues, ….
The thing that is not working is email, both incoming and outgoing
Details
When I configure the email as per below image during setup

And press check configuration it replies with the message
“OTRS detected possible network issues. You could either try reloading this page manually or wait until your browser has re-established the connection on its own.”
I had to skip this step in order to proceed
Once the system is installed and working, I tried to "create new email ticket"
It replies with
Impossible to send message
Invalid email address Sender - otrs@localhost: invalid otrs@localhost (Invalid syntax)!
Errors occurred during message sending: Error while queueing email to 'abc@gmail.com' from 'otrs@localhost'. Subject => '[Ticket#2018110249000021] test;
Backend ERROR: OTRS-CGI-20 Perl: 5.26.1 OS: linux Time: Wed Oct 31 21:23:52 2018
Message: Impossible to send message to: abc@gmail.com .
RemoteAddress: 192.168.0.164
RequestURI: /otrs/index.pl
Traceback (1386):
Module: Kernel::System::Ticket::Article::Backend::Email::ArticleSend Line: 299
Module: Kernel::Modules::AgentTicketEmail::Run Line: 1698
Module: Kernel::System::Web::InterfaceAgent::Run Line: 1116
Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler Line: 38
Module: (eval) (v1.99) Line: 207
Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
Module: ModPerl::Registry::handler (v1.99) Line: 32
When I try to configure incoming email, either using IMAP or IMPATLS
As per the image

When I press "Fetch mail" It says finished
With no errors
But no tickets are created
Checking the communications log shows

Appreciate help in order to be able to
1.send outgoing emails, say after ticket creation
2.recieve emails, say from a customer, and in turn create a ticket in a queue based on received email