Postfix: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== Installation == === Install Package === === Configuration === # main.cf <pre>mailbox_transport = cyrus</pre> # master.cf <pre> # The Cyrus deliver program has changed...") |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Cheatsheet == | |||
* Delete all emails from Postfix mail queue | |||
<syntaxhighlight lang="bash"> | |||
postsuper -d ALL | |||
</syntaxhighlight> | |||
* Delete all deferred emails from Postfix mail queue | |||
<syntaxhighlight lang="bash"> | |||
postsuper -d ALL deferred | |||
</syntaxhighlight> | |||
* Delete emails from a specific email (from or to) | |||
<syntaxhighlight lang="bash"> | |||
mailq | tail -n +2 | awk 'BEGIN { RS = "" } /admin@grdru\.com/ { print $1 }' | tr -d '*!' | postsuper -d - | |||
</syntaxhighlight> | |||
* Regenerate Index after editing the text file | |||
<syntaxhighlight lang="bash"> | |||
postmap /etc/postfix/virtual | |||
</syntaxhighlight> | |||
== Installation == | == Installation == | ||
Latest revision as of 05:25, 25 September 2019
Cheatsheet
- Delete all emails from Postfix mail queue
postsuper -d ALL
- Delete all deferred emails from Postfix mail queue
postsuper -d ALL deferred
- Delete emails from a specific email (from or to)
mailq | tail -n +2 | awk 'BEGIN { RS = "" } /admin@grdru\.com/ { print $1 }' | tr -d '*!' | postsuper -d -
- Regenerate Index after editing the text file
postmap /etc/postfix/virtual
Installation
Install Package
Configuration
- main.cf
mailbox_transport = cyrus
- master.cf
# The Cyrus deliver program has changed incompatibly, multiple times. cyrus unix - n n - - pipe flags=R user=cyrus argv=/usr/sbin/cyrdeliver -e -m "${extension}" ${user}
mailbox_transport = lmtp:unix:/var/run/lmtp lmtp unix - - n - - lmtp
adduser postfix mail
saslpasswd2 -c cyrus