LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Closed Thread
  Search this Thread
Old 01-19-2021, 10:58 PM   #1
skubik
Member
 
Registered: May 2003
Location: A dark corner in Canada
Distribution: Slackware64 15.0/current
Posts: 152

Rep: Reputation: 21
Trying to understand Postfix SMTP relay


Hi there,

So I wrote a post in the General forum a few weeks ago (here: https://www.linuxquestions.org/quest...8/#post6201162) that explains my problem in more detail.

TLDR; I want to use my Postfix SMTP to relay outgoing messages for my domain through my hosting provider's SMTP using my credentials.

Essentially I want to connect to my hosting provider's SMTP server to send an email, but instead of sending from my email client, it instead comes from my own internal Postfix SMTP server (to which I send the message using my email client; this part already works fine)

I've read through a few different documents online that explains how to do this. One in particular talks about how to do it using Gmail.

But despite my efforts, when I send my message, it gets stuck with my Postfix server.

So what I've done is try sending an email to my Gmail account from my domain account;
me@mydomain.com -> me@gmail.com

The message never arrives at Gmail, and when I inspect postqueue, I see the message listed and it contains:
Code:
"delay_reason": "connect to alt4.gmail-smtp-in.l.google.com[142.250.96.26]:25: Connection timed out"
Now, is that a message coming back from my hosting provider's SMTP?
If not, when why is my Postfix SMTP trying to connect to Google's SMTP as suggested in the delay reason?
Should it not be connecting to my hosting provider's SMTP instead?

Am I understanding SMTP relay correctly?

Furthermore, when I look at the output of 'postconf -n', I do NOT see any of the settings I configured in Postfix's main.cf as explained in my other post (specifically but not limited to 'relay_recipient_maps', 'sender_dependent_relayhost_maps', 'smtp_sasl_password_maps', etc.)
I've also noticed that my domain isn't listed in the 'relay_domains' value despite it being configured in main.cf.

Why might my settings not be showing up in postconf? Am I missing something? A setting? A Debian package?

I'm kinda stumped and would really appreciate some direction with this. It's been stumping me for almost a month now.

Thanks!
 
Old 01-19-2021, 11:30 PM   #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
Duplicate of https://www.linuxquestions.org/quest...lay-4175688919, reported.
 
Old 01-20-2021, 06:04 AM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Moderator Response

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate of https://www.linuxquestions.org/quest...ay-4175688919/
 
  


Closed Thread

Tags
email, postfix, postfix forward



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to understand Postfix SMTP relay skubik Linux - Software 1 02-04-2021 03:17 AM
554 5.7.1 Relay access denied Postfix Open Relay kryspek Linux - Software 5 04-26-2017 08:35 AM
Postfix Relay Getting Spammed Bad -- But no open relay... ihod2008 Linux - Server 1 07-26-2008 08:24 PM
SMTP "open relay" and SMTP AUTH aikempshall Linux - Security 3 10-11-2006 08:19 AM
Postfix as a mail relay (getting relay access denied) hypexr Linux - Software 3 09-13-2005 07:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:34 AM.

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