Linux配置sendmail

配置参考: https://zhuanlan.zhihu.com/p/109084397

问题排查: https://blog.csdn.net/c__chao/article/details/95314428

修改端口:

vi /etc/mail/sendmail.cf

定位

#O DaemonPortOptions=Port=s,Name=MTA

修改为

O DaemonPortOptions=Port=smtp,Name=MTA  O DaemonPortOptions=Port=587,Name=MTA

重启服务: systemctl restart sendmail

服务器封25端口:https://help.aliyun.com/document_detail/56130.html

Nextcloud配置电子邮件服务器

环境:Nextcloud Hub 4 (26.0.3) , outlook,  gmail

创建应用密码:

gmail

outlook

在nextcloud右上角点击–》管理设置–》管理–》基本设置,找到“电子邮件服务器“。填入outlook smtp相应的设置:

加密:无   ( 自动会启用STARTTLS)

服务器地址:smtp-mail.outlook.com  端口:587

证书:邮件名   应用密码

测试不成功

启动nextcloud日志 : php occ log:manage –level debug  ,  查看日志: php occ log:file, tail -f /var/www/server/data/nextcloud.log , 发现outlook不支持基础登录方式,只能使用xoauth2,被outlook恶心到了,弃用。

 

填入gmail smtp相应的设置:

加密:无   ( 自动会启用STARTTLS)

服务器地址:smtp.gmail.com  端口:587

测试通过!

 

NextJS应用访问问题

环境:NextJS, Redis, Nginx

后台日志出现: header with value `***` does not match `origin` header with value `localhost:3000` from a forwarded Server Actions request. Aborting the action.

方法一:在next.config.js文件添加下面内容

/** @type {import(‘next’).NextConfig} */
const nextConfig = {
experimental: {
serverActions: {
allowedOrigins: [“website.com”, “localhost:3000”]
}
}
}

module.exports = nextConfig

 

方法二:在nginx的配置文件default添加

proxy_pass http://127.0.0.1:3000/;
proxy_set_header x-forwarded-host <domain_name>;

 

Windows远程桌面

Windows+R运行mstsc启动远程桌面,连接windows server 2012虚拟机

CredSSP加密数据修正问题解决方案:

在远程桌面中取消勾选“仅允许运行使用网络级别身份验证的远程桌面的计算机连接”

 

上传主机文件到虚拟机:

“本地资源” –》 “详细信息” –》“驱动器” –》选择D盘,这样就把主机上的D盘分享到虚拟机上,直接在远程桌面打开共享磁盘。

MacOS手动删除iPhone的备份

iPhone连接MacOS电脑后打开iTunes时默认下会自动备份,除非在iTunes上点击手机图标并取消自动备份选项。由于中途取消备份,在iTunes上无法找到备份的地址,后续只能通过Terminal手工清除备份。

首先给Terminal授权:

In macOS 13 Ventura: Apple Menu › System Settings › Privacy & Security › Full Disk Access.

In previous verisons of macOS: Apple Menu › System Preferences › Security & Privacy › Privacy › Full Disk Access.

cd “/Users/huangqiang/Library/Application Support/MobileSync/Backup”

找到相应目录清除即可

MacOS LibreOffice 文件被锁无法编辑

打开终端: Finder > Applications > Utilities > Terminal

输入命令:defaults write com.apple.finder AppleShowAllFiles YES

按住 ‘alt’ 键,右击Finder按钮点击Relaunch, 在finder找到隐藏文件 .~lock.运行项目.ods#

隐藏文件输入命令: defaults write com.apple.finder AppleShowAllFiles NO
按住 ‘alt’ 键,右击Finder按钮点击Relaunch