There are two things involved with doing this:
- How to get the email to the system
- process the email to append info to a file
The first you can solve by having the mail be sent to the server directly, but if the server is not online all the time (located at home), it is probably better to have the emails sent to some Google or Yahoo account and fetch them from there.
You can do that with fetchmail, and have the mail delivered locally to a user
For the second part you can use procmail, with specific rules for the user in
~/.procmailrc. The local mail delivery agent needs to be told to use
procmail e.g. in
postfix you add:
mailbox_command = procmail -a "$EXTENSION"
In the file
~list/.procmailrc you can specify rules on what to do with mail (all mails arriving there, or the ones with specific characteristics (subject, from address, etc)).
procmail has several useful build in actions, and if those do not suffice you can pipe the mail into a program to do something specific it cannot do.