SOLVED Incomplete mail account deletion

tc17

Registered
Nov 30, 2003
2
0
151
I created an email account, xxx, for my domain as a temporary measure; when I was finished with this account, I deleted it. My expectation was that mail would revert to its behaviour prior to creating the account, that is, any mail addressed to the account would be delivered to the default account. That is not the case. Instead, any delivery attempt to that (now deleted) address gives an error message back to the sender:
-------
This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

xxx
LMTP error after RCPT TO:<xxx>:
550 5.1.1 <xxx> User doesn't exist:
xxx
-----

So, I tried adding a forwarder (for xxx) to a different account. The mail DOES get forwarded BUT the error message still gets delivered back to the sender.

I'm on cpanel 74.0.10

Is this not a bug and is there a fix/workaround?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,226
463
So, I tried adding a forwarder (for xxx) to a different account. The mail DOES get forwarded BUT the error message still gets delivered back to the sender.
Hello @tc17,

You can use cPanel >> Default Address to configure the default delivery behavior for emails sent to email addresses that do not exist. However, even if that option is configured to discard or reject the emails sent to non-existent addresses, creating a forwarder would ensure the delivery was accepted.

The information you provided suggests there's a filter in place that's removing the email. Do you have any custom file rules setup in cPanel >> Email Filters or cPanel >> Global Email Filters that could be rejecting the emails? If not, review /var/log/exim_mainlog to see the full log output for one of the affected emails. EX:

Code:
exigrep [email protected] /var/log/exim_mainlog
Thank you.
 

tc17

Registered
Nov 30, 2003
2
0
151
Do you have any custom file rules setup in cPanel >> Email Filters or cPanel >> Global Email Filters that could be rejecting the emails?

If not, review /var/log/exim_mainlog to see the full log output for one of the affected emails. EX:

Thank you.
No filters. I'm on a shared system so examining the logs is a pretty much a no-go.

So, I wandered through my directories and found a few places where cruft was left behind
after my deletion. There was stuff at:
~/etc/<my domain>/@pwcache/xxx
~/mail/<my domain>/xxx

I blew all this junk away and proper behaviour has been restored

Thanks for your help
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,226
463
Hello @tc17,

I'm glad to see you were able to solve the issue. Thank you for sharing the outcome.
 

vikins

Well-Known Member
Oct 3, 2006
120
1
168
This is still a problem as of today. Things are getting left behind and LMTP is still trying to deliver to deleted email accounts.