LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 09-23-2019, 11:01 PM   #1
jessie1
LQ Newbie
 
Registered: Dec 2018
Posts: 4

Rep: Reputation: Disabled
Postfix "relayhost" configuration


Hello

I have just installed a postfix server into a virtual machine on my PC but I can not configure it to send emails to my work email through the company mail server.

Installed OS: Oracle linux 8.0
Vm: Vmware Esxi 6.5, running on a windows PC
Postfix-3.3.1-8.el8.x86_64

Initially I received the error below when I attempted to send a mail;

send-mail: warning: /etc/postfix/main.cf, line 340: overriding earlier entry: relayhost=[****.ne.jp.]:465
postdrop: warning: /etc/postfix/main.cf, line 340: overriding earlier entry: relayhost=[****.ne.jp.]:465


After editing the configuration file,when I run the mailq command after attempting to send a mail, I see the following error message;

5F63D30A7F30 430 Tue Sep 24 11:58:59 root@localdomain.com
(unknown mail transport error).

I am confused because I am thinking the above error has to do with email aliases but I have not set any.

I have read that I need to correctly edit the "relayhost" portion of the main.cf file but I dont know what I am doing wrong as I am new to this.

Any help in plain English with regards to this problem will be appreciated.

Thank you in advance.
 
Old 09-23-2019, 11:34 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,339

Rep: Reputation: Disabled
Quote:
Originally Posted by jessie1 View Post
Initially I received the error below when I attempted to send a mail;

send-mail: warning: /etc/postfix/main.cf, line 340: overriding earlier entry: relayhost=[****.ne.jp.]:465
postdrop: warning: /etc/postfix/main.cf, line 340: overriding earlier entry: relayhost=[****.ne.jp.]:465
...which would indicate that you had TWO relayhost entries in main.cf at the time
Quote:
Originally Posted by jessie1 View Post
After editing the configuration file,
What changes did you make?
Quote:
Originally Posted by jessie1 View Post
when I run the mailq command after attempting to send a mail, I see the following error message;

5F63D30A7F30 430 Tue Sep 24 11:58:59 root@localdomain.com
(unknown mail transport error).

I am confused because I am thinking the above error has to do with email aliases but I have not set any.
Why would you think that, when the error message clearly says "unknown mail transport"?

Seems like there's something wrong with your current relayhost setting, whatever it might be.
Quote:
Originally Posted by jessie1 View Post
I have read that I need to correctly edit the "relayhost" portion of the main.cf file but I dont know what I am doing wrong as I am new to this.
Here's a document explaining the "relayhost=" setting in more detail.

I noticed that the setting you changed specified TCP port 465. That's SMTPS (SMTP over SSL), which is actually deprecated. It wasn't supported in earlier versions of Postfix, and may still not be (I haven't kept up with the development of Postfix).

See if by any chance your ISP supports delivery via authenticated SMTP (possibly with TLS) via port 587. That's the current standard that most everybody uses, and it's of course supported by Postfix. If they do not and you're forced to use SMTPS on port 465, do a Google search for how to configure Postfix with stunneld. The latter is a separate application (that you'll probably have to install) for general SSL communication.

Last edited by Ser Olmy; 09-23-2019 at 11:36 PM.
 
Old 09-24-2019, 10:17 PM   #3
jessie1
LQ Newbie
 
Registered: Dec 2018
Posts: 4

Original Poster
Rep: Reputation: Disabled
Hello Ser

Thank you for taking the time to comment on this post.

As you rightly pointed out, my configuration of the postfix server "relayhost" portion was wrong.
Following the link you sent to me, I was able to rightly configure the server to send and receive internal and external emails.
 
Old 09-25-2019, 07:22 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by jessie1 View Post
Hello Ser
Thank you for taking the time to comment on this post.

As you rightly pointed out, my configuration of the postfix server "relayhost" portion was wrong. Following the link you sent to me, I was able to rightly configure the server to send and receive internal and external emails.
And this is the THIRD THREAD on this same subject, including one 14 year old necropost:
https://www.linuxquestions.org/quest...on-4175661190/
https://www.linuxquestions.org/quest...-1-5-a-341155/

Read the LQ Rules about posting the same question multiple times.
 
1 members found this post helpful.
Old 09-25-2019, 11:28 AM   #5
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,801

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by TB0ne View Post
And this is the THIRD THREAD on this same subject, including one 14 year old necropost:
https://www.linuxquestions.org/quest...on-4175661190/
https://www.linuxquestions.org/quest...-1-5-a-341155/

Read the LQ Rules about posting the same question multiple times.
What search terms did you use to obtain those? I find that when I search for prior posts I either get nothing (too specific, I guess) or I get a slew of hits that have little to do with the situation I'm trying to resolve (obviously not specific enough). Is there a good LQ page that offers suggestions on how best to get search results that aren't "nothing" or "darned near the whole forum"?

This thread is probably not good place to continue any discussion so redirect as necessary. I'll bet others would join me in a "TIA".
 
Old 09-25-2019, 12:07 PM   #6
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
I suspect TB0ne used "Find more posts by..." on the link of the OPs username. They only have 4 posts, and three of them appear to be about how to configure postfix.
 
1 members found this post helpful.
Old 09-25-2019, 12:14 PM   #7
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,801

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by scasey View Post
I suspect TB0ne used "Find more posts by..." on the link of the OPs username. They only have 4 posts, and three of them appear to be about how to configure postfix.
Ah... that those links to posts came from the OP wasn't clear. Bad. Bad, OP.
 
2 members found this post helpful.
  


Reply



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
postfix relayhost configuration (SMTPS) rutgerw Linux - Server 3 02-19-2011 02:02 AM
[SOLVED] Postfix relayhost not working, if domain hosted on same server, but MX points outside katru Linux - Server 2 06-23-2010 06:25 PM
postfix - relayhost configuration problem kalinic Ubuntu 20 03-02-2009 03:36 AM
Postfix relayhost or direct deliver john.dixon Linux - Server 2 10-30-2008 08:44 AM
postfix relayhost gabsik Linux - Networking 1 02-08-2007 02:51 AM

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

All times are GMT -5. The time now is 11:02 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