Ben Rosengart: > On Fri, May 18, 2012 at 06:20:04AM -0400, Wietse Venema wrote: > > Ben Rosengart: > > > On Thu, May 17, 2012 at 01:19:52PM -0400, Wietse Venema wrote: > > > > Ben Rosengart: > > > > > I enabled verbose mode in smtpd(8), but I don't know what to look for > > > > > > > > Adding headers is implemented in cleanup(8). > > > > > > Before or after header_checks? > > > > Between header_checks and milter_header_checks (I added the > > latter several years ago on request of AOL). > > Bingo. > > I have one last problem, which is I have code (borrowed from Viktor) > which peeks at the files in the hold queue, and does special processing if > X-MS-Floodstopper is present. It seems that when the header comes from a > milter, it lives after the message body in the queue file?
It has to. Milter modifications are made after the entire message is received in a queue file. Adding headers in the middle of a file would have a major performance impact. I do not provide support for non-Postfix programs that depend on the Postfix queue file structure. Those supported dependencies will result in pure hell when I need to add functionality. There is a Perl-based parser in Victor's qshape script which is distributed with Postfix. This code will follow the Postfix pointer records as needed, so if you just walk the file, you will eventually find the X-MS-Floodstopper header if it is present. You could also look at the file with "postcat -h" which is fully supported. Adding "postcat -e" support, using the same file editing primitives as Milters, is a larger project. Wietse