So I setup everything for postfix/imap properly by going through https://help.ubuntu.com/community/PostfixBasicSetupHowto and i'm able to send emails to
however, I'm trying to send an email to
test@ME1.com then use
/etc/aliases to pipe that email into php stdin, and my emails are getting returned by postmaster.
the only accounts I have setup on the box are
fmaster. Do I need to create a
test account if I'm only using test's alias to pipe output to php? I'm not sure where I've gone wrong.
# Required aliases postmaster: root MAILER-DAEMON: postmaster # Common aliases abuse: postmaster spam: postmaster # PIPE OUTPUT TO PHP from test@ME1.com test: "| php -q /root/scripts/readmail.php
the important stuff in my
/etc/postfix/main.cg (with domains obscured)
myhostname = XYZ.members.linode.com alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = mail.ME1.com, localhost, ME1.com, ME1.it relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 #mailbox_command = mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all home_mailbox = Maildir/
/root/scripts/readmail.php is just:
$data = file_get_contents('php://stdin'); error_log($data); // just to see if it was successful
Anyone see where I'm going wrong?