apt get life

Life around technology

  • Technology
    • Guides
    • Linux
    • Development
      • Laravel
    • Misc
    • Raspberry Pi
  • Writing
  • Crafts
    • Crochet
    • Model Making
    • Painting
  • Privacy Policy
You are here: Home / Technology / Guides / Postfix; Delete Mailq Messages From a Single Sender

Postfix; Delete Mailq Messages From a Single Sender

2012/09/27 by sudo

So this is a similar post to the previous one on deleting messages to a single recipient, except this focuses on deleting messages from a recipient. It works quite well if a spammer blasts you from a single address.

To remove the nuisance mail from the queue, use a similar command as last time, except $7 indicates the senders address:

 

mailq | grep -v '^ *(' | >awk 'BEGIN { RS = "" } { if ($7 == "user@example.com")print $1 }' | tr -d '*!' | sudo postsuper -d -

*Note this command is cut of due to the width of the site. if copying make sure you select all of the text.
 

This will search the mailq for messages with a specific sender “user@example.com” and pass the message(s) to postsuper with the delete option. Please note that you will need to update the email address used in the example with the one for your sender. The command is also meant to be on one line, and has been reformatted to display on the website.

 

You can find more information from the content-source: http://themomorohoax.com/2010/05/10/deleting-messages-to-a-specific-recipient-from-the-postfix-queue

Share this:

  • Twitter
  • Facebook
  • Reddit
  • Tumblr
  • Pinterest

Related

Filed Under: Guides, Technology Tagged With: email, mailq, Postfix

Recent Posts

  • Solving Error on statfs() system call with cAdvisor and Docker
  • MySQL in Docker for Local Development
  • Laravel Docker Development Environment With PHP7
  • Docker WordPress Increase PHP Max File Size
  • Injecting inbound request headers with Traefik v2

Tags

7zip API auditing Courier MTA crochet data recovery debian debudding development Dingo API docker email Getting started with Laravel 5 & Dingo API hard drive health KVM Laravel larvel 5 lenovo Linux Mail Quota Minion mint netgear nas networking network shares php PHP development Postfix samba security SMART smartctl smartmontools smb smbfs testing traefik ubuntu ubuntu 18.04 ubuntu 20.04 ubuntu server vagrant Virtual machines xdebug xubuntu

© Copyright 2015 apt get life