內容簡介
🕸️ 由 WebFacing™ 開發。讀取、發送、顯示、管理、列出、創建、添加、刪除電子郵件帳戶、舊消息、轉發器和自動回復器。
一鍵讀取、發送和管理所有電子郵件,免去登錄步驟。更新通知接收者。備份並下載您的完整 cPanel® 帳戶。
此外掛需要您的主機配置 cPanel®設備。
它使用預設的 shell 存取或 HTTP 存取其 UAPI。使用 HTTP 首先需要在 cPanel® 原生界面產生一個臨時存取權杖。
可翻譯。現有的翻譯包括
挪威(博克馬爾)
當前功能
新增:短碼 [wf_cpanel_email_webmail] 或 [wf_cpanel_email_webmail]我的電子郵件[/wf_cpanel_email_webmail],供前端使用者使用自己的 Webmail
新增:API 權杖管理
新增:無需在 PHP 中啟用 shell_exec 功能,請參閱下面
將帳戶備份至檔案,並下載
通過提取到文件夾中還原帳戶備份檔案(實驗性功能)
透過 cPanel® 管理的各個網域帳戶清單
完全自動化地遷移至新的電子郵件伺服器,如為使用者設置新帳戶,發送設置說明、密碼和最常用電子郵件客戶端的設置指南的連結
添加/刪除單一/多個電子郵件帳戶
列出每個帳戶的郵箱及其所包含的訊息數
從郵箱中刪除舊消息(超過52週的),目前為止
收縮郵箱(清空)
更改電子郵件帳戶的存儲配額
添加/刪除單一/多個電子郵件轉發器或黑洞
添加/刪除/編輯電子郵件自動回復器(發送對象、主旨、內容、寄件人、啟動、終止、間隔)
向指定地址發送單個 cPanel® 電子郵件帳戶說明(客戶端設置)
向自己發送多個 cPanel® 電子郵件帳戶說明(客戶端設置),以便進一步分發
為所選帳戶打開您的 cPanel® Webmail 應用程式(單點擊 / 點按-無需進一步登錄!)
設置/更改電子郵件帳戶密碼
將默認電子郵件地址(捕捉所有)設為轉發器、失敗或黑洞
檢查目標站點(任何電子郵件地址,如從此伺服器傳送)的自動偵測和實際電子郵件路由的站點狀態選項卡
若給予 cpanel 能力,任何使用者都可以存取其自己的郵件,
當主域名是子域名時,支援子域名電子郵件地址
為其他使用者容許管理電子郵件地址,單站點或多站點,可以使用下列其中一種:
add_filter( 'wf_cpanel_email_capability', static fn( string $cap ) => $my_cpanel_email_cap );
add_filter( 'wf_cpanel_email_capability', static fn( string $cap ) => 'edit_published_pages' );
限制電子郵件地址僅限於目前站點域名的選項,即使是單站點管理員也是如此,可以使用下列其中一種:
const WF_CPANEL_EMAIL_SITE_DOMAIN_ONLY = true;
define( 'WF_CPANEL_EMAIL_SITE_DOMAIN_ONLY', true );
add_filter( 'wf_cpanel_email_site_domain_only', '__return_true' );
add_filter( 'wf_cpanel_email_site_domain_only', fn() => true );
多站點網路:其中一種選項,即不限制電子郵件地址僅限於目前子站點域名,適用於非網路(超級)管理員的站點管理員:
const WF_CPANEL_EMAIL_SIT
外掛標籤
開發者團隊
② 後台搜尋「WebFacing™ – Email Accounts management for cPanel®」→ 直接安裝(推薦)
原文外掛簡介
🕸️ By WebFacing™. Read, send, show, manage, list, create, add, remove or delete email accounts, old messages, forwarders and autoresponders.
One click read, send and manage all your emails without a login step. Update notification recipients. Backup and download your complete cPanel® account.
This plugin requires your site is hosted on a cPanel® equipped server.
It uses it’s UAPI through shell access by default, or via HTTP API. Using without shell_exec initially requires a temporary access token generated in the cPanel® native interface.
Translation ready. Ready translations are
Norwegian (bokmål)
Current features
NEW: Dashboard widget with three live graphic server memory usage and server load gauge charts (can eassily be minimized or hidden via Screen Options or programatically)
WP Block for frontend access user’s own Webmail
Bulk entry of forwarders and email accounts (as free trial only, very limited use)
Screen Options to select visible forms on New Email screen, saved for as user option (and per site for Multisite)
Shortcode [wf_cpanel_email_webmail] or as [wf_cpanel_email_webmail]My Email[/wf_cpanel_email_webmail] for frontend access user’s own Webmail
cPanel® API Tokens Management – needed in case shell_exec is not available or when accessing a remote server
Backup complete cPanel® hosting account to file, and download it
Restore account backup files by extracting it to a folder (experimental)
Semi automated migration to new email server, including setup of new accounts for users, with sending setup instructions, passwords and links to setup guides for most common email clients
Add 10 single Email Accounts per week (without Pro nag) — actually unlimited
Remove single/multiple Email Accounts
List mailboxes with number of messages for each box
Remove old messages from mailboxes (older than 52 weeks as default)
Shrink a mailbox (empty it)
Change storage quota for for email accounts
Add 20 forwarders per week (without Pro nag) — actually unlimited
Add/remove single/multiple Email Failure addresses or Blackhole addresses
Add/delete/edit email autoresponders (for, subject, body, from, start, stop, interval)
Send single cPanel® Email Account Instruction (Client Setup) to specfied address
Send multipe cPanel® Email Account Instructions (Client Setups) to yourself for distribution
Open your cPanel® Webmail app for selected account (single click/tap – no further login needed!)
Set/change Email Account passwords
Set Default Email Address (catch-all) as forwarder, failure or blackhole
View/change Notification/Contact Email Addresses
Access for any user to view and read their own emails, if given the cpanel capability (Use custom code or a Roles/Capabilities Manager plugin)
Support for subdomain email addresses when the main domain is a subdomain (only)
In case the shell_exec function is disabled in your server PHP configuration, create a token in native cPanel® interface and add one of these lines to your wp-config.php file, functions.php in your child theme, in Must-use plugin or a custom regular plugin
const WF_CPANEL_API_TOKEN = 'my-temp-api-token';
define( 'WF_CPANEL_API_TOKEN', 'my-temp-api-token' );
See Manage API Tokens in cPanel®
The WF_CPANEL_API_TOKEN constant may be removed when a new token is created and activated from the plugin admin page
Option to set the default visibility for users on New Email screen (users may still set their own preferences):
add_filter( 'wf-cpanel-email-new-email_user-option', static function( bool $default, string $option, int $user_id ) {
if ( $option === 'wc-show-new-blackhole' /*or by $user_id*/ ) {
$default = true/*false*/;
}
return $default;
}, 10, 3 );
Option to allow other users than those with manage_options capability to manage email adresses, single- or multisite, one of the following:
add_filter( 'wf_cpanel_email_capability', static fn( string $cap ): string => $my_cpanel_email_cap );
add_filter( 'wf_cpanel_email_capability', static fn( string $cap ) => 'edit_published_pages' );
Option to allow other users than those with manage_options capability to see the dashboard widget, or remove it, one of the following:
add_filter( 'wf_cpanel_email_widget_capability', static fn( string $cap ): string => $my_cpanel_widget_cap );
add_filter( 'wf_cpanel_email_widget_capability', static fn( string $cap ) => 'edit_published_pages' );
add_filter( 'wf_cpanel_email_widget_capability', static fn( string $cap ) => 'do_not_allow' );
Option to alter the refresh interval in seconds for the dashboard widget, one of the following:
add_filter( 'wf_cpanel_email_widget_interval', static fn( int $interval ): int => $my_cpanel_widget_interval );
add_filter( 'wf_cpanel_email_widget_interval', static fn( int $interval ) => 45 );
Option to limit email addresses to current site domain, even for single site admins, one of the following
const WF_CPANEL_EMAIL_SITE_DOMAIN_ONLY = true;
define( 'WF_CPANEL_EMAIL_SITE_DOMAIN_ONLY', true );
add_filter( 'wf_cpanel_email_site_domain_only', '__return_true' );
add_filter( 'wf_cpanel_email_site_domain_only', fn() => true );
Multisite Network: Option not to limit email addresses to current subsite domain, for site admins that are not network (super) admins, one of the following:
const WF_CPANEL_EMAIL_SITE_DOMAIN_ONLY = false;
define( 'WF_CPANEL_EMAIL_SITE_DOMAIN_ONLY', false );
add_filter( 'wf_cpanel_email_site_domain_only', '__return_false' );
add_filter( 'wf_cpanel_email_site_domain_only', fn() => false );
Many optional parameters and API filters for the shortcode output, see includes/ShortCode.php until further tested and documented
If you want to access another user on the server, use one of the following
const WF_CPANEL_USER = 'my-username';
define( 'WF_CPANEL_USER', 'my-username' );
If you want to access a remote server, use one of the following
const WF_CPANEL_HOST = 'my-host';
define( 'WF_CPANEL_HOST', 'my-host' );
using WF_CPANEL_HOSTrequires WF_CPANEL_USER to also be defined
Automaticallly create new accounts when a new user is registered?
add_action( ‘user_register’, static function( int $user_id, array $userdata ): void {
// What to do just after the registraton here, like this (adds an email address that forwards to all users, a mailing list):
if ( method_exists( ‘WebFacing\cPanel\UAPI’, ‘add_forwarder’ ) ) {
\WebFacing\cPanel\UAPI::add_forwarder( ‘[email protected], ‘$userdata[‘user_email’] );
}
}, 2 );
Site Health
Tests and information
Check auto detecting and current email routing in an extra Site Health tab (to any email address sent from your server)
Possible future features
Scheduled automatic removal of old messages in/from mailboxes
Import migration list for create account, send instructions and password to current address
Delete selected email messages from mailboxes (by selectd message age etc.)
Suspend/unsuspend incoming/outgoing for email accounts (if requested)
Suspend/unsuspend login to email accounts (if requested)
Domain level email forwarding
Domain Managament
DNS Zone editing
Limitations, security, privacy – be warned
Maximum New Forwarders = 20, Maximum New Accounts = 5, weekly reset
Trial: Maximum New Forwarders as bulk entry = 4, Maximum New Accounts as bulk entry = 2
Now works without shell access! Will not work at all if shell_exec is disabled in php.ini
Works only for admins, or other users with a custom cpanel capability and email on site domain (so far)
Any admin (if multisite, only network admins), or user with the filtered capability, on a site, can fully access any account on the cPanel® server instance
No AYS warnings for delete actions
If several sites/admins share the same cPanel® account, without being part of a WP Multisite network, no bulletproof separation, because of the way the cPanel® UAPI CLI works, with or without this plugin
Pro Addon
Pro Addon plugin was released May 1, 2023 at https://webfacing.eu/plugin/wf-cpanel-email-accounts-pro/ and will unlock in bulk entry new forwarders and new accounts to the numbers in the purchesed license
