LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-05-2020, 04:59 AM   #1
hatfani
Member
 
Registered: Oct 2019
Distribution: centos7
Posts: 52

Rep: Reputation: Disabled
Question Send email from server failure


Dear all,

I am trying to send an email to my gmail account by this command
Code:
sendmail user@example.com  < /wall.txt
wall.txt input:
Hi it's me
bye

anyhow, at first it gave me this error:
postconf: warning: inet_protocols: IPv6 support is disabled: Address family not supported by protocol.
So I change inet protocols in /etc/postfix/main.cf from "all" to "ipv4" and ran a restart
Code:
service postfix restart
After the restart, I used my sendmail command again and it didn't give any error but I also didn't receive any email.
I tried to use other commands like mail, mailx to no avail.
Any help?
Thank you.
 
Old 02-05-2020, 05:49 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
On my server, the log file is /var/log/maillog. Could be configured differently on yours, but it should be your first step to check the mail log. Perhaps also the system log.

EDIT: Debugging guide http://www.postfix.org/DEBUG_README.html. Also: Did you follow one of the setup guides, such as the standard setup http://www.postfix.org/STANDARD_CONF...N_README.html?

Last edited by berndbausch; 02-05-2020 at 05:54 AM.
 
1 members found this post helpful.
Old 02-05-2020, 09:15 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by hatfani View Post
Dear all,
I am trying to send an email to my gmail account by this command
Code:
sendmail user@example.com  < /wall.txt
wall.txt input:
Hi it's me
bye

anyhow, at first it gave me this error:
postconf: warning: inet_protocols: IPv6 support is disabled: Address family not supported by protocol.
So I change inet protocols in /etc/postfix/main.cf from "all" to "ipv4" and ran a restart
Code:
service postfix restart
After the restart, I used my sendmail command again and it didn't give any error but I also didn't receive any email.
I tried to use other commands like mail, mailx to no avail.
Have you ever been able to send mail from this server?? How do you have postfix configured to relay mail upstream to another server/host? Because unless you're running your own mail server (which is an ENORMOUSLY complicated task), you need to tell postfix to send mail onwards to another system that can handle and deliver it. Otherwise, mail won't go anywhere.

You don't tell us anything about your environment, what other servers are in play, your network, etc., so there's not a lot we can tell you. There are many how-to guides on how to easily configure Postfix to use Gmail as a relay host as well. But if you're in a business environment, chances are they already have an internal relay server that you can point systems to.
 
1 members found this post helpful.
Old 02-13-2020, 06:41 AM   #4
hatfani
Member
 
Registered: Oct 2019
Distribution: centos7
Posts: 52

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
Have you ever been able to send mail from this server?? How do you have postfix configured to relay mail upstream to another server/host? Because unless you're running your own mail server (which is an ENORMOUSLY complicated task), you need to tell postfix to send mail onwards to another system that can handle and deliver it. Otherwise, mail won't go anywhere.

You don't tell us anything about your environment, what other servers are in play, your network, etc., so there's not a lot we can tell you. There are many how-to guides on how to easily configure Postfix to use Gmail as a relay host as well. But if you're in a business environment, chances are they already have an internal relay server that you can point systems to.
Apparently every thing worked properly, the emails were recieved in my spam folder but I didn't pay attention.

Anyway,
Thank you.
 
  


Reply

Tags
email, mail, postfix, sendmail


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Failure after failure after failure.....etc 69Rixter Linux - Laptop and Netbook 5 04-14-2015 09:58 AM
Perl email::send.. how to send the email? hawk__0 Programming 6 12-24-2009 01:53 PM
Send email to specific SMTP servers per email from my server? neilius Linux - Server 6 06-25-2009 06:31 AM
Apache virtual host send email without email server SibLiant Linux - Software 6 06-03-2009 09:46 PM
Allowing an IP to send email using my email server... culprit Linux - Networking 7 09-09-2003 12:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration