Pali Roh?r: > > Example: install this as /usr/sbin/sendmail. > > > > #!/bin/sh > > exec /usr/sbin/sendmail.real "$@" [email protected] > > > > Why tinker with internal protocols, when you can use > > documented features? > > Hm... that you for a hint. This wrapper is easier to implement as > wrapper for postdrop. > > I chose postdrop as I understood that this is the last application in > "pipeline" which has information about unix before email is put into > queue.
It's almost the last program :-) The pickup daemon determines UNIX info from the maildrop queue file owner, as it prepares the information for the Received: message header. Preparing the header in the pickup daemon is safer than doing it in the set-gid postdrop program, because the time conversion library relies on environment variables. > Are there any other binaries which calls postdrop? Or /usr/sbin/sendmail > is the only one binary which uses postdrop? At this time, only the Postfix sendmail program depends on postdrop. If you take the script solution, be sure to use "$@" (with quotes) and not $* (without quotes). Right: exec /usr/sbin/sendmail.real "$@" [email protected] Wrong: exec /usr/sbin/sendmail.real $* [email protected] The wrong solution mis-handles arguments that contain whitespace. Wietse
