【mail错误】RunAsUser for MSP ignored 错误
来源:互联网 发布:淘宝生意怎么做大做强 编辑:程序博客网 时间:2024/05/17 23:09
用本文说的修改sendmail组权限的方法搞定了,不用stop和start sendmail
转自:http://www.cnblogs.com/yonge/articles/2300002.html
sendmail 不知道啥时候又不工作了,上次是 unknown user smmsp ,这回是 RunAsUser for MSP ignored :
WARNING: RunAsUser for MSP ignored, check group ids (egid=502, want=51)
can not chdir(/var/spool/clientmqueue/): Permission denied
Program mode requires special privileges, e.g., root or TrustedUser.
据说是因为 sendmail 有时候会在对用户/组名进行对应的时候出错,所以需要把 /etc/mail/submit.cf 里面缺省的配置行
O RunAsUser=smmsp
改成直接使用 smmsp 对应的用户/组 ID的形式:
O RunAsUser=51:51
照方抓药,结果是错误依旧。看来这个问题应该是老版本 sendmail 的问题 ... OrZ
Google 来 Google 去,终于找到个新鲜的说法:
It would be worth a careful examination of ${SOURCE}/sendmail/SECURITY,
especially the recommended perms :
--- begin quote ---
-r-xr-sr-x root smmsp ... /PATH/TO/sendmail
drwxrwx--- smmsp smmsp ... /var/spool/clientmqueue
drwx------ root wheel ... /var/spool/mqueue
-r--r--r-- root wheel ... /etc/mail/sendmail.cf
-r--r--r-- root wheel ... /etc/mail/submit.cf
[Notice: On some OS "wheel" is not used but "bin" or "root" instead,
however, this is not important here.]
That is, the owner of sendmail is root, the group is smmsp, and the binary
is set-group-ID. The client mail queue is owned by smmsp with group smmsp
and is group writable. The client mail queue directory must be writable by
smmsp, but it must not be accessible for others. That is, do not use world
read or execute permissions. In submit.cf the option UseMSP must be set,
and QueueFileMode must be set to 0660.
--- end quote ---
检查下来,clientmqueue 和 mqueue 目录的权限都没问题,唯独 sendmail 的主程序经过了几次 link :
which sendmail
/usr/sbin/sendmail -> /etc/alternatives/mta
/etc/alternatives/mta -> /usr/sbin/sendmail.sendmail
而这个 /usr/sbin/sendmail.sendmail 的权限竟然是
-rwxr-xr-x 1 root root ... /usr/sbin/sendmail.sendmail
于是
chown root.smmsp /usr/sbin/sendmail.sendmail
chmod g+s /usr/sbin/sendmail.sendmail
/etc/init.d/sendmail stop
/etc/init.d/sendmail start
再尝试发邮件,搞定。
yong自己的截图:
- 【mail错误】RunAsUser for MSP ignored 错误
- java-mail的错误
- javax.mail.NoSuchProviderException: smtp 错误
- keil错误ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
- 编译器处理警告、错误 #pragma GCC diagnostic ignored "-Wunused"
- vs2005升级时,提示错误“349fa.msp未通过数字签名检查”
- java mail 做邮件 错误javax/mail/MessagingException
- mail函数使用错误排除记
- mail邮件退信常见错误
- live mail 无法加载的错误
- mail发送邮件遇到的sb错误
- Java Mail发送邮件各种错误
- Navicat for MySQL错误
- PostgreSQL错误解决:ERROR: current transaction is aborted, commands ignored until end of transaction blockp
- Tomcat 错误“inside the host appBase has been specified, and will be ignored”
- 装xampp遇到World-writable config file‘/opt/lampp/etc/my.cnf’is ignored错误
- glog函数调用出现c++:void value not ignored as it ought to be错误
- 错误提示 maven-enforcer-plugin is ignored by m2e 原因及处理办法
- 四旋翼飞行器教学笔记2 —— 飞行器de姿态读取 1
- SpringMVC中的处理模型数据
- java多线程实现的两种方式
- 图片验证码生成工具类
- HTML中常用字符实体
- 【mail错误】RunAsUser for MSP ignored 错误
- 神经网络也可以有逻辑——解析视觉推理(Visual Reasoning)
- C# GridControl 的使用小结
- 关于高德地图在fragment中出现切换后只有基本地图服务的解决案列
- kmeans代码分析
- 为什么说电路保护器件是电子产品或设备中不可缺少的组成部分?
- Android数据库基础知识——SQLite数据库的使用
- requests库入门-15-OAUTH认证
- Java程序员修炼之道 之 Log