moparisthebest:
> Hello all,
>
> I'm running postfix-2.9.6 on Ubuntu Server 12.04 LTS amd64.
Please send "postconf -n" output, SMTP command/reply transcript,
and NON-VERBOSE logging.
Wietse
> I recently ran across a bug in postfix's milter implementation, shortly
> after switching the server it was running on from sendmail to postfix.
> This milter removes recipients that aren't in a whitelist, so I keep a
> list of recipients in the RCPT TO method, and then in EOB (which is the
> only place you can modify the mail) I loop through them and call delete
> recipient on them. This works fine to stop mail from going to
> [email protected], but fails to stop mail from going to [email protected],
> or [email protected] (case difference anywhere, in local part or
> domain). The problem is the name sent to the rcpt method is always
> lowercase, regardless of what is sent in, but the delete recipient
> method appears to be case-sensitive. So if mail is to [email protected],
> delete([email protected]) works, but if mail is [email protected], postfix
> tells me it's [email protected], and delete([email protected]) does not
> work. But if I hard-code into the milter delete([email protected]), the
> recipient is removed.
>
> It's worth it to note that sendmail sends the name to the rcpt method in
> whatever case it is supposed to use, so I believe postfix should too.
>
> I got the postfix source code and found the code that sends this
> information, but I can't debug anything because I can't figure out how
> to make that code print to any logs. In src/milter/milter.c and
> src/milter/milter8.c, there are plenty of:
>
> if (msg_verbose)
> msg_info("%s: skip milter %s", myname, milter->m.name);
>
> type statements, but even if I comment out if(msg_verbose), recompile
> and install, I can't find a message like that anywhere. I've sent
> '-vvvvv' to postfix itself, and to every service in master.cf including
> smtp,smtpd,cleanup and all the others in there by default on Ubuntu
> 12.04 LTS, which causes many verbose messages to be in the log, but none
> from any milter code as far as I can see.
>
> So this message is half bug report, and half asking how to properly
> debug the milter code so I can submit a patch. Sorry for the length and
> if there are any questions I can answer let me know.
>
> Thanks much!
>