Possible Duplicate:
How do I get Postfix to deliver ALL mail to a custom script?

I've followed this series of tuts on rackspace and have set up a Ubuntu Lucid email server. Now, I can send emails from command line and receive emails to a file in /var/mail. What I'd like to do is either

  • direct incoming emails to a script to parse the email, or
  • find a script that will parse that file in /var/mail

Can anyone point me in the right direction? I'm not finding what I need through Google. Thanks!

link|improve this question
feedback

closed as exact duplicate by mailq, Shane Madden, Scott Pack, Jacob, voretaq7 Jan 14 at 5:30

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

1 Answer

up vote 1 down vote accepted

As you're using Postfix, have a look at pipe(8). This is configured in master.cf.

Pipe is a delivery agent designed to handle mail accepted by smtpd which is then passed to an external command rather than delivered straight to a file.

link|improve this answer
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.