GithubHelp home page GithubHelp logo

outini / pymailq Goto Github PK

View Code? Open in Web Editor NEW
34.0 34.0 10.0 1.03 MB

Simple mails queue management

Home Page: https://pymailq.readthedocs.io

License: GNU General Public License v2.0

Python 92.18% Shell 7.24% Makefile 0.59%
console postfix python2 python3 shell utility

pymailq's People

Contributors

ahpnils avatar jocelyndelalande avatar moebiuseye avatar outini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pymailq's Issues

Bug when selecting mails by size

We actually can specify minimum size without maximum size.

PyMailq (sel:1313)> select size +1000
*** Syntax error: minimum size is greater than maximum size
PyMailq (sel:1313)> select size -0 +1000  
*** Syntax error: minimum size is greater than maximum size
PyMailq (sel:1313)> select size +1000 -100000
PyMailq (sel:1185)> 

Expose postsuper commands in pqshell

I'm about to start implementing postusper commands (control.py) within pqshell, but I'd like to know the way you see it.

I thought about just adding the 4 commands as "base" commands of pqshell : delete/hold/release/requeue.

What do you think ?

Allow filtering on multiple values

Actual selection sub-commands only take a single value.
It would be useful to select on multiple values with an 'OR' condition.

Example:

> select senders user-1 user-2
> select status hold active

Wrong usage for command inspect

The usage shown for command inspect is wrong

> help inspect
Usage: show mail <mail_qid>

It should be:

> help inspect
Usage: inspect mails <qid> [qid]...

Automatically load the mails queue at shell start

Mails queue may be load automatically at shell startup using the default "mailq" method.
Additionnaly, an option "--no-auto-load" could be used to deactivate this behavior, allowing user to load from spool or file once the shell is started.

Add proper logging and debug control

It would be useful to add proper logging to the whole pymailq project.
This will simplify the tracking of operations and the debugging.

A fine control of debug level may be great, at least to choose between 2 levels:

  • 1: DEBUG messages activated
  • 2: DEBUG messages and timing are activated

Rename to something less confusing

That's an unpleasant request, sorry for that but the fact is there is something else in pypi is named pyqueue : https://pypi.python.org/pypi/pyqueue/

thus, it's very confusing (not to say impossible) to specify your pyqueue as a dependency. Plus that's IMHO a too vague name.

What about "pypostfixq" or "postfixq" or something else mentioning postfix.

Encoded subjects conversion

Automatic conversion of encoded subjects would be great when inspecting those.

Exemple of encoded subjects:

=?ISO-8859-15?Q?test_=E9?=
=?UTF-8?B?0J/RgNC+0LLQtdGA0LrQsA==?=

Allow filtering on any fields

The select command actually supports filtering on few known fields (sender, status, etc.).
It would be great to be able to filter on any field present in mail headers.

Exception loading the queue

# pqshell
Loading mails queue content to store
Traceback (most recent call last):
  File "/usr/local/bin/pqshell", line 4, in <module>
    __import__('pkg_resources').run_script('pymailq==0.9.0', 'pqshell')
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 654, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1441, in run_script
    exec(script_code, namespace, namespace)
  File "/usr/local/lib/python3.6/site-packages/pymailq-0.9.0-py3.6.egg/EGG-INFO/scripts/pqshell", line 123, in <module>
  File "/usr/local/lib/python3.6/site-packages/pymailq-0.9.0-py3.6.egg/EGG-INFO/scripts/pqshell", line 64, in main
  File "/usr/local/lib/python3.6/site-packages/pymailq-0.9.0-py3.6.egg/pymailq/shell.py", line 70, in __init__
  File "/usr/local/lib/python3.6/site-packages/pymailq-0.9.0-py3.6.egg/pymailq/shell.py", line 264, in _store_load
  File "/usr/local/lib/python3.6/site-packages/pymailq-0.9.0-py3.6.egg/pymailq/__init__.py", line 72, in run
  File "/usr/local/lib/python3.6/site-packages/pymailq-0.9.0-py3.6.egg/pymailq/store.py", line 569, in load
  File "/usr/local/lib/python3.6/site-packages/pymailq-0.9.0-py3.6.egg/pymailq/__init__.py", line 72, in run
  File "/usr/local/lib/python3.6/site-packages/pymailq-0.9.0-py3.6.egg/pymailq/store.py", line 512, in _load_from_postqueue
AttributeError: 'NoneType' object has no attribute 'recipients'

My environment

# cat /etc/redhat-release 
CentOS Linux release 7.7.1908 (Core)
# python3 --version
Python 3.6.8
# postconf mail_version
mail_version = 3.4.4

I may take over this project

Hello!

I've thought about this cool project of yours and I'm considering taking over development.

You can take a look at the dev branch of my fork and share your thoughts.

I've integrated a bit of unit testing with travis, implemented date-range selections (it works with multiple date ranges like this:) 2016-01-01 -1990-09-09 2016-08-29..2016-09-05 +2016-12-25

My next objective is to have a lot more of unit tests, and I will only add new features when I'm done unit testing the whole project; I needed that date-picking feature right away, though. ;)

trailing whitespaces

Would you consider it an acceptable policy not to commit trailing whitespaces on this project files ?

It's a widespread good practice, but the code of pyqueue is full of whitespaces, and at the moment, I configured an exception on my editor not to trim whitespaces in order to keep meaninfull patches.

I can make a « cleanup PR » if you want.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.