constant stream of curated content
 Array
(
    [id] => E4Wh
    [id_url] => 
    [cat_id] => kwgM
    [user_id] => seb
    [date] => 2012-07-19 10:20:00
    [kind] => memo
    [access] => 9
    [title] => Postfix on AppleTV2 : the missing app to create a full home server
    [content] => [url=http://www.daryo.com/seb/element/setup-your-appletv-2-as-a-webserver,u9Tm]I recently set up a full web server with one of the best device ever built: the Apple TV 2.[/url]

• 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 [url=http://cydia.radare.org/]radare repository[/url]

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:

[size=1.5]Here is the .deb: [url=http://cydia.radare.org/debs/postfix_2.9.3_iphoneos-arm.deb]postfix-2.9.3-arm-apple-darwin.deb[/url][/size]
[url=http://daryo.com/data/asset/postfix-2.9.3.deb]mirror link[/url]

To install it, just connect with ssh to your appleTV2, and then:
[pre]wget http://cydia.radare.org/debs/postfix_2.9.3_iphoneos-arm.deb
dpkg -i postfix-2.9.3.deb[/pre]
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: [url=http://daryo.com/data/asset/org.postfix.plist]org.postfix.plist[/url]


[b]edit : here is my config file (main.cf)
I use PHP as a MDA.[/b]

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 = ([i]your postfix user[/i])
default_privs = mobile
myhostname = ([i]yourmachine.domain.com[/i])
mydomain = ([i]domain.com[/i])
myorigin = $mydomain
unknown_local_recipient_reject_code = 550
relayhost = ([i]IP adress of your ISP SMTP[/i])
in_flow_delay = 2s
mailbox_command = /private/var/stash/bin/php ([i]/path/to/php/command.php[/i])
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
    [language] => 
    [url] => 
    [clicks] => 
    [is_promoted] => 0
    [user] => seb
    [feed] => Technologie
    [feedUrl] => https://daryo.com/category/technologie
    [source] => _internal_
    [userUrl] => https://daryo.com/user/seb
    [mission] => init
)
by seb - 2012-07-19 10:20
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
mirror link

To install it, just connect with ssh to your appleTV2, and then:
wget http://cydia.radare.org/debs/postfix_2.9.3_iphoneos-arm.deb
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