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 / Archives for mailq

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

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

Recent Posts

  • Disable iLO on HP Microserver Gen8
  • Ubuntu Desktop 24.04 Change Wallpaper Settings
  • Customising Ubuntu Desktop 24.04
  • Remove domains from Let’s Encrypt using Certbot
  • Install Jetbrains Toolbox on Ubuntu 22.04

Tags

API auditing crochet data recovery debian debudding development Dingo API docker email Getting started with Laravel 5 & Dingo API hard drive health HP Microserver KVM Laravel larvel 5 lenovo Linux Minion mint netgear nas networking network shares php PHP development Postfix raspberry pi review samba security SMART smartctl smartmontools smb testing traefik ubuntu ubuntu 18.04 ubuntu 20.04 ubuntu 22.04 ubuntu server vagrant Virtual machines xdebug xubuntu

© Copyright 2015 apt get life