TPG Community

Get online support

TPG SMTP Relay Auth with Postfix linux

OggyP
Level 2

I setup my own email server using iRedMail with postfix. This worked great when suddenly I was unable to send any messages to gmail and got the following error:

 

Diagnostic-Code: smtp; 550-5.7.1 [193.119.80.196] The IP you're using to send
    mail is not authorized to 550-5.7.1 send email directly to our servers.
    Please use the SMTP relay at your 550-5.7.1 service provider instead. Learn
    more at 550 5.7.1  https://support.google.com/mail/?p=NotAuthorizedError
    q26si3068097pgt.294 - gsmtp

 

I did what it said and setup a SMTP relay to TPG by adding the line:

 

relayhost = [mail.tpg.com.au]

 

to /etc/postfix/main.cf

 

Now I it fails and says this:

Spoiler
This is the mail system at host mail.ifnulltrue.com.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<oggyprit@gmail.com>: host mail.tpg.com.au[203.12.160.34] said: 554 5.7.1
    [TPG-S02] [1468Vxbn014915] Message rejected as it appears to be spam. Use
    SMTP AUTH, PostOffice, or contact the Postmaster Team
    <postmaster@tpg.com.au> (in reply to end of DATA command)
Reporting-MTA: dns; mail.ifnulltrue.com
X-Postfix-Queue-ID: 4FbRdW4Vynzfc8F
X-Postfix-Sender: rfc822; chess@oggyp.com
Arrival-Date: Thu,  6 May 2021 18:31:59 +1000 (AEST)

Final-Recipient: rfc822; oggyprit@gmail.com
Original-Recipient: rfc822;oggyprit@gmail.com
Action: failed
Status: 5.7.1
Remote-MTA: dns; mail.tpg.com.au
Diagnostic-Code: smtp; 554 5.7.1 [TPG-S02] [1468Vxbn014915] Message rejected as
    it appears to be spam. Use SMTP AUTH, PostOffice, or contact the Postmaster
    Team <postmaster@tpg.com.au>
Return-Path: <chess@oggyp.com>
Received: from mail.ifnulltrue.com (mail.ifnulltrue.com [127.0.0.1])
    by mail.ifnulltrue.com (Postfix) with ESMTP id 4FbRdW4Vynzfc8F
    for <oggyprit@gmail.com>; Thu,  6 May 2021 18:31:59 +1000 (AEST)
Authentication-Results: mail.ifnulltrue.com (amavisd-new);
    dkim=pass (2048-bit key) reason="pass (just generated, assumed good)"
    header.d=oggyp.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=oggyp.com; h=
    content-transfer-encoding:content-type:message-id:user-agent
    :subject:to:from:date:mime-version; s=dkim; t=1620289918; x=
    1621153919; bh=EgE/FdTNRiCHrFPjiJZoxUsivHWpjBT1qwZFuzPjb0E=; b=E
    tBeLKpbFELvpP1V1W6yRF8rsXjqXfsHPTaeNgVKvVIxFGNzpMnY9KBW+7nbVxYuC
    1WsnXSYIF4LbEo8lMToYyq3ya3qp/SeqRy9DF2G+ENGwQCPLquG+SY84eh5TBP6f
    VHDKeR1OJgpGGYswX4o2Q16x8J9xsx94tEzopF8msASlBmgdyzKj+exOZKpqggMe
    jCV/Tqfs2sTuz/ZDXerPINK+8abOdjDNCFGOks8hKGX9eeYNAfE5DPggYQyGZE9F
    6kXqA8Ztpf/X/AttbXlfUHlrIxSdTUUzzCXgEhqA65521avajSx7vLxhWaOJGhxd
    9d8VfT3D2pO/6goIb6wzA==
X-Virus-Scanned: Debian amavisd-new at mail.ifnulltrue.com
Received: from mail.ifnulltrue.com ([127.0.0.1])
    by mail.ifnulltrue.com (mail.ifnulltrue.com [127.0.0.1]) (amavisd-new, port 10026)
    with ESMTP id Sz0ru4d_i7bn for <oggyprit@gmail.com>;
    Thu,  6 May 2021 18:31:58 +1000 (AEST)
Received: from mail.ifnulltrue.com (mail.ifnulltrue.com [127.0.0.1])
    by mail.ifnulltrue.com (Postfix) with ESMTPSA id 4FbRS64FZNzfbPf
    for <oggyprit@gmail.com>; Thu,  6 May 2021 18:23:50 +1000 (AEST)
MIME-Version: 1.0
Date: Thu, 06 May 2021 18:23:50 +1000
From: chess@oggyp.com
To: oggyprit@gmail.com
Subject: Test
User-Agent: Roundcube Webmail
Message-ID: <c97661ea1abffd612189abd9e4239dc1@oggyp.com>
X-Sender: chess@oggyp.com
Return-Receipt-To: chess@oggyp.com
Disposition-Notification-To: chess@oggyp.com
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit

Any help would be great.

 

Thanks, Oscar

4 REPLIES 4
Anonymous
Not applicable

Hi @OggyP ,

 

Thanks for raising this to us, here is an article that you may find helpful. This will guide you a basic troubleshooting on how to rectify outgoing email issues. 

 

Cannot Send Email Rejected by the Server/Banned from using SMTP 

 

Let us know how it will go.

 

Cheers!

 


@OggyP wrote:

I setup my own email server using iRedMail with postfix. This worked great when suddenly I was unable to send any messages to gmail and got the following error:

 

Diagnostic-Code: smtp; 550-5.7.1 [193.119.80.196] The IP you're using to send
    mail is not authorized to 550-5.7.1 send email directly to our servers.
    Please use the SMTP relay at your 550-5.7.1 service provider instead. Learn
    more at 550 5.7.1  https://support.google.com/mail/?p=NotAuthorizedError
    q26si3068097pgt.294 - gsmtp

 

