I have Postfix installed and configured to pass mail to Procmail. I have Procmail configured to pass the email to a Python script. I also notice that Procmail is placing a copy of the same email into a file at /var/spool/mail/<username>
. I don't want a copy of the message to be retained there or anywhere on the server. Is there a way to configure Procmail to drop the message after it is sent to the Python script?
In my .procmailrc configured like so:
:0Wc:
| env python3 /home/user/python/script.py
:0
* ^From:.*@.*
/dev/null
This however does not work. The message still ends up /var/spool/mail/<username>
.