amavisd-release not working with quarantine_subdir_levels

Bug #700288 reported by Cyril Jaquier
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
amavisd-new (Ubuntu)
Invalid
Low
Unassigned

Bug Description

Binary package hint: amavisd-new

amavisd-release does not work when quarantine_subdir_levels is set to 1 (and probably more). This is the default in 10.04 LTS:

root@rand:/etc/amavis/conf.d# grep quarantine_subdir 20-debian_defaults
$quarantine_subdir_levels = 1; # enable quarantine dir hashing

When trying to release an e-mail, it seems that amavisd returns the wrong path as you can see below:

root@rand:/etc/amavis/conf.d# find /var/lib/amavis/virusmails/ -name "bad*"
/var/lib/amavis/virusmails/V/badh-Vzji0yHNymWh
/var/lib/amavis/virusmails/k/badh-k0IqReVcboI3
/var/lib/amavis/virusmails/x/badh-xDEZb5Q+stEv
/var/lib/amavis/virusmails/I/badh-IGjIOydvUwg0
root@rand:/etc/amavis/conf.d# amavisd-release badh-k0IqReVcboI3
450 4.5.0 Failure: File /var/lib/amavis/virusmails/badh-k0IqReVcboI3 does not exist at (eval 111) line 385, <GEN182> line 5.
root@rand:/etc/amavis/conf.d#

The subdir ('k' in this case) is not in the path so it seems that quarantine_subdir_levels is not taken into account in this case.

My amavisd-new version:

ii amavisd-new 1:2.6.4-1ubuntu5 Interface between MTA and virus scanner/content filters

Revision history for this message
Chuck Short (zulcss) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please answer these questions:
1. Is this reproducible?
2. If so, what specific steps should we take to recreate this bug? Be as detailed as possible.
This will help us to find and resolve the problem.

Changed in amavisd-new (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Cyril Jaquier (cyril-jaquier) wrote :

1. Yes, this is reproducible

2.

* Install amavisd-new using your favorite package manager
* Be sure to have $quarantine_subdir_levels = 1 (or higher). This should be the default
* Wait for an e-mail to land into the quarantine
* Try to release it with amavisd-release

=> File not found because of wrong path. The subdirectory from directory hashing is missing.

On a default installation, you can find e-mail in the quarantine using:

# find /var/lib/amavis/virusmails/ -type f

I looked a bit at amavisd-release but my Perl knowledge is not that good. Either amavisd is not returning the right path or amavisd-release should handle $quarantine_subdir_levels.

Changed in amavisd-new (Ubuntu):
status: Incomplete → New
Revision history for this message
Cyril Jaquier (cyril-jaquier) wrote :

Here is what I get when I increase log_level in amavisd-release:

# amavisd-release badh-Vzji0yHNymWh
> request=release
> quar_type=F
> mail_id=Vzji0yHNymWh
> mail_file=badh-Vzji0yHNymWh
waiting for response
< setreply=450 4.5.0 Failure: File /var/lib/amavis/virusmails/badh-Vzji0yHNymWh does not exist at (eval 111) line 385, <GEN257> line 5.
< exit_code=75
< return_value=tempfail
450 4.5.0 Failure: File /var/lib/amavis/virusmails/badh-Vzji0yHNymWh does not exist at (eval 111) line 385, <GEN257> line 5.

So it seems that amavisd-new doesn't look at the right place.

Revision history for this message
Cyril Jaquier (cyril-jaquier) wrote :

Sorry... I think this is not really an issue...

I tried to add the subfolder and it found the file:

# amavisd-release I/badh-IGjIOydvUwg0
250 2.5.0 No recipients, nothing to do

Not really intuitive but this seems to be the way amavisd-new works. Then I googled for the "no recipients" problem and it seems that in this case I need to set the recipient explicitly as explained here:

http://<email address hidden>/msg13081.html

# amavisd-release I/badh-IGjIOydvUwg0 <email address hidden>
250 2.0.0 Ok, id=rel-IGjIOydvUwg0, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 2B1F721619

Feel free to close this bug and sorry again. By the way, a man page for amavisd-release with such information could be helpful.

Revision history for this message
Scott Kitterman (kitterman) wrote :

Done. We'd need someone to write the man page. If you can put the content together we can publish it in the package.

Changed in amavisd-new (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.