|
List Info
Thread: Temporary dir
|
|
| Temporary dir |

|
2007-05-21 07:20:37 |
Hello,
I have problem with the directory tmp inside the home
directory of the
user running amavisd-new (which use spamassassin).
That directory is configured as temporary dir for
Amavisd-new. I mounted
on it a tmpfs file system. The size of the partition is the
one
suggested for this job (to do the temporary directory for
amavisd-new).
But Often it filled up.
I saw the other files (directory) is contained inside that
directory..
drwx------ 2 amavis amavis 180 May 21 13:01
.spamassassin5530r7wcrVtmp
drwx------ 2 amavis amavis 180 May 21 12:06
.spamassassin7237wyAuoBtmp
drwx------ 2 amavis amavis 180 May 21 12:06
.spamassassin7288uoiiXPtmp
drwx------ 2 amavis amavis 180 May 21 12:06
.spamassassin7289MYWBOwtmp
drwx------ 2 amavis amavis 180 May 21 12:06
.spamassassin7289QcqPY2tmp
drwx------ 2 amavis amavis 180 May 21 12:06
.spamassassin7289sijshHtmp
drwx------ 2 amavis amavis 180 May 21 12:06
.spamassassin7297BbAzmltmp
drwx------ 2 amavis amavis 180 May 21 12:06
.spamassassin7418uqGnv3tmp
and I can't figure out why they are there!
Have someone an idea?
thanks
rocsca
------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
AMaViS-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
|
|
| Re: Temporary dir |
  Slovenia |
2007-05-21 11:25:04 |
Rocco,
> I have problem with the directory tmp inside the home
directory of the
> user running amavisd-new (which use spamassassin).
>
> That directory is configured as temporary dir for
Amavisd-new. I mounted
> on it a tmpfs file system. The size of the partition is
the one
> suggested for this job (to do the temporary directory
for amavisd-new).
I never suggested using a tmpfs for temporary files. Under a
decent
journalling or UFS file system I don't think any (small)
savings
are worth the risk of having a file system too small, or
wasting
unnecessary memory.
> But Often it filled up.
>
> I saw the other files (directory) is contained inside
that directory..
> drwx------ 2 amavis amavis 180 May 21 13:01
.spamassassin5530r7wcrVtmp
> drwx------ 2 amavis amavis 180 May 21 12:06
.spamassassin7237wyAuoBtmp
> and I can't figure out why they are there!
If we are referring to:
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=
5444
these files should eventually get deleted automatically.
Nevertheless, according to SA documentation the current
calling
method (since SA 3.0.0) lacks a call to
$mail_obj->finish.
The following patch should fix it:
--- amavisd.orig Mon Apr 23 05:25:30 2007
+++ amavisd Mon May 21 18:22:45 2007
 -17542,5