I did what it said and setup a SMTP relay to TPG by adding the line:

 

relayhost = [mail.tpg.com.au]

 

to /etc/postfix/main.cf

 

Now I it fails and says this:

Spoiler
This is the mail system at host mail.ifnulltrue.com.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<oggyprit@gmail.com>: host mail.tpg.com.au[203.12.160.34] said: 554 5.7.1
    [TPG-S02] [1468Vxbn014915] Message rejected as it appears to be spam. Use
    SMTP AUTH, PostOffice, or contact the Postmaster Team
    <postmaster@tpg.com.au> (in reply to end of DATA command)
Reporting-MTA: dns; mail.ifnulltrue.com
X-Postfix-Queue-ID: 4FbRdW4Vynzfc8F
X-Postfix-Sender: rfc822; chess@oggyp.com
Arrival-Date: Thu,  6 May 2021 18:31:59 +1000 (AEST)

Final-Recipient: rfc822; oggyprit@gmail.com
Original-Recipient: rfc822;oggyprit@gmail.com
Action: failed
Status: 5.7.1
Remote-MTA: dns; mail.tpg.com.au
Diagnostic-Code: smtp; 554 5.7.1 [TPG-S02] [1468Vxbn014915] Message rejected as
    it appears to be spam. Use SMTP AUTH, PostOffice, or contact the Postmaster
    Team <postmaster@tpg.com.au>
Return-Path: <chess@oggyp.com>
Received: from mail.ifnulltrue.com (mail.ifnulltrue.com [127.0.0.1])
    by mail.ifnulltrue.com (Postfix) with ESMTP id 4FbRdW4Vynzfc8F
    for <oggyprit@gmail.com>; Thu,  6 May 2021 18:31:59 +1000 (AEST)
Authentication-Results: mail.ifnulltrue.com (amavisd-new);
    dkim=pass (2048-bit key) reason="pass (just generated, assumed good)"
    header.d=oggyp.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=oggyp.com; h=
    content-transfer-encoding:content-type:message-id:user-agent
    :subject:to:from:date:mime-version; s=dkim; t=1620289918; x=
    1621153919; bh=EgE/FdTNRiCHrFPjiJZoxUsivHWpjBT1qwZFuzPjb0E=; b=E
    tBeLKpbFELvpP1V1W6yRF8rsXjqXfsHPTaeNgVKvVIxFGNzpMnY9KBW+7nbVxYuC
    1WsnXSYIF4LbEo8lMToYyq3ya3qp/SeqRy9DF2G+ENGwQCPLquG+SY84eh5TBP6f
    VHDKeR1OJgpGGYswX4o2Q16x8J9xsx94tEzopF8msASlBmgdyzKj+exOZKpqggMe
    jCV/Tqfs2sTuz/ZDXerPINK+8abOdjDNCFGOks8hKGX9eeYNAfE5DPggYQyGZE9F
    6kXqA8Ztpf/X/AttbXlfUHlrIxSdTUUzzCXgEhqA65521avajSx7vLxhWaOJGhxd
    9d8VfT3D2pO/6goIb6wzA==
X-Virus-Scanned: Debian amavisd-new at mail.ifnulltrue.com
Received: from mail.ifnulltrue.com ([127.0.0.1])
    by mail.ifnulltrue.com (mail.ifnulltrue.com [127.0.0.1]) (amavisd-new, port 10026)
    with ESMTP id Sz0ru4d_i7bn for <oggyprit@gmail.com>;
    Thu,  6 May 2021 18:31:58 +1000 (AEST)
Received: from mail.ifnulltrue.com (mail.ifnulltrue.com [127.0.0.1])
    by mail.ifnulltrue.com (Postfix) with ESMTPSA id 4FbRS64FZNzfbPf
    for <oggyprit@gmail.com>; Thu,  6 May 2021 18:23:50 +1000 (AEST)
MIME-Version: 1.0
Date: Thu, 06 May 2021 18:23:50 +1000
From: chess@oggyp.com
To: oggyprit@gmail.com
Subject: Test
User-Agent: Roundcube Webmail
Message-ID: <c97661ea1abffd612189abd9e4239dc1@oggyp.com>
X-Sender: chess@oggyp.com
Return-Receipt-To: chess@oggyp.com
Disposition-Notification-To: chess@oggyp.com
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit

Any help would be great.

 

Thanks, Oscar


 

david64
Master

Hi @OggyP . How did you go with this?

That 193... address is apparently your public ip address. Any chance it changed to coincide with your error? Or might gmail have made a change at their end?

There's a bit more to the relayhost statement.

https://linuxhint.com/configuring_postfix_relayhost/#:~:text=Relay%20host%20is%20defined%20as,know%2....

Relayhost needs a port number but 587 might be the default.

OggyP
Level 2

After adding what that website said it just did not send any emails. But also did not return an error. The only that that I added that seemed to help is the port. The error is now:

Diagnostic-Code: smtp; 530 5.7.0 Authentication required

I was looking up online and people said that you do not need any credentials to use the smtp relay. Is this true? If not what credentials do I use?

Anonymous
Not applicable

Hi @OggyP,

 

Thanks for the additional details. You may raise this directly to our postmaster (postmaster@tpg.com.au), we recommend to use our Post Office to send email. Please include the Customer ID/Username and the affected E-mail also the error messages together with a short description of the issue.

 

Regards,

 

 

After adding what that website said it just did not send any emails. But also did not return an error. The only that that I added that seemed to help is the port. The error is now:

Diagnostic-Code: smtp; 530 5.7.0 Authentication required

I was looking up online and people said that you do not need any credentials to use the smtp relay. Is this true? If not what credentials do I use?