mantis BT sends email to invalid email address

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
Wesley
Posts: 9
Joined: 15 Dec 2017, 03:59

mantis BT sends email to invalid email address

Post by Wesley »

Signature:
==================
CentOS 7.4 (hostname : mantisbt.company.com)
PHP 7.1.13
Maintis BT 2.8.0
MariaDB 5.5.56.x
==================

What is the issue?
======================

Email notification and email queue functionality were configured properly and they work just fine. Recently, we updated the email of a "manager" user on mantis BT from john@company.com to jack@company.com.

checked the 'Manage users" page inside mantis BT as well as the backend MySQL database's "mantis_user_table". Confirmed that the emails were both updated correctly to jack@company.com

The new jack@company.com email starts to receive the email notifications as expected.

yet, when checking the mantis log file on the host, it seems that Mantis BT still keeps sending email to the old email john@company.com, which was already removed. As expected, the bounced emails were also sent back to the system "root" mail inbox on the host, mantisbt.company.com. See below

Code: Select all

From root@mantisbt.company.com  Fri Apr 27 23:14:04 2018
Return-Path: <root@mantisbt.company.com>
X-Original-To: root
Delivered-To: root@mantisbt.company.com
From: "(Cron Daemon)" <root@mantisbt.company.com>
To: root@mantisbt.company.com
Subject: Cron <root@mantisbt>  php /var/www/html/mantisbt/scripts/send_emails.php
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
Precedence: bulk
X-Cron-Env: <XDG_SESSION_ID=196>
X-Cron-Env: <XDG_RUNTIME_DIR=/run/user/0>
X-Cron-Env: <LANG=en_US.UTF-8>
X-Cron-Env: <SHELL=/bin/bash>
X-Cron-Env: <PATH=/sbin:/bin:/usr/sbin:/usr/bin>
X-Cron-Env: <MAILTO=root>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <LOGNAME=root>
X-Cron-Env: <USER=root>
Date: Fri, 27 Apr 2018 23:14:04 -0400 (EDT)
Status: R

Sending emails...
2018-04-27 23:14 EDT MAIL email_api.php:1406 email_send() ERROR: Message could not be sent - SMTP Error: The following recipients failed: john@company.com: <john@company.com>: Recipient address rejected: User unknown in virtual mailbox table

2018-04-27 23:14 EDT MAIL email_api.php:1406 email_send() ERROR: Message could not be sent - SMTP Error: The following recipients failed: john@company.com: <john@company.com>: Recipient address rejected: User unknown in virtual mailbox table

...
This is a little annoying since it repeated every 2 min because of the email queue configuration on mantis BT.

Look for soluitons
================================

Any hints why Mantis BT still keep sending the email notification to the old but removed email address? Thanks in advance.
Wesley
Posts: 9
Joined: 15 Dec 2017, 03:59

Re: mantis BT sends email to invalid email address

Post by Wesley »

Read through all the posts in the forums that might relate to this issue. No luck so far.

Also, dug into the .php files (email.api.php) and went through the email_collect_recipients() function, so far still no luck. maybe i missed something there?

help please!
Wesley
Posts: 9
Joined: 15 Dec 2017, 03:59

Re: mantis BT sends email to invalid email address

Post by Wesley »

update:
==================

After to going through the history, it turned out that this issue was to due to an email record in the table "mantis_email_table" in the backend MySQL database, which was intended for "John@company.com".

Delete this record from this table, and the issue disappeared.
atrol
Site Admin
Posts: 8375
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: mantis BT sends email to invalid email address

Post by atrol »

Thanks for telling the solution.

Starting from version 2.13.0 there is some kind of automatic cleanup for this.
https://www.mantisbt.org/bugs/view.php?id=16070

Option $g_email_retry_in_days can be used to configure the duration in days to retry failed emails before deleting them from queue. Default 7 days.
https://www.mantisbt.org/docs/master/en ... nfig.email
Please use Search before posting and read the Manual
Post Reply