sh shell 电子邮件 var/usr/email/dave 转发
我是 openSuse 11.1 的新手,我有几个正在运行的 crontab 作业,其中一个每天都会创建一个动态的“at”作业列表。有没有办法将“sh”shell 发送到 /var/usr/email/dave 的电子邮件转发到其他电子邮件地址,我的研究结果一片空白,主要是因为我不确定我在看什么为了。如果有人能提供帮助,请欢呼。
自从研究了这一点以来,当在 /bin/sh shell 中执行脚本后从 perl 打印时, /bin/sh 将打印输出通过电子邮件发送到 /var/usr/mail/dave ,我想简单地将这封电子邮件转发到其他 pop3 帐户,一个其中可以通过我的手机访问。我很抱歉我原来的问题不够清楚
I'm new to openSuse 11.1, I have several crontab jobs running, one of which creates a dynamic list of 'at' jobs each day. Is there a way for the emails which the 'sh' shell sends to /var/usr/email/dave to be forwarded to other email addresses, my research has come up blank, mainly because I'm not sure what I'm looking for. Cheers if anyone can help.
Since looking into this, when printing from perl after script executed in /bin/sh shell, /bin/sh emails the printout to /var/usr/mail/dave, I would like to simple forward this email to other pop3 accounts, one of which is accessible by my phone. My apologies my original question wasn't clear enough
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将
crontab
文件中的MAILTO
环境变量设置为您希望接收邮件的用户的名称。如果不存在,请添加它。来自
man 5 crontab
:Set the
MAILTO
environment variable in thecrontab
file to the name of the user you'd like to receive the mail. Add it if it's not there.From
man 5 crontab
:如果您想转发戴夫的所有邮件,请查看简单的 .forward 文件是否有效。
如果您想对此有所选择,请研究 procmail。
If you want to forward all of dave's mail, see if a simple .forward file works.
If you want to be selective about it, investigate procmail.