3

我正在寻求有关设置电子邮件网关的建议,以便学生可以通过电子邮件向我发送作业,电子邮件将被自动处理。

例如,如果 studenta@univ.edu 给我发电子邮件,主题是“CS208 hw1”,我会在参加 CS208 的学生列表中交叉检查 studenta,然后取出所有附件,将它们转储到该学生的 hw1 文件夹中并回复带有一封电子邮件,说明收到了哪些文件以及何时收到。如果学生的电子邮件格式不正确,例如主题错误或文件丢失,该服务将发送适当的电子邮件。

我对可以配置为电子邮件服务器的校园 Linux 机器具有管理访问权限。

顺便说一句,我正在考虑使用 fetchmail 和 cron 作业来持续阅读指定用户的电子邮件并使用某种脚本执行适当的响应。这听起来像是一个好方法吗?我会欢迎更好的想法?

4

2 回答 2

2

就个人而言,我会为一个带有上传对话框的页面以及列出当前文件和可能的 FTP 服务器的可能性扎根。电子邮件的问题在于,您无法到达服务器之前的传输,因为邮件在途中由其他服务器而不是您自己的服务器处理。邮件可能会在途中丢失或更改,并非所有服务器都可能接受特定大小或类型的附件。尽管这个想法非常好,但我认为它会产生一个比其他解决方案不太理想的解决方案,比如提到的页面或 ftp 服务器。

编辑

我更喜欢msw的方式。版本控制系统将为您省去很多麻烦和问题。* tips hat to msw*

于 2010-08-23T01:57:28.377 回答
2

我希望在实践中,无论您规定的任何规则,都会有更多的例外,而不是正确处理的符合标准的邮件。您将为手动修复和“计算机吃了我的作业”声称感到头疼。

由于这是一个 CS 200 级别的课程,因此要求他们使用一些版本控制系统,并省去使用 VCS 强加的刚性结构解析自由格式电子邮件的麻烦。您的学生也将从该要求中受益。如果我 10 岁的孩子能够欣赏 Google Docs 中自动修订控制的优点,我猜你的学生可以处理 Mercurial 或 git 甚至(喘气!)Subversion。

添加以回应评论

Yes, but with Mercurial (and presumably git) "repository" is a fancy word for "directory" and is not the heavyweight DBMSy thingy that older VCS models may have led you to expect.

Here is how as a student I would expect to work on a hypothetical assignment:

studenta@dorm$ hg clone https://Rich.univ.edu/studenta/cs208
$ cd cs208 ; broswer ./hw1.html
$ mkdir hw1 ; cd hw1 ; make my work files 
$ hg add * ; hg commit -m "perfect the first time!" # updates locally only
$ make lots of bug fixes
$ hg commit -m "okay really done now"
$ hg push 
# sleep, party, go to class with hangover
$ hg pull
$ browse hw2.html ; mkdir hw2 
...

The assignments in the student's repository placed there by you was just for the sake of demonstration. Since you "own" the Rich.unix.edu machine, their pushes become authoritative. You'd

  1. Write a (tiny) script to hg init $student/cs208 on Rich.univ.edu for each student in the roster.
  2. Figure whether HTTPS or SSH works best in your environment
  3. Add commentary - if desired - to the student's files that they'd pick up on their next pull
  4. Have a managed, convenient, logged record of all the interactions.
  5. The students get affirmative feedback at the moment of push that it was accepted

Finally, should the repository server be down they could

$ hg export tip | mail -s "server down; assignment done" Rich@univ.edu

And you'd still have a timestamped, digested version of their submission which has a rigid format which you could commit for them, or better still:

"Dr. Rich, the server was down!!!"
"But you sent me an export via e-mail, yes?"
"Of course, sir."
"Well, just push when the machine is back up, I already have proof that you completed it on time."
"Oh gee, Dr. Rich, you're swell!"

于 2010-08-23T02:04:32.947 回答