local mail broken and cannot mail outside server

Asked by tearsforhari

I have just installed Ubuntu 16.04 Server on a 32-bit machine. I have two problems:

1) I cannot mail outside the server to the outside world. Can someone give me some instructions on how to config the appropriate conf file? How do I open ports 465 or 587 by command line?

2) I initially was able to mail local users until I messed up the system possibly deleting mailutils or its dependencies trying to install and uninstalled ssmtp. So I reinstalled mail utils:
> sudo apt-get install mailutils
>mail tearsforhari
Although the mail appears to be going through the motion, I do not get mail now.
>no mail for tearsforhari

I also tried
>sudo apt-get install postfix,
but the mail still does not work.

I'm lost and need to start from scratch to repair the system's mail.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Bernard Stafford (bernard010) said (last edit ):
#1

Ubuntu 16.04 Server is a 64bit OS. Which is not compatible with a 32bit computer.
These may be the very problems that you are having.
Ubuntu no longer supports 32bit OS.
I would recheck the system info to see if your processor is 64bit compatible.
Ubuntu 16.04 is no longer available for standard support, ESM support only.

Revision history for this message
tearsforhari (tearsforhari) said :
#2

I have the 16.04 32-bit version (Xenial Xerus). If someone could give me instructions on how to config the appropriate files to get mail working, I can reinstall a fresh copy and start again.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

16.04 is dead and gone. I suggest you switch to Debian as they are supporting 32bit architectures

Revision history for this message
tearsforhari (tearsforhari) said :
#4

Is there a thread of Debian that can answer how to setup mail to the outside world? That is all I need here on Ubuntu regardless of architecture. That is my question here: how to setup mailx to send to the outside world. Anyone? What happened to Manfred as he was helpful.

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

(I am not running a mailserver myself; I have no idea what the cause of your problem is)

Revision history for this message
tearsforhari (tearsforhari) said (last edit ):
#6

Nice to hear from you again, Manfred. It's been awhile. I'm running a server with a website that has a html form and submit button. I want the data to be mailed to a gmail account. So far I can get the data to be sent to the mail on the server only, but not to gmail or outside world. I cannot even forward mail from the local mail server. I do not know what the main mail program is on ubuntu—whether it be mail, mailx, postfix, etc. I am a but confused here. I also do not know how to set permissions and probably how to modify the correct .conf file with the correct stmp and port numbers. I tried. Any guidance or advice would be appreciated. (I can switch to a 64-bit machine eventually, but I will face the same hurdle uness by default the lastest version of ubuntu comes turnkey.)
________________________________
From: <email address hidden> <email address hidden> on behalf of Manfred Hampl <email address hidden>
Sent: Thursday, March 9, 2023 12:25 AM
To: <email address hidden> <email address hidden>
Subject: Re: [Question #705684]: local mail broken and cannot mail outside server

Your question #705684 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/705684

Manfred Hampl posted a new comment:
(I am not running a mailserver myself; I have no idea what the cause of
your problem is)

--
You received this question notification because you asked the question.

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

Maybe https://learnubuntu.com/send-emails-from-server/ helps.
You have to be aware that for spam prevention most public mail providers have restrictions on how external systems can connect to them for automated sending of mails.

Revision history for this message
tearsforhari (tearsforhari) said (last edit ):
#8

I see now. I'll find a work around then. Perhaps I can instead write the data into a MySQL database and access that via an app on my phone or something. I was using webflow.io -- a paid service -- that handled and mailed the form data to me. I wonder how they overcame the restrictions then.
________________________________
From: <email address hidden> <email address hidden> on behalf of Manfred Hampl <email address hidden>
Sent: Friday, March 10, 2023 1:00 AM
To: <email address hidden> <email address hidden>
Subject: Re: [Question #705684]: local mail broken and cannot mail outside server

Your question #705684 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/705684

    Status: Open => Answered

Manfred Hampl proposed the following answer:
Maybe https://learnubuntu.com/send-emails-from-server/ helps.
You have to be aware that for spam prevention most public mail providers have restrictions on how external systems can connect to them for automated sending of mails.

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/ubuntu/+question/705684/+confirm?answer_id=6

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/ubuntu/+question/705684

You received this question notification because you asked the question.

Revision history for this message
Manfred Hampl (m-hampl) said :
#9

I did not tell that this is impossible.
In fact if you use a local mail client to access the foreign mail server, create a mail message locally and then transfer it to the mail server for delivery, that is exactly the same process.
Have you looked into https://learnubuntu.com/send-emails-from-server/ ?

Revision history for this message
tearsforhari (tearsforhari) said (last edit ):
#10

I did it!!! Yipee!! I can send mail to the outside world using the smtp settings from an outside mail service provider like Gmail. This solves my form problem. No sense in paying for a form service--with recent price increase-- when I have plenty of old computers laying around to do the same--even if they are running 32-bit Ubuntu.

Although I can send emails from my server using local mail, I cannot send emails from outside to the local server. I presume to do this, I need to register a domain name for my server? Is that correct? I don't quite understand--because I can access local IP cameras from the outside world using the same dyndns address. Perhaps I need to open a port on my server?

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#11

"Perhaps I need to open a port on my server?"

Maybe these:
https://www.siteground.com/tutorials/email/protocols-pop3-smtp-imap/#Default_email_ports

Revision history for this message
tearsforhari (tearsforhari) said :
#12

Thanks Manfred Hampl, that solved my question.