Discussion:
Redirecting to devnull from master.cf
(too old to reply)
Erwan David
2016-07-09 14:27:21 UTC
Permalink
Is there a way to redirect to dev null (without using local aliases)
by using master.cf and a shell script maybe?
http://www.postfix.org/FILTER_README.html#simple_filter
Would something as simple as this work?
!/bin/sh
cat >/dev/null
exit $?
By using a pipe(8) transport and piping to /bin/true should be enough, no ?
(not writing to /dev/null, only discarding input)
Better : use discard(8)
Lefteris Tsintjelis
2016-07-09 14:46:51 UTC
Permalink
Is there a way to redirect to dev null (without using local aliases)
by using master.cf and a shell script maybe?
http://www.postfix.org/FILTER_README.html#simple_filter
Would something as simple as this work?
!/bin/sh
cat >/dev/null
exit $?
By using a pipe(8) transport and piping to /bin/true should be enough,
no ?
(not writing to /dev/null, only discarding input)
Yes! Great idea, much better and simpler in CPU cycles than dev null
actually! Thanks!
Erwan David
2016-07-09 14:25:11 UTC
Permalink
Is there a way to redirect to dev null (without using local aliases)
by using master.cf and a shell script maybe?
http://www.postfix.org/FILTER_README.html#simple_filter
Would something as simple as this work?
!/bin/sh
cat >/dev/null
exit $?
By using a pipe(8) transport and piping to /bin/true should be enough, no ?

(not writing to /dev/null, only discarding input)
Viktor Dukhovni
2016-07-09 14:50:54 UTC
Permalink
Post by Lefteris Tsintjelis
(not writing to /dev/null, only discarding input)
Yes! Great idea, much better and simpler in CPU cycles than dev null
actually! Thanks!
If you really want to save CPU cycles, use the discard(8) transport,
it is considerably more efficient than pipe(8) for discarding email.
--
Viktor.
Lefteris Tsintjelis
2016-07-09 14:54:20 UTC
Permalink
Post by Viktor Dukhovni
Post by Lefteris Tsintjelis
(not writing to /dev/null, only discarding input)
Yes! Great idea, much better and simpler in CPU cycles than dev null
actually! Thanks!
If you really want to save CPU cycles, use the discard(8) transport,
it is considerably more efficient than pipe(8) for discarding email.
Never noticed this one! Thank you!

Continue reading on narkive:
Loading...