分类 电脑 下的文章

xampp - incorrect file format 'db' - repair table db use_frm

现象:xampp 中的 mysql 服务不能成功启动。日志中有如:Fatal error: Can't open and lock privilege tables: incorrect file format 'db' 的错误。

尝试:

  1. mysqld --skip-grant-tables # 手工启动,且跳过权限表
  2. repair table db use_frm; # 连接到 mysql 命令台,对 mysql 库的 db 表进行修复

如果返回修复成功的提示信息,再关闭 mysql 服务。重新正常启动。

参考:

roundcube 菜单定制 禁用功能

https://local2.anqun.org/mail/?_task=settings&_action=plugin.password

// don't allow these settings to be overridden by the user
$config['dont_override'] = [];

// List of disabled UI elements/actions
$config['disabled_actions'] = [];

https://local2.anqun.org/mail/?_task=settings&_action=plugin.password
https://local2.anqun.org/mail/?_task=addressbook&_source=1

'mail.delete', 'mail.copy', 'mail.move', 'mail.mark', 'mail.send', 'mail.sendmdn', 'mail.import',

./program/js/app.js:1942
['show', 'reply', 'reply-all', 'reply-list', 'move', 'copy', 'delete', 'open', 'mark', 'edit', 'viewsource', 'bounce', 'print', 'load-attachment', 'download-attachment', 'show-headers', 'hide-headers', 'download', 'forward', 'forward-inline', 'forward-attachment', 'change-format']

class="about" innerClass="inner" onclick="UI.about_dialog(this)" />
<roundcube:button command="compose" type="link" class="compose"

config.dark_mode_support: false
https://github.com/roundcube/roundcubemail/blob/master/skins/elastic/meta.json
"dark_mode_support": true,

POST /mail/?_task=mail&_action=expunge HTTP/2.0" 
POST /mail/ HTTP/2.0" 200 651 "https://local2.anqun.org/mail/?_task=settings&_action=add-folder&
'settings.add-folder', 'settings.preferences','settings.identities','settings.responses',

192.168.1.7 - - [15/Jul/2023:16:17:59 +0800] "GET /mail/?_task=mail&_action=getunread&_page=1&_remote=1&_unlock=0&_=1689409079167 HTTP/2.0" 200 99 "https://local2.anqun.org/mail/?_task=mail&_mbox=Trash
?_task=mail&_mbox=Trash"  folder can not be found

mail._mbox=Trash

dovecot
https://forum.vestacp.com/viewtopic.php?t=11948

<!-- folders list -->
<div id="layout-sidebar" class="listbox" role="navigation" aria-labelledby="aria-label-folderlist">
        <div class="header">
                <a class="button icon back-list-button" href="#back"><span class="inner"><roundcube:label name="back" /></span></a>
                <span class="header-title username"><roundcube:object name="username" /></span>
                <roundcube:button name="folderactions" type="link" title="folderactions" label="actions"
                        class="button icon sidebar-menu" innerclass="inner" data-popup="mailboxoptions-menu" />

1. templates/mail.html
2. /templates/includes/mail-menu.html:2:<div id="mailtoolbar" class="toolbar menu" role="toolbar">
./templates/includes/mail-menu.html:28: <roundcube:container name="toolbar" id="mailtoolbar" />
3. vi /opt/www/roundcubemail/config/config.inc.php
// PLUGINS
// $config['plugins'] = array('managesieve', 'password', 'zipdownload');

// List of disabled UI elements/actions
$config['disabled_actions'] = ['settings', 'addressbook','mail.compose', 'mail.delete', 'mail.copy', 'mail.move', 'mail.mark', 'mail.send', 'mail.sendmdn', 'mail.import','mail.reply', 'mail.reply-all', 'mail.reply-list', 'mail.flagged', 'mail.reply', 'mail.reply-all', 'mail.reply-list', 'mail.move', 'mail.copy', 'mail.delete', 'mail.open', 'mail.mark', 'mail.edit', 'mail.viewsource', 'mail.bounce', 'mail.print', 'mail.load-attachment', 'mail.forward', 'mail.forward-inline', 'mail.forward-attachment', 'about', 'mail.expunge', 'mail.purge', 'mail.folders', 'settings.add-folder','settings.folders','settings.preferences','settings.identities','settings.responses','settings.compose','mail.import-messages'];

// automatically create the above listed default folders on user login
$config['create_default_folders'] = false;

// protect the default folders from renames, deletes, and subscription changes
$config['protect_default_folders'] = false;

https://github.com/roundcube/roundcubemail/blob/3b6c06f697eca916d5756795461a8eea4e397cd2/config/defaults.inc.php

roundcube - 收件箱列表为空 - the list is empty - imap - vsz_limit 256 MB

现象:某个邮箱用户登录到 roundcube webmail,收件箱列表是空的。原先的邮件数约有十万封。

实践:查看 dovecot 的 imap.log ,出现类似 (Out of memory (service imap { vsz_limit=256 MB }, you may need to increase it)) 的字样。按网上的例子,在 /etc/dovecot/dovecot.conf 添加如下内容后,重启 dovecot 服务即可。

service imap {
  vsz_limit = 1024MB
}

参考:https://forum.iredmail.org/topic11051-increasing-vszlimit.html

Windows 11 简体企业90天试用版 - Unattend.xml

