Category Archives: Code

Putting subject & from in mail from command line

I couldn’t figure out how to send an email with both the subject and from set from the command line. mail -s "my subject" example@foo.bar worked with mail but would only set the subject. sendmail -f "sender@foo.bar" receiver@foo.bar worked with sendmail but would only set the “from”. With a little help from Google I put [...]

Postfix mailq search

I couldn’t find a script to search the Postfix mail queue so I wrote one. It’s a bash script and can be downloaded here (or just copy and paste it to file of your choice). I call it ssubject.sh. It ends up just spitting out the queue id’s of messages that match. Usage: “ssubject.sh “some [...]