local sending (PMG to internal) fails with "mail transport unavailable"

IEM

Member
Sep 4, 2018
53
6
8
43
Austria
i'm running PMG-6.1-3, with before queue spam-filtering enabled.

since some time (probably about the same time as i enabled before queue, but i don't really remember), it seems that the mailgateway is unable to send administrative emails any more.

PMG is mailgate.example.com, and it's delivering to example.com.

For example, the nightly reminders about packages pending an upgrade don't get through any more.
instead i get an error-mail with content like:
Code:
Subject: Delayed Mail (still being retried)

This is the mail system at host mailgate.example.com

####################################################################
# THIS IS A WARNING ONLY.  YOU DO NOT NEED TO RESEND YOUR MESSAGE. #
####################################################################

Your message could not be delivered for more than 4 hour(s).
It will be retried until it is 5 day(s) old.

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

Reporting-MTA: dns; mailgate.example.com
X-Proxmox-Queue-ID: EBB0423979
X-Proxmox-Sender: rfc822; root@mailgate.example.com
Arrival-Date: Wed, 15 Jan 2020 12:04:59 +0100 (CET)

Final-Recipient: rfc822; root@mailgate.example.com
Original-Recipient: rfc822;root@mailgate.example.com
Action: delayed
Status: 4.3.0
Diagnostic-Code: X-Proxmox; mail transport unavailable
Will-Retry-Until: Mon, 20 Jan 2020 12:04:59 +0100 (CET)


Return-Path: <root@mailgate.example.com>
Received: by mailgate.example.com (Proxmox, from userid 0)
        id EBB0423979; Wed, 15 Jan 2020 12:04:59 +0100 (CET)
Auto-Submitted: auto-generated
Subject: =?utf-8?q?apt-listchanges=3A_news_for_mailgate?=
To: root@mailgate.example.com
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Message-Id: <20200115110459.EBB0423979@mailgate.example.com>
Date: Wed, 15 Jan 2020 12:04:59 +0100 (CET)
From: root <root@mailgate.example.com>
Eventually, no more delivery attempts are done, and I get a Undelivered Mail Returned to Sender mail.


I tried to locally send an email (being logged in as admin) with:

Code:
echo "just a test mail" | mail -s "test $(date)" "someuser@example.com"
This doesn't get delivered, and instead I get the following message in the logs:

Code:
Jan 15 16:48:02 mailgate postfix/pickup[17180]: 3AA52238EA: uid=1000 from=<admin>
Jan 15 16:48:02 mailgate postfix/cleanup[18241]: 3AA52238EA: message-id=<20200115154802.3AA52238EA@mailgate.example.com>
Jan 15 16:48:02 mailgate postfix/qmgr[1499]: 3AA52238EA: from=<admin@mailgate.example.com>, size=455, nrcpt=1 (queue active)
Jan 15 16:48:02 mailgate postfix/error[18285]: 3AA52238EA: to=<someuser@example.com>, relay=none, delay=0.03, delays=0.01/0.01/0/0.01, dsn=4.3.0, status=deferred (mail transport unavailable)
Jan 15 16:48:02 mailgate postfix/bounce[18287]: 3AA52238EA: sender delivery status notification: 4878E238EF
apart from that, the mail delivery works without a problem. (emails from the outside world are spam-filtered and proxied; emails from the inside world are sent).

if i run a fake session, connecting to either localhost:25 or localhost:26, delivery works as well (mails are delivered):


Bash:
$ nc localhost 25
220 mailgate.example.com ESMTP bla bla bla
HELO mailgate.example.com
250 mailgate.example.com
MAIL FROM: <admin@mailgate.example.com>
250 2.1.0 Ok
RCPT TO: <someuser@example.com>
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
From: <admin@mailgate.example.com>
To: <someuser@example.com>
Message-Id <asdfasdf@blablabla1>
Subject: hello25.2
dasjklflasdjf sdlkjfsdlk jasdklfjsdl
.
250 2.5.0 OK (238E25E1F32EB2F2CF)
QUIT
$
 

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
2,661
290
83
* could you share the logs for those mails which get deferred?
* Do the logs all look like in the testmessage you sent?
* Are there any other log-lines written during the time you try to send the testmail?
(check with journalctl -f)

Thanks!
 

IEM

Member
Sep 4, 2018
53
6
8
43
Austria
aha, here's a hint (transport private/scan: Connection refused)

Code:
Jan 27 13:45:13 mailgate postfix/qmgr[1499]: A3863205CE: from=<root@mailgate.example.com>, size=772, nrcpt=1 (queue active)
Jan 27 13:45:13 mailgate postfix/qmgr[1499]: warning: connect to transport private/scan: Connection refused
Jan 27 13:45:13 mailgate postfix/error[8673]: A3863205CE: to=<admin@example.com>, relay=none, delay=289232, delays=289232/0.01/0/0.01, dsn=4.3.0, status=deferred (mail transport unavailable)
 
  • Like
Reactions: Stoiko Ivanov

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
2,661
290
83
Could reproduce the issue - with the complete log - it became clear where the problem originated.
I sent an initial patch for discussion to the mailing-list:
https://pve.proxmox.com/pipermail/pmg-devel/2020-January/000921.html

This - or an improved version will eventually be available on our repositories (I'll write here when the patched version is available on the pmgtest repo)

Thanks for reporting this!
 

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
2,661
290
83
Patch got applied - It should arrive in the pmgtest repository soon
 

IEM

Member
Sep 4, 2018
53
6
8
43
Austria
cool.
in the meantime i've patched my local postfix template (as i have overridden it to get before-queue working, i figured an update in the repository wouldn't help me much anyhow :)), and it seems i can get posts
 

ladylinux

New Member
Jul 5, 2019
11
1
3
59
Hello,

I am seeing this also.

I updated a bunch of stuff this morning but I don't see any change to the template /var/lib/pmg/templates/main.cf.in

I am bit loathe to just patch my main.cf.in myself unless there is an official patch I can download.

Any idea what package would have this update so I can watch for it ??

Thanks!!!

LadyLinux
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE and Proxmox Mail Gateway. We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!