View Issue Details

IDProjectCategoryView StatusLast Update
0020532mantisbtemailpublic2016-05-04 17:55
Reporterrbrinkma Assigned Todregad  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionunable to reproduce 
Product Version1.2.17 
Summary0020532: Mail cron job will stop on an unknown mail adress on Exchange Server
Description

We use cron job to send out mails on a 5 minute interval schedule and mails are send to an Exchange server.

It appeared that two (expired) email accounts were removed on the Exchange Server that still were in Mantis configured as administrator. Cron Mail job got stuck because the Exchange Server sends back an <SMPT Error user unknown> which resulted in a stall of the email cron job.

Mantis should skip unknown mail adresses on Exchange Server to continue Cron Job

Steps To Reproduce
  • Mantis account configured as administrator with mail adress but that mail adress does not exist on Exchange Server.
  • A new user invokes auto signup proces to obtain a reporter access level
  • This triggers mail notification to the administrators about autosignup
  • In our case the mail cron job stopped due to the fact that two administrator mail adresses) cannot be matched by the Exchange Server (See log example).
  • Mails will be cued in the mantis_email_table due to a constantly failing cron job.
Additional Information

AUTOSIGNUP MAIL
2016-01-12 09:57 CET mail Signup Email = <NEW USER MAIL>, Hash = 27916b73ab79423c6bf8d009a65a31ed, User = @U864

ERROR LOG

2016-01-17 23:16 CET mail Server not responding for 5 seconds, aborting
2016-01-17 23:21 CET mail Processing e-mail queue (977 messages)
2016-01-17 23:21 CET mail Sending message #24803 queued on 2016-01-12 09:57 CET
2016-01-17 23:21 CET mail ERROR: Message could not be sent - SMTP Error: The following recipients failed: <MAIL ADRESS>

SMTP server error: 5.1.1 User unknown

2016-01-17 23:21 CET mail Server not responding for 5 seconds, aborting
2016-01-17 23:26 CET mail Processing e-mail queue (977 messages)
2016-01-17 23:26 CET mail Sending message #24803 queued on 2016-01-12 09:57 CET
2016-01-17 23:26 CET mail ERROR: Message could not be sent - SMTP Error: The following recipients failed: <MAIL ADRESS>

SMTP server error: 5.1.1 User unknown

TagsNo tags attached.

Relationships

related to 0016070 closedvboctor Delay due to Mantis trying sending emails to non existent address 

Activities

dregad

dregad

2016-01-21 11:39

developer   ~0052348

Fixing this would probably require patching email API.

That being said, it is also your responsibility to monitor the send queue and take necessary corrective action when you see it grow indefitely.

Currently, email_send() only returns a true/false status and logs any errors to the logs.

Assuming that PHPMailer returns some significant, standard error code (or throws a specific exception), we could improve the error handling to deal with this situation. However, what I don't want to do is make server-specific changes.

Since I don't have an exchange configuration to test, it would be helpful if you could provide a var_dump() of the phpmailerException $e in the catch() block around line 1077 in this situation.

rbrinkma

rbrinkma

2016-01-28 06:58

reporter   ~0052416

Unfortunately we could not reproduce this issues, because of some unknown configuration change on de Exchange Server last week. We are in the proces of finding out what change was made.
To be continued.

dregad

dregad

2016-01-28 07:26

developer   ~0052418

OK, let us know.

atrol

atrol

2016-04-24 06:17

developer   ~0053012

rbrinkma,

You did not provide any feedback; I am therefore resolving this issue as "unable to reproduce".

Feel free to reopen the issue at a later time and provide instructions to reproduce the issue .