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.

I am forwarding emails, via '.forward', through procmail to a PHP script for one of my system users. Once processed the mail message is no longer needed. How can I configure sendmail to delete email messages after they are forwarded?

share|improve this question
1  
Please provide example contents for a .forward file you are using. If you are using only a .procmailrc file, indicate that. –  84104 Mar 8 '12 at 23:07

1 Answer 1

You are using the pipe feature of forward right ? Then there wouldn't be a copy of the email message in the inbox. I'm guessing that's what you mean by "delete email messages after they are delivered".

If it's not working check for smrsh. srshm defines programs you may pipe mail through for security reasons. Find sm.bin, and place symlinks for programs you want to use for piping.

Else, run a cron job to zero out the inbox once a day or however often works for you.

share|improve this answer
    
Thank you Yes I am using .procmailrc to forward to an executable PHP script. The /var/mail spool file for the user is still getting the forwarded email appended to it. –  Shep Norfleet Mar 9 '12 at 18:55
    
Can you post the content of .procmailrc ? –  kls Mar 12 '12 at 18:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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