1

I have a server running postfix with ~20 users that receives mail and sometimes resend the mail to external domains. Is it possible to configure postfix to drop all outgoing mail (to all users) into a folder/file, and then when I initiate it, send all mail in said folder? I want to go through all mail by hand before it is sent from the server.

1
  • What for big brother?
    – hookenz
    Nov 17, 2016 at 23:26

1 Answer 1

0

Yes (mostly).

You'll want to setup an smtpd access(5) policy (check_recipient_access type:table) that sends items into the hold queue, probably in smtpd_recipient_restrictions.

The message queue can be seen with postqueue -p.
Messages in the hold queue are denoted by a trailing ! on their QUEUEID, e.g.:

19ABE1094521!   49261 Mon Nov 14 20:59:59  MAILER-DAEMON

The contents of held messages can be sent to stdout using postcat -q $QUEUEID.

Held messages may be released using postsuper -H $QUEUEID, requeued using postsuper -r $QUEUEID, or deleted using postsuper -d $QUEUEID.

1
  • Great! Exactly what I was looking for but didn't think about. I was totaly into "put stuff here - read - refeed to postfix"
    – Exostor
    Nov 21, 2016 at 10:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .