Easy management of postqueue

Discussion in 'Tips/Tricks/Mods' started by felan, Jan 9, 2017.

  1. felan

    felan Member HowtoForge Supporter

    Good morning.

    I was wondering, are there any CLI tools out to manage postfix queue, like say midnight commander style? Sometimes it would be nice to be able to go in and remove individual queues without having to go in and note every queue id and then delete it afterwords.

    Mike
     
  2. Jesse Norell

    Jesse Norell Well-Known Member

    postsuper is a cli tool for that, but it doesn't have an interface like midnight commander; don't know of anything that does offhand. you could write a simple script to do about anything you'd want, the postsuper man page has an example of parsing mailq output. just clearing out a queue is quite easy, eg. from postsuper man page 'postsuper -d ALL deferred' deletes everything in the deferred queue.
     
  3. felan

    felan Member HowtoForge Supporter

    Hmm.. Oki. Guess I have to have someone code something for me then. Thanks.
     
  4. Jesse Norell

    Jesse Norell Well-Known Member

    Just an idea, but if you're going to have someone code a user interface for that, rather than a cli tool like you mentioned, consider having someone integrate it with the ispconfig interface, and contribute it back to the project to be useful for others.

    One significant design issue in doing so is running commands as root - for which you can use the ispconfig job queue to run tasks via ispconfig's once-per-minute cronjob, and it would handle multi-server installations just like single-server installs.

    Depending on what you have in mind, some ideas that come to mind are: the 'Monitor' tab can already show you the mail queue, you could add links for each message to delete the message and other taks like moving to/from hold queue; you could have a link to delete all messages in a given queue, which sounds like your original need; you could have a text field where you enter an email address, with the ability to delete all email from that as sender, to that as recipient, or using that address as sasl username; maybe do a similar thing for a domain name rather than email address (eg. delete all email to specified domain, or from specified domain).

    Just a thought, you may have your own preferences, but I certainly promote giving back to projects when you can. :)
     
    till likes this.
  5. felan

    felan Member HowtoForge Supporter

    Hi Jesse.

    That is some good ideas you got there. I think I will have to take a serious look at it and see if it warrants spending some money on having someone develop it and yes it will be put up as open source and GPL afterwords, if we do.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    If you make it OpenSource then please consider to use the BSD license like ISPConfig is using it, GPL is not compatible with BSD so we would not be able to use this addon in ISPConfig when it is licensed under GPL.
     
  7. felan

    felan Member HowtoForge Supporter

    Ah note taken. Thanks.
     

Share This Page