Sean Hennessey: > Viktor, > > What I'm looking for is the envelope recipient. I need a way to > force an unqualified to address to a domain I can blackhole. I've > got an application that feeds into these systems that will allow > its users to enter badly formed email addresses. What I want to > do is to just swallow those in postfix. What I was attempting to > do, was get the envelope to to be forced to @blackhole.local, and > then I just discard that w/ a transport map. > > Is there a way to accomplish that?
One way: use smtpd_command_filter, and replace recipients without domain. Crude example: /etc/postfix/main.cf: smtpd_command_filter = pcre:/etc/postfix/command_filter /etc/postfix/command_filter: /^(RCPT\s+TO:\s*<)([^@]+)(>.*)/ $1$2@blackhole.local$3 You can test this with the postmnap command before deploying. Wietse