SOLVED Suspend Sending Outgoing Email

nunop

Member
Jan 27, 2012
9
1
53
cPanel Access Level
Root Administrator
Hello,

I'm looking into suspending "Sending Outgoing Email" of a few email addresses, to ensure whoever sets up those email addresses in Outlook/Thunderbird will use AWS SES as the SMTP server.

However, I'd just like to know what exactly happens in the background when I select "Suspend".

What configurations are changed?
Are any DNS entries affected?

Thank you.
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Hello @nunop,

1. Here's a quote from our Email Accounts document explaining how this feature works:

Restrictions
Use this feature to allow or suspend a user's ability to log in, receive mail, or send mail. You can also hold outgoing mail.

Select Allow, Suspend, or Hold for the applicable setting.

Notes:
  • When you suspend an email account, the system also suspends any aliases or forwarders that redirect email to the account.
  • When you select Suspend for the Sending Outgoing Email option, the server will reject any outgoing messages for the account.
  • When you select Hold for the Sending Outgoing Email option, the system will retain all outgoing messages in a queue.
  • When you change the Sending Outgoing Email option from Hold to Allow, the server will deliver all queued messages.
Additionally, here's the link to the corresponding UAPI function if you'd like to do this via a script or via the command line:

UAPI Functions - Email::suspend_outgoing - Developer Documentation - cPanel Documentation

2. On the backend, a custom Exim ACL is configured to block outgoing emails if the email account is suspended (it checks the /etc/outgoing_mail_suspended_users file). You can view the full ACL with the following command:

Code:
# cat /usr/local/cpanel/etc/exim/acls/ACL_RECIPIENT_BLOCK/default_recipient
Here's the specific part of the above ACL that blocks outgoing emails:

Code:
  # implemented for "suspend outgoing email" feature for domains and individual webmail/pop accounts
  deny
    domains = ! +local_domains
    condition = ${perl{check_outgoing_mail_suspended}}
    message = ${perl{get_outgoing_mail_suspended_message}}
    log_message = ${perl{get_outgoing_mail_suspended_message}}
Let me know if this helps.

Thank you.
 
  • Like
Reactions: nunop