帮助调试 Sendmail/Mailman 配置问题

帮助调试 Sendmail/Mailman 配置问题

我正在尝试使用 Sendmail 和 Mailman 配置服务器。一段时间以来,我一直收到“管道损坏”错误,并且一直在慢慢调试。我修复了一些权限问题,并更改了 Mailman 期望从其调用的用户,等等。最后,我尝试了所有我能想到的方法,因此我添加了一个新测试,以查看是 Mailman 脚本还是 Sendmail 导致了问题。这是我现在收到的错误(删除了时间戳和识别信息):

<-- MAIL FROM:[email protected]
Authentication-Warning: xxxxx.org: xxxxxxxxxxxxxx.net [xx.xx.xxx.xxx] didn't use HELO protocol
--- 250 2.1.0 [email protected]... Sender ok
<-- RCPT TO: [email protected]
--- 250 2.1.5 [email protected]... Recipient ok
<-- DATA
--- 354 Enter mail, end with "." on a line by itself
[email protected], size=20, class=0, nrcpts=1, msgid=<[email protected]>, proto=SMTP, relay=xxxxxxxxxxxxxx.net [xx.xx.xxx.xxx]
--- 250 2.0.0 o6KMg2xZ025804 Message accepted for delivery
 alias [email protected] => "|/bin/echo foo"
 SYSERR(root): putbody: write error: Broken pipe
   0: fl=0x0, mode=20660: CHR: dev=0/15, ino=776, nlink=1, u/gid=0/0, size=0
   1: fl=0x1, mode=20660: CHR: dev=0/15, ino=776, nlink=1, u/gid=0/0, size=0
   2: fl=0x1, mode=20660: CHR: dev=0/15, ino=776, nlink=1, u/gid=0/0, size=0
   3: fl=0x2, mode=140777: SOCK localhost->[[UNIX: /dev/log]]
   5: fl=0x0, mode=100600: dev=8/3, ino=486765, nlink=1, u/gid=0/51, size=5
   6: fl=0x8000, mode=100640: dev=8/3, ino=65501, nlink=1, u/gid=0/0, size=12288
   7: fl=0x8000, mode=100640: dev=8/3, ino=65501, nlink=1, u/gid=0/0, size=12288
   8: fl=0x8000, mode=100640: dev=8/3, ino=65510, nlink=1, u/gid=0/0, size=12288
   9: fl=0x8000, mode=100640: dev=8/3, ino=65510, nlink=1, u/gid=0/0, size=12288
  10: fl=0x8000, mode=100640: dev=8/3, ino=64814, nlink=1, u/gid=0/51, size=12288
  11: fl=0x8000, mode=100640: dev=8/3, ino=64814, nlink=1, u/gid=0/51, size=12288
  12: fl=0x1, mode=100600: dev=8/3, ino=486767, nlink=1, u/gid=0/51, size=754
  13: fl=0x1, mode=10600: FIFO: dev=0/5, ino=7649785, nlink=1, u/gid=0/51, size=0
  14: fl=0x0, mode=10600: FIFO: dev=0/5, ino=7649786, nlink=1, u/gid=0/51, size=0
 MCI@0x0: NULL
 MCI@0x0: NULL
 to="|/bin/echo foo", [email protected] (8/0), delay=00:00:08, xdelay=00:00:00, mailer=prog, pri=30476, dsn=5.0.0, stat=Service unavailable
 o6KMsnxX025948: DSN: Service unavailable
 done; delay=00:00:08, ntries=1

中的别名/etc/aliases是:

 cmtest: "|/bin/echo foo"

如您所见,即使尝试管道化,/bin/echo我仍然会遇到相同的错误。但我无论如何也想不出还要检查什么。普通别名可以正常工作。有什么想法吗?

谢谢!

答案1

我认为问题是 sendmail 受限 shell,smrsh 仅允许 sendmail 执行 /etc/smrsh 目录中的程序

相关内容