attachment_outer_name and attachment_email_name

Mark Martinec Mark.Martinec+amavis at ijs.si
Fri Apr 15 15:18:41 CEST 2011


Andreas,

> I get errors when setting using the placeholder %n:
> All other placeholders (%P,%b,%m,%i) work fine.
> 
> config:
> $policy_bank{'AM.PDP-SOCK'}{'attachment_email_name'} = '%n.eml';
> 
> command:
> # amavisd-release y/banned-yLimuJidEUM6
> 450 4.5.0 ERROR: Preparing an archive from a quarantined message failed:
> Insecure dependency in sysopen while running with -T switch at
> /usr/lib/perl5/5.10.0/i586-linux-thread-multi/IO/File.pm line 180, <GEN29>
> line 62.
> 
> Log:
> Apr 15 13:03:49 idtamavis11 amavis[5019]: (rel-yLimuJidEUM6) (!)Preparing
> an archive from a quarantined message failed: Insecure dependency in
> sysopen while running with -T switch at
> /usr/lib/perl5/5.10.0/i586-linux-thread-multi/IO/File.pm line 180, <GEN51>
> line 62. Apr 15 13:03:49 idtamavis11 amavis[5019]: (rel-yLimuJidEUM6)
> WARN: dispatch_from_quarantine failed: Preparing an archive from a
> quarantined message failed: Insecure dependency in sysopen while running
> with -T switch at /usr/lib/perl5/5.10.0/i586-linux-thread-multi/IO/File.pm
> line 180, <GEN51> line 62.
> 
> 
> config:
> $policy_bank{'AM.PDP-SOCK'}{'attachment_outer_name'} = '%n.zip';
> 
> command:
> # amavisd-release y/banned-yLimuJidEUM6
> 450 4.5.0 ERROR: Preparing an archive from a quarantined message failed:
> Error creating an archive: 1536,  at /usr/sbin/amavisd line 8850, <GEN29>
> line 62.
> 
> Log:
> Apr 15 13:05:35 idtamavis11 amavis[6195]: (rel-yLimuJidEUM6)
> (!)run_command: child process [6195]: Insecure dependency in exec while
> running with -T switch at /usr/sbin/amavisd line 3547, <GEN29> line 62.
> Apr 15 13:05:35 idtamavis11 amavis[6190]: (rel-yLimuJidEUM6)
> (!!)collect_results from [6195] (zip): exit 6 Apr 15 13:05:35 idtamavis11
> amavis[6190]: (rel-yLimuJidEUM6) (!)Preparing an archive from a
> quarantined message failed: Error creating an archive: 1536,  at
> /usr/sbin/amavisd line 8850, <GEN29> line 62. Apr 15 13:05:35 idtamavis11
> amavis[6190]: (rel-yLimuJidEUM6) WARN: dispatch_from_quarantine failed:
> Preparing an archive from a quarantined message failed: Error creating an
> archive: 1536,  at /usr/sbin/amavisd line 8850, <GEN29> line 62.
> 
> it's SLES_11 and amavisd-new-2.7.0-pre15 (with minor patches so the
> linenumbers may differ)


Thanks. As a quick fix please try:

--- amavisd~	2011-04-14 15:51:46.000000000 +0200
+++ amavisd	2011-04-15 15:15:37.000000000 +0200
@@ -8819,5 +8819,5 @@
             : $1 eq 'P' ? $msginfo->partition_tag
             : $1 eq 'm' ? $mail_id
-            : $1 eq 'n' ? $msginfo->log_id
+            : $1 eq 'n' ? untaint($msginfo->log_id)
             : $1 eq 'i' ? iso8601_timestamp($msginfo->rx_time,1)  #,'-')
             : $1 eq '%' ? '%' : '%'.$1 }egs;


I'll try to figure out later how this happens
(leaving for vacation now :)

  Mark


More information about the amavis-users mailing list