DHCP分配IP。

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="windowsPE">
        <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <RunSynchronous>
                <RunSynchronousCommand wcm:action="add">
                    <Order>1</Order>
                    <Path>reg add HKLM\System\Setup\LabConfig /v BypassTPMCheck /t reg_dword /d 0x00000001 /f</Path>
                </RunSynchronousCommand>
                <RunSynchronousCommand wcm:action="add">
                    <Order>2</Order>
                    <Path>reg add HKLM\System\Setup\LabConfig /v BypassSecureBootCheck /t reg_dword /d 0x00000001 /f</Path>
                </RunSynchronousCommand>
                <RunSynchronousCommand wcm:action="add">
                    <Order>3</Order>
                    <Path>reg add HKLM\System\Setup\LabConfig /v BypassRAMCheck /t reg_dword /d 0x00000001 /f</Path>
                </RunSynchronousCommand>
                <RunSynchronousCommand wcm:action="add">
                    <Order>4</Order>
                    <Path>reg add HKLM\System\Setup\LabConfig /v BypassCPUCheck /t reg_dword /d 0x00000001 /f</Path>
                </RunSynchronousCommand>
                <RunSynchronousCommand wcm:action="add">
                    <Order>5</Order>
                    <Path>reg add HKLM\System\Setup\LabConfig /v BypassStorageCheck /t reg_dword /d 0x00000001 /f</Path>
                </RunSynchronousCommand>
            </RunSynchronous>
            <UserData>
                <AcceptEula>true</AcceptEula>
            </UserData>
            <DiskConfiguration>
                <WillShowUI>OnError</WillShowUI>
                <Disk wcm:action="add">
                    <CreatePartitions>
                        <CreatePartition wcm:action="add">
                            <Order>1</Order>
                            <Size>100</Size>
                            <Type>Primary</Type>
                        </CreatePartition>
                        <CreatePartition wcm:action="add">
                            <Extend>true</Extend>
                            <Order>2</Order>
                            <Type>Primary</Type>
                        </CreatePartition>
                    </CreatePartitions>
                    <ModifyPartitions>
                        <ModifyPartition wcm:action="add">
                            <Active>true</Active>
                            <Format>NTFS</Format>
                            <Label>System</Label>
                            <Order>1</Order>
                            <PartitionID>1</PartitionID>
                        </ModifyPartition>
                        <ModifyPartition wcm:action="add">
                            <Order>2</Order>
                            <PartitionID>2</PartitionID>
                            <Label>Windows</Label>
                            <Letter>C</Letter>
                            <Format>NTFS</Format>
                        </ModifyPartition>
                    </ModifyPartitions>
                    <DiskID>0</DiskID>
                    <WillWipeDisk>true</WillWipeDisk>
                </Disk>
            </DiskConfiguration>
            <ImageInstall>
                <OSImage>
                    <InstallTo>
                        <DiskID>0</DiskID>
                        <PartitionID>2</PartitionID>
                    </InstallTo>
                    <InstallFrom>
                        <MetaData wcm:action="add">
                            <Key>/IMAGE/INDEX</Key>
                            <Value>1</Value>
                        </MetaData>
                    </InstallFrom>
                    <WillShowUI>OnError</WillShowUI>
                    <InstallToAvailablePartition>false</InstallToAvailablePartition>
                </OSImage>
            </ImageInstall>
        </component>
        <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <SetupUILanguage>
                <UILanguage>en-US</UILanguage>
            </SetupUILanguage>
            <InputLocale>007f:00000804</InputLocale>
            <SystemLocale>zh-CN</SystemLocale>
            <UILanguage>zh-CN</UILanguage>
            <UILanguageFallback>zh-CN</UILanguageFallback>
            <UserLocale>zh-CN</UserLocale>
 </component>
    </settings>
    <settings pass="oobeSystem">
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <UserAccounts>
                <AdministratorPassword>
                    <Value>xin2024</Value>
                </AdministratorPassword>
            </UserAccounts>
            <OOBE>
                <HideEULAPage>true</HideEULAPage>
            <SkipMachineOOBE>true</SkipMachineOOBE>
            <SkipUserOOBE>true</SkipUserOOBE>
            <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
            <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
        <ProtectYourPC>3</ProtectYourPC>
            </OOBE>
        </component>
        <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <InputLocale>007f:00000804</InputLocale>
            <SystemLocale>zh-CN</SystemLocale>
            <UILanguage>zh-CN</UILanguage>
            <UserLocale>zh-CN</UserLocale>
        </component>
    </settings>
    <settings pass="offlineServicing">
    </settings>
<settings pass="specialize">
    <component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
          <fDenyTSConnections>false</fDenyTSConnections>
      </component>
      <component name="Microsoft-Windows-TerminalServices-RDP-WinStationExtensions" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
          <UserAuthentication>0</UserAuthentication>
      </component>
    <component name="Networking-MPSSVC-Svc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <FirewallGroups>
            <FirewallGroup wcm:action="add" wcm:keyValue="RemoteDesktop">
                <Active>true</Active>
                <Group>@FirewallAPI.dll,-28752</Group>
                <Profile>all</Profile>
            </FirewallGroup>
        </FirewallGroups>
    </component>
    <component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <RunSynchronous>           
              <RunSynchronousCommand wcm:action="add">
                  <Description>Enable administrator</Description>
                  <Order>1</Order>
                  <Path>net user administrator /active:yes</Path>
                  <WillReboot>OnRequest</WillReboot>
               </RunSynchronousCommand>
        </RunSynchronous>
    </component>
</settings>
    <cpi:offlineImage cpi:source="catalog:c:/distr/7601.17514.101119-1850_x64fre_server_eval_en-us-grmsxeval_en_dvd/sources/install_windows server 2008 r2 serverstandard.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>