summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/maildaemon.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/maildaemon.php b/scripts/maildaemon.php
index 3f5402bec..a4003b6b2 100755
--- a/scripts/maildaemon.php
+++ b/scripts/maildaemon.php
@@ -318,9 +318,12 @@ class MailerDaemon
&& $parsed->ctype_secondary=='plain') {
$msg = $parsed->body;
}else if(!empty($parsed->body)){
- $attachment = tmpfile();
- fwrite($attachment, $parsed->body);
- $attachments[] = $attachment;
+ if(common_config('attachments', 'uploads')){
+ //only save attachments if uploads are enabled
+ $attachment = tmpfile();
+ fwrite($attachment, $parsed->body);
+ $attachments[] = $attachment;
+ }
}
}