On Mon, Apr 26, 2010 at 08:39:04AM -0400, Zachary Burns wrote:

> I have a company controller that loves to micro-manage people and
> unfortunately loves to do it with software instead of dealing with the
> people problem...but anyway I'm getting off on a rant....
> 
> Is there a way to have postfix queue outgoing mail until he reviews it and
> if it's valid release the email and send it as normal.  I can write a web
> interface to have him allow/deny messages in the queue, but wanted to even
> know if I'm barking up the wrong tree.

Postfix can automatically put all email on "HOLD", and you would have
to write a tool that:

    - Runs as "postfix" so it can access the queue.

    - Uses "postcat" to extract the message envelope and content
      for display to the approver.

    - Uses 
    
        postsuper -H <queueid>; postqueue -i <queueid>
        
      to release an approved message.

    - Uses:
    
        postupser -d <queued> hold

      to delete a rejected message (from the "hold" queue only just-in case).

This is not too difficult. A better option (but more code) is to customize
an SMTP server (Perl, Python, Java, ...) that saves the message envelope
and content into an approval queue, and injects a new message into the
Postfix queue when an item on the approval queue is approved.

    - Does not to run as "postfix"

    - Does not depend on undocumented "postcat" output, which is not
      intended as interface for customization.

    - Does not run into issues with delay warnings, or other subtleties
      of "frozen" messages.

-- 
        Viktor.

P.S. Morgan Stanley is looking for a New York City based, Senior Unix
system/email administrator to architect and sustain our perimeter email
environment.  If you are interested, please drop me a note.

Reply via email to