- 论坛徽章:
- 0
|
solaris10的操作系统\r\n我在用户orabak下面创建了一个脚本,并希望该脚本执行完后将log发送到我的邮箱,所以在脚本最后叫了一条\r\nmailx -s “ rsync log\" vivian.shi@hewitt.com < /tmp/rsync.log\r\n\r\n手工执行该命令,我能收到邮件的,但是写到crontab里面去的话,就收不到邮件了。\r\ncrontab肯定已经执行了,因为我看到rsync.log的时间戳是更新过的,而且maillog中也有信息。\r\n\r\n而奇怪的是,我查了maillog,当我手工执行该脚本后,maillog如下:\r\nJul 21 13:51:51 SHGUPOR5 sendmail[12704]: [ID 801593 mail.info] n6L5pouZ012704: from=orabak, size=329, class=0, nrcpts=1, msgid=<200907210551.n6L5pouZ012704@SHGUPOR5.hewitt.com>, relay=orabak@localhost\r\nJul 21 13:51:53 SHGUPOR5 sendmail[12704]: [ID 801593 mail.info] n6L5pouZ012704: to=vivian.shi@hewitt.com, ctladdr=orabak (709085236/123456921), delay=00:00:03, xdelay=00:00:02, mailer=relay, pri=30329, relay=smtprelay.hewitt.com. [10.20.63.83], dsn=2.0.0, stat=Sent (Message accepted for delivery)\r\n\r\n通过crontab执行的话,maillog显示如下:\r\nJul 21 13:53:02 SHGUPOR5 sendmail[12754]: [ID 801593 mail.info] n6L5r2EU012754: from=orabak, size=348, class=0, nrcpts=1, msgid=<200907210553.n6L5r2EU012754@SHGUPOR5.hewitt.com>, relay=orabak@localhost\r\nJul 21 13:54:24 SHGUPOR5 sendmail[12754]: [ID 801593 mail.info] n6L5r2EU012754: to=orabak, ctladdr=orabak (709085236/123456921), delay=00:01:22, xdelay=00:01:22, mailer=relay, pri=30348, relay=smtprelay.hewitt.com. [10.20.63.83], dsn=2.0.0, stat=Sent (Message accepted for delivery)\r\n\r\n\r\nmailto的地址尽然变成orabak自己了,太奇怪了,不知谁碰到类似的情况,能否给出指教?谢谢。 |
|