+17542,5 
sub call_spamassassin($$$) {
my($self,$msginfo,$lines) = _;
- my($which_section); my($per_msg_status);
+ my($which_section); my($mail_obj,$per_msg_status);
my($saved_umask) = umask; my($saved_pid) = $$;
my($spamassassin_obj) = $self->{'spamassassin_obj'};
 -17567,7
+17567,8 
do_log(5,"calling SA parse, SA version %s,
%.6f",
$sa_version, $sa_version_num);
- my($mail_obj) = $sa_version_num >= 3 ?
$spamassassin_obj->parse($lines)
+ $mail_obj = $sa_version_num >= 3 ?
$spamassassin_obj->parse($lines)
:
Mail::SpamAssassin::NoMailAudit->new(data => $lines,
add_From_line => 0);
+ undef $lines; # release storage, SA made its own copy
section_time($which_section);
 -17607,4
+17608,6 
if (defined $per_msg_status)
{ $per_msg_status->finish; undef $per_msg_status }
+ if (defined $mail_obj && $sa_version_num >=
3)
+ { $mail_obj->finish; undef $mail_obj }
umask($saved_umask); # SA changes umask to 0077
if ($$ != $saved_pid) {
--
Mark
------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
AMaViS-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
|
|
| Re: Temporary dir |

|
2007-05-22 03:19:16 |
> I never suggested using a tmpfs for temporary files.
Under a
> decent journalling or UFS file system I don't think any
> (small) savings are worth the risk of having a file
system
> too small, or wasting unnecessary memory.
http://www.arschkrebs.de/postfix/amavisd_tmpfs.shtml
> If we are referring to:
> http://issues.apache.org/SpamAssassin/show_bug.cgi?id=
5444
> these files should eventually get deleted
automatically.
I'm using SA 3.1.8. Do it suffer of the same problem?
> Nevertheless, according to SA documentation the current
> calling method (since SA 3.0.0) lacks a call to
$mail_obj->finish.
> The following patch should fix it:
>
>
> --- amavisd.orig Mon Apr 23 05:25:30 2007
> +++ amavisd Mon May 21 18:22:45 2007
>  -17542,5 +17542,5 
> sub call_spamassassin($$$) {
> my($self,$msginfo,$lines) = _;
> - my($which_section); my($per_msg_status);
> + my($which_section); my($mail_obj,$per_msg_status);
> my($saved_umask) = umask; my($saved_pid) = $$;
> my($spamassassin_obj) =
$self->{'spamassassin_obj'}; 
> -17567,7 +17567,8 
> do_log(5,"calling SA parse, SA version %s,
%.6f",
> $sa_version, $sa_version_num);
> - my($mail_obj) = $sa_version_num >= 3 ?
> $spamassassin_obj->parse($lines)
> + $mail_obj = $sa_version_num >= 3 ?
> $spamassassin_obj->parse($lines)
> :
> Mail::SpamAssassin::NoMailAudit->new(data =>
$lines,
>
> add_From_line => 0);
> + undef $lines; # release storage, SA made its own
copy
> section_time($which_section);
>
>  -17607,4 +17608,6 
> if (defined $per_msg_status)
> { $per_msg_status->finish; undef
$per_msg_status }
> + if (defined $mail_obj && $sa_version_num
>= 3)
> + { $mail_obj->finish; undef $mail_obj }
> umask($saved_umask); # SA changes umask to 0077
> if ($$ != $saved_pid) {
I'm using amavisd-new-2.4.4. Is this patch valid for the
amavisd script
included in this amavisd-new version?
If Yes, How do I have to apply the pacth?
Sorry for the trivial questions..
rocsca
------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
AMaViS-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
|
|
| Re: Temporary dir |

|
2007-05-22 05:23:36 |
> > If we are referring to:
> > http://issues.apache.org/SpamAssassin/show_bug.cgi?id=
5444
> > these files should eventually get deleted
automatically.
And.. Is it possible to use separate directory for
.spamassassin****
files?
rocsca
------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
AMaViS-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
|
|
| Re: Temporary dir |
  Slovenia |
2007-05-22 05:34:42 |
Rocco,
> > Nevertheless, according to SA documentation the
current
> > calling method (since SA 3.0.0) lacks a call to
$mail_obj->finish.
> > The following patch should fix it:
> I'm using SA 3.1.8. Do it suffer of the same problem?
Yes, I would think the 3.1.8 came after 3.0.0.
> I'm using amavisd-new-2.4.4. Is this patch valid for
the amavisd script
> included in this amavisd-new version?
Here is a patch against 2.4.4:
--- amavisd~ Mon Nov 20 18:35:40 2006
+++ amavisd Tue May 22 12:26:58 2007
 -15987,5
+15987,5 
section_time($which_section);
- my($per_msg_status);
+ my($mail_obj,$per_msg_status);
my($saved_umask) = umask; my($saved_pid) = $$;
my($start_time) = time; # SA may use timer for its own
purposes, get time
 -16006,5
+16006,5 
alarm($dt);
do_log(5,"timer set to %d s for SA (was %d
s)", $dt,$remaining_time);
- my($mail_obj); my($sa_version) =
$self->sa_version;
+ my($sa_version) = $self->sa_version;
do_log(5,"calling SA parse, SA version %s",
$sa_version);
# *** note that $sa_version could be 3.0.1, which is
not really numeric!
 -16062,4
+16062,6 
if (defined $per_msg_status)
{ $per_msg_status->finish; undef $per_msg_status
}
+ if (defined $mail_obj)
+ { $mail_obj->finish; undef $mail_obj }
if ($$ != $saved_pid) {
eval { do_log(-2,"PANIC, SA produced a clone
process ".
and here is the same patch against 2.4.5:
--- amavisd~ Wed Jan 31 00:12:37 2007
+++ amavisd Tue May 22 12:23:46 2007
 -16184,5
+16184,5 
sub call_spamassassin($$$) {
my($self,$msginfo,$lines) = _;
- my($which_section); my($per_msg_status);
+ my($which_section); my($mail_obj,$per_msg_status);
my($saved_umask) = umask; my($saved_pid) = $$;
my($spamassassin_obj) = $self->{'spamassassin_obj'};
 -16203,5
+16203,5 
eval {
$which_section = 'SA parse';
- my($mail_obj); my($sa_version) = $self->sa_version;
+ my($sa_version) = $self->sa_version;
do_log(5,"calling SA parse, SA version %s",
$sa_version);
# *** note that $sa_version could be 3.0.1, which is
not really numeric!
 -16249,4
+16249,6 
if (defined $per_msg_status)
{ $per_msg_status->finish; undef $per_msg_status }
+ if (defined $mail_obj)
+ { $mail_obj->finish; undef $mail_obj }
if ($$ != $saved_pid) {
eval { do_log(-2,"PANIC, SA produced a clone
process ".
> If Yes, How do I have to apply the patch?
Save a patch to some file, e.g. 0.patch, then cd to a
directory
where amavisd is located, and apply the patch with a 'patch'
command,
feeding 0.patch on stdin to it, e.g.:
cd /usr/local/sbin
#have 0.patch ready in this directory
patch < 0.patch
It knows which file to patch by looking at first two lines
of a patch.
Mark
------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
AMaViS-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
|
|
| Re: Temporary dir |

|
2007-05-22 05:46:24 |
> Save a patch to some file, e.g. 0.patch, then cd to a
> directory where amavisd is located, and apply the patch
with
> a 'patch' command, feeding 0.patch on stdin to it,
e.g.:
>
> cd /usr/local/sbin
> #have 0.patch ready in this directory
> patch < 0.patch
Mark your very clear.. bu I get:
# patch < 0.patch
patching file amavisd
Reversed (or previously applied) patch detected! Assume -R?
[n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file
amavisd.rej
missing header for unified diff at line 16 of patch
can't find file to patch at input line 16
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
| alarm($dt);
| do_log(5,"timer set to %d s for SA (was %d
s)",
$dt,$remaining_time);
|- my($mail_obj); my($sa_version) =
$self->sa_version;
|+ my($sa_version) = $self->sa_version;
| do_log(5,"calling SA parse, SA version
%s", $sa_version);
| # *** note that $sa_version could be 3.0.1, which is
not really
numeric!
--------------------------
File to patch:
It seems that there is an error in the patch..
rocsca
------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
AMaViS-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
|
|
| Re: Temporary dir |

|
2007-05-22 06:10:37 |
> Mark your very clear.. bu I get:
>
> # patch < 0.patch
> patching file amavisd
> Reversed (or previously applied) patch detected!
Assume -R?
> [n] Apply anyway? [n] Skipping patch.
> 1 out of 1 hunk ignored -- saving rejects to file
amavisd.rej
> missing header for unified diff at line 16 of patch
can't
> find file to patch at input line 16 Perhaps you should
have
> used the -p or --strip option?
> The text leading up to this was:
> --------------------------
> | alarm($dt);
> | do_log(5,"timer set to %d s for SA (was %d
s)",
> $dt,$remaining_time);
> |- my($mail_obj); my($sa_version) =
$self->sa_version;
> |+ my($sa_version) = $self->sa_version;
> | do_log(5,"calling SA parse, SA version
%s", $sa_version);
> | # *** note that $sa_version could be 3.0.1,
which is
> not really
> numeric!
> --------------------------
> File to patch:
>
>
> It seems that there is an error in the patch..
OK.. I have 'patched' the patch and applied it..
It is working fine!!!
Thanks!!!
rocsca
------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
AMaViS-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
|
|
| Re: Temporary dir |
  Slovenia |
2007-05-22 07:16:06 |
rocsca,
> And.. Is it possible to use separate directory for
.spamassassin****
> files?
Possible. SpamAssassin creates its temporary files in a
directory
pointed to by the environment variable TMPDIR if defined, or
in /tmp
otherwise. You probably have a setting like the following in
amavisd.conf:
$ENV = $TEMPBASE;
You may assign some other directory name to $ENV if
you prefer.
Mark
------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
AMaViS-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
|
|
| Re: Temporary dir |

|
2007-05-22 10:33:56 |
> > And.. Is it possible to use separate directory for
> .spamassassin****
> > files?
>
> Possible. SpamAssassin creates its temporary files in a
> directory pointed to by the environment variable TMPDIR
if
> defined, or in /tmp otherwise. You probably have a
setting
> like the following in amavisd.conf:
>
> $ENV = $TEMPBASE;
>
Infact..
> You may assign some other directory name to
$ENV if
> you prefer.
I ve done..
Thanks,
rocsca
------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
AMaViS-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
|
|
[1-9]
|
|