Listas: > Hello, > > I wonder if it is possible to specify the informative text for bounce > messages, depending on the exit code from pipe(8). > > Something like having this in master.cf: > > mycmd unix - n n - 10 pipe > bounce_message_map=/path/to/pipemap flags=... user=... argv=/path/to/script > > And then, the 'pipemap' file: > > ======= pipemap ======= > 67 addressee unknown > 69 service unavailable > 75 temporary failure > 98 foo > 99 bar > ===== end of pipemap ====== > > Any way of doing this? (apart from sending the bounce message directly > from the piped command)
The parts of Postfix that you can play with are documented. The bounce(8) service protocol and internals are not documented, therefore you cannot play with them. Only the documented behavior has a promise of backwards compatibility. That said, the Postfix pipe(8) service already maps exit status codes to text as per /usr/include/sysexits.h. If that text is not what you want then you can override it with text on stdout, as documented in the pipe(8) manpage. Wietse