outini / pymailq Goto Github PK
View Code? Open in Web Editor NEWSimple mails queue management
Home Page: https://pymailq.readthedocs.io
License: GNU General Public License v2.0
Simple mails queue management
Home Page: https://pymailq.readthedocs.io
License: GNU General Public License v2.0
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)>
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 ?
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
It would be nice to allow interaction to remote host with a configurable command.
An option --remote could be user to pass the user@host (for ssh at least).
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]...
… and enter the hall of fame of python modules ;)
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.
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:
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.
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==?=
Pymailq objects lack of proper __str__
and __repr__
methods.
See also: https://stackoverflow.com/questions/1436703/difference-between-str-and-repr-in-python
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.
# 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
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. ;)
Actually, the inspect command display a selection of known fields.
It would be great to display all the header fields.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.