Accept only mails from a list of IP addresses

  1. Set 'mynetworks' in the list of IP addresses you want to accept mails from
  2. Add the following in
    smtpd_client_restrictions = permit_mynetworks, reject

Get Postfix version

postconf mail_version

Messages queue commands

  • List the queue messages:
    postqueue -p
  • Show the contents of a queued message:
    postcat <file>
  • Delete a message from the queue:
    postsuper -d <queue_id>
  • Delete all messages in the queue:
    postsuper -d ALL
  • Requeue all messages:
    postsuper -r ALL
  • Deliver all messages (flush):
    postqueue -f