I recently set up a full web server with one of the best device ever built: the Apple TV 2.
I've got lighttpd and php, from cydia (those are quite good versions, but I'm planning to update php to get more features).
I've got pure-ftpd from the excellent radare repository
There was only one thing who were missing: postfix.
This software is the most known MTA, and allows you to turn your atv2 to a fully functional mail server.
After some days of search, i realized that i would have to compile it by myself, straight on the appleTV2, and i'm now happy to release it to the world, through the radare repo:
Here is the .deb: postfix-2.9.3-arm-apple-darwin.deb
To install it, just connect with ssh to your appleTV2, and then:
dpkg -i postfix-2.9.3.deb
You can now navigate to /etc/postfix/ and start to setup the server. This can be a little bit hard for noobs, since there is a lot of option, but there is many tutorials to help you.
You would also need the plist file, to enable postfix on load: org.postfix.plist
edit : here is my config file (main.cf)
I use PHP as a MDA.
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
message_size_limit = 30000000
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
virtual_alias_maps = hash:/etc/postfix/virtual
mail_owner = (your postfix user
default_privs = mobile
myhostname = (yourmachine.domain.com
mydomain = (domain.com
myorigin = $mydomain
unknown_local_recipient_reject_code = 550
relayhost = (IP adress of your ISP SMTP
in_flow_delay = 2s
mailbox_command = /private/var/stash/bin/php (/path/to/php/command.php
mail_spool_directory = /var/mobile/Mail/
smtpd_banner = $myhostname ESMTP $mail_name
debug_peer_level = 2
sendmail_path = /usr/sbin/sendmail
mailq_path = /usr/bin/mailq
setgid_group = _postfix
html_directory = no
manpage_directory = /usr/local/man
sample_directory = /etc/postfix
readme_directory = no
inet_protocols = all