Postfix notes

From Helpful
Jump to navigation Jump to search
📃 These are primarily notes, intended to be a collection of useful fragments, that will probably never be complete in any sense.

Local-only setup

http://cafim.sssup.it/~giulio/other/Postfix_Setup_for_Local_Mail_Only.html


Inspecting and managing the queue

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

Inspect the queue (descriptions only):

mailq


Peek at mail:

postcat -q QueueID


Removing mail

postsuper -d QueueID

or a queue references:

postsuper -d deferred
postsuper -d ALL


I have a script containing:

for queueid in `mailq | egrep '^[A-Z0-9]' | cut -d ' ' -f 1 | tr '\n' ' '`; do 
   echo
   echo
   echo
   echo "------------------ "$queueid
   echo
   postcat -q $queueid
done

Errors

Error writing message: File too large

A postfix error that occurs when a user's mailbox is full.

Regularly caused by cronjob output, particularly when you get long and frequent email reports.


mailbox_size_limit and virtual_mailbox_limit may be relevant.

You can use

postconf | egrep '(mailbox_size_limit|virtual_mailbox_limit)'

...to see what size they are currently set at, which is probably 50MB.


Set this to a higher limit (in your .cf files), or even to 0 to remove limits.