Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
add comment

marked as duplicate by mailq, Shane Madden, Scott Pack, Jacob, voretaq7 Jan 14 '12 at 5:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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.

share|improve this answer
add comment

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