Note: I originally posted this question in Unix/Linux StackExchange, but after a week, there have been no responses. I see more postfix-related discussion here, and so I've voted to close the StackExchange version of my question, and I've moved my question here.
I'm running postfix version 2.93
under Debian 8
, and I'm trying to accomplish something unusual.
I have been using a home-grown milter for years which is working well. It runs various tests at each stage of the SMTP dialog: ehlo
, mail from
, rcpt to
, etc.
I have configured postfix
to do its standard checking for "User unknown in virtual mailbox table", and that is also working as it's supposed to.
However ...
In certain rare cases, I'd like to intercept the incoming message during the rcpt to
stage, before postfix
determines "User unknown in virtual mailbox table", and if these messages come from a small group of certain select senders and are addressed to a small group of specific unknown recipient names, I want to process them differently than normal via that milter step.
There is enough information available during the rcpt to
milter step in order to perform this special processing, but unfortunately, the "User unknown in virtual mailbox table" postfix
processing already rejects messages to unknown users before the rcpt to
milter step is invoked, and therefore that milter step never gets performed.
Is there a way to configure postfix
to only reject messages with "User unknown in virtual mailbox table" if the sender name does not not match certain special patterns?
If so, postfix
could continue to automatically reject messages to most unknown users, and it could then pass only those rare, special messages on to the milter for them to be handled during the rcpt to
step.
I know that I could completely disable the postfix
unknown recipient tests and then manage this myself during my rcpt to
milter step for all incoming messages. However, if possible, I'd like to avoid this and somehow tell postfix
to conditionally reject most messages to unknown users and to only pass a small subset of those incoming messages from special senders on to the milter processing.
I'm not optimistic about this even being possible under postfix
, but perhaps one or more of you know of a way that I could accomplish this unusual task.
Thank you very much for any thoughts and suggestions.