Hello, I'm having some problems to release quarantine messages - actually some customer wants to release a message.
The link is like this:
Quarantine release address:
quarantine-3451cb7b-00b9-43d0-87a2-327f44882f7a-206...@choicenet.ne.jp
Here 206328 is the ID of the message is the quarantine database:
var/lib/pythonfilter/quarantine/msgs.db
However, I always got a message saying that the message was not found....
So, I wrote a small program to list the keys in the database:
/var/lib/pythonfilter/quarantine# ./dbmtest.pl msgs.db
203720L
206242L
206330L
206332L
206328L
Here all keys seems to have a trailing 'L'.
This is the Python release function:
def release(requestedId, address):
# Open and lock the quarantine DB
(dbm, lock) = _getDb()
if dbm.has_key(requestedId):
(qtime, quarantinePaths) = pickle.loads(dbm[requestedId])
else:
(qtime, quarantinePaths) = (None, None)
# Unlock the DB
_closeDb(dbm, lock)
# If quarantinePaths is None, then an invalid ID was requested.
if not quarantinePaths:
# Alert the user that his request failed
sendFailureNotice(requestedId, address)
return
# Load message with XFilter
qmsg = courier.xfilter.XFilter('quarantine', quarantinePaths[0],
quarantinePaths[1])
# Check the recipients for one matching the requestor
for x in qmsg.getControlData()['r']: <----- read 'r' control
data
if(x[0] == address or
x[1] == address or
x[1] == '%s%s' % ('rfc822;', address)):
# Inject the message with "submit" for requestor
qmsg.submitInject('local', [x])
return
# If no address matched, alert the user that the request was invalid.
sendFailureNotice(requestedId, address)
The program reads the message control data in the corresponding file (here:
C206328 ) which looks like this:
(sender email)
(server ip address)
e
t
M0000000000030620.58477259.000035A9
[email protected] <-- 'r'
Rrfc822;[email protected] <-- 'R'
N
As the program reads the 'r' headers it will never match the 'R' header ....
Or am I wrong??
Actually the program returns a 'message not found' mail if either the mail is
not found in the database or if the release requester is not not one of the
mail recipients.
I don't complain about this but it is a bit unclear.
My real concern is if the IDs in the release link are correct - or not.
Could anybody shed some light on this?
Thanks a lot!
--
Bernd Plagge - プラゲ ベェアント
pgpSHvVFQH7oZ.pgp
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/xeonphi
_______________________________________________ courier-users mailing list [email protected] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
