1

I'm trying to pipe mail to script

I added lines like these to /etc/postfix/master.cf:

myscript unix - n n - - pipe
  flags=F user=root argv=/var/myscript/igotmail.sh ${sender} ${size} ${recipient}
smtp      inet  n       -       -       -       -       smtpd
        -o content_filter=myscript:dummy
pickup    fifo  n       -       -       60      1       pickup
    -o content_filter=myscript:dummy

but it doesn't work. As far as I'm able to understand what I'm doing (so not too far) it should pipe every mail to this script. But it dosn't do it. Nothing has changed after adding these lines. It still works as before (of course I did service postfix restart) mails are delivered to users. I don't know what more should I do.

Andrew Schulman
  • 8,561
  • 21
  • 31
  • 47
zekorius
  • 11
  • 1
  • Ok I hadn't added the `contempt filter = myscript:` in `main.cf` and used user=root instead of user=myscript (I created such user) in `master.cf` – zekorius Feb 16 '18 at 11:01

0 Answers0