In my Mac, this is what I followed:
Following is the ruby file I'm testing with. This is capable of reading from STDIN and write in a file sample.mail:
while line = STDIN.gets
f = File.open("/Users/username/sample.mail", "a+")
/etc/aliasesand added this line:
/etc/postfix/main.cfand added this line
allow_mail_to_commands = alias,forward,include
sudo newaliasesto sore the changes.
Now, at this stage I am expecting when I send a mail to username@localhost it should be appended to
But it's not happening.
Where did I do wrong?