The RT System itself - Sending the previous mail has failed. Please contact your admin, they can find more details in the logs

Hey Guys,

We are having this issue while we are tying to reply to a ticket in RT. That email is gibrish and non existent. How can we avoid sending email to that address each time we reply to a ticket?

[29426] [Thu May 17 12:07:59 2018] [info]: rt-4.4.2-29426-1526558879-1917.26275-24-0@ITG-Helpdesk #26275/721852 - Scrip 24 (/opt/rt4/sbin/…/lib/RT/Action/SendEmail.pm:285)
[29426] [Thu May 17 12:07:59 2018] [critical]: rt-4.4.2-29426-1526558879-1917.26275-24-0@ITG-Helpdesk: Could not send mail. (/opt/rt4/sbin/…/lib/RT/Interface/Email.pm:993)

Best regards,

Abir Ahmed

Is that email associated with a user in your database, or is this address something you have set up in your local SiteConfig.pm?

Are you attaching any attachments?

RT will fail to send large-ish emails (dependant on the RT_SiteConfig setting Set($MaxAttachmentSize, xxxxxx).

The gibberish might be due to TruncateLongAttachments set true?

Thanks for your replies guys.

GreenJimll - We recently upgraded RT. We haven’t touched the RT_Config.pm file. Could you point us to the config line that reflects these kind of Email CC’s?

Brett - We don’t have any attachment with that ticket nor are we trying to send one. We do see a limit of 10MB set in RT_Config.pm file. But we are not sending any attachments.

Eagerly waiting for your reply.

Best regards

Ah, so did the emailing work OK before you upgraded RT? Would version did you have (I assume you’re on 4.4.2 now?). Also what is in scrip #24? Is that a locally created scrip?

I did wonder if your RT_SiteConfig.pm had a setting such as $DashboardAddress, $SendmailArguments, $RTAddressRegexp or $ParseNewMessageForTicketCcs that could affect how emails are being sent from the system.

Hey Jimll,

Yes we upgraded to 4.4.2. Script #24 seems like a locally created script.

Screenshot: Screenshot by Lightshot

Here’s the content of siteconfig.pm.

Set($Correspondaddress , ‘help@rt.somehost.com’);
Set($CommentAddress , ‘help@rt.somehost.com’);
Set($MailCommand , ‘sendmail’);
Set($SendmailArguments , “–bm --”);
Set($SendmailPath , “/opt/rt4/bin/msmtp_wrapper”);
Set($MessageBoxWrap, “SOFT”);
Set($EmailSubjectTagRegex, qr/(?:rt.somehost.com|itg)/i );
Set($LogToFile , ‘debug’);
Set($MessageBoxRichText, 1);
Set($MessageBoxIncludeSignatureOnComment, 0);
Set($PreferRichText, 1);
Set($MaxInlineBody, 0);
Set($Active_MakeClicky, ‘httpurl_overwrite’);
Set($UseFriendlyToLine, 1);
Set(@ReferrerWhitelist, qw());
Set($WebPort, 443);

Best regards,

Thanks :slight_smile:

Hi Abir

judging by your screenshot, the address would be part of Requestors or Ccs or something inside your “Correspondence” template. I presume if you disable the scrip the problem goes away?

regards
Garry

OK, that looks like a version of the standard scrip #5 only sending plain text rather than HTML and only applying to “Calls” rather than globally. Nothing particularly exciting (could do with a name though so you can at least have an idea what its supposed to be doing there).

Looking in the code at the two places that those log entries are generated, the rt-4.4.2-29426-1526558879-1917.26275-24-0@ITG-Helpdesk is the message ID from the header, rather than the email address. You might have to look in your mail transfer agent logs to see what actual email address was being used and maybe what the error was that caused the email to fail, as this is just RT telling you that the mail system couldn’t send a mail to someone. You could also look in the ticket to see what email addresses are associated with the requestors and/or CCs. One of those is probably duff for some reason, especially if your RT system is generating other email output OK (ie: the setup of RT to talk to the mail server itself is OK).