Created
March 4, 2012 08:37
-
-
Save benlumley/1971393 to your computer and use it in GitHub Desktop.
Retrieve an email from postfix queue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first, find the email using mailq or postqueue -p | |
# | |
# Then, get the message id - its the random data string in left hand column of first line for each email. | |
# | |
# then, run: | |
# | |
postcat -q MESSAGEID | sed -n '/MESSAGE CONTENTS/,$p' | grep -v "MESSAGE CONTENTS" | sendmail [email protected] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment