Skip to content

Commit

Permalink
Update for beta testing (#527)
Browse files Browse the repository at this point in the history
  • Loading branch information
shawniverson authored Jan 25, 2021
1 parent 4dafaa9 commit 576d702
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# Welcome to MailScanner!

December 4, 2020
January 25, 2021

MailScanner Team <https://www.mailscanner.info>

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.3.4-3
5.4.1-1
8 changes: 8 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
01/25/2020 Changes in v5.4.1-1 (beta)
==================================

- Option to ignore DAT file type check
- Fix TNEF unparse behavior and work file permissions/ownership
- Reset opts variable causing unwanted notifies
- Fix mangling of sender in pre-header (preserve first occurrence)

12/04/2020 Changes in v5.3.4-3
==================================

Expand Down
5 changes: 5 additions & 0 deletions common/etc/MailScanner/MailScanner.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1375,6 +1375,11 @@ Archives: Deny Filetypes =
Archives: Deny File MIME Types =
Archives: Filetype Rules = %etc-dir%/archives.filetype.rules.conf

# Some dat files appear as DOS executables (such as in Corel or
# Office files). This setting allows such dat files through without
# having to disable the DOS executable deny rule.
Archives: Ignore DAT File Executable = no

# In the "Filename Rules" and "Filetype Rules" rule files, you can
# say that you want particular attachment names or types to be "disarmed"
# by being renamed. See the sample files for examples of this.
Expand Down
2 changes: 2 additions & 0 deletions common/usr/share/MailScanner/perl/MailScanner/ConfigDefs.pl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
aallowfilemimetypes = ArchivesAllowFileMIMETypes
aallowfiletypes = ArchivesAllowFiletypes
adenyfilenames = ArchivesDenyFilenames
aignoredatexecutable = ArchivesIgnoreDATFileExecutable
addenvfrom = AddEnvelopeFromHeader
addenvto = AddEnvelopeToHeader
addmshmac = AddWatermark
Expand Down Expand Up @@ -310,6 +311,7 @@
SQLDebug 0 no 0 yes 1
MilterScanner 1 no 0 yes 1
MilterIgnoreLoopback 1 no 0 yes 1
aignoredatexecutable 0 no 0 yes 1
# These should be checked for dir existence
Expand Down
9 changes: 9 additions & 0 deletions common/usr/share/MailScanner/perl/MailScanner/SweepOther.pm
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,15 @@ sub CheckFileTypesRules {
while(($safename, $type) = each %$attachtypes) {
$attach = $message->{safefile2file}{$safename} || $tnefname;
next if $attach eq "" && $safename eq "";

if (MailScanner::Config::Value('aignoredatexecutable', $message) =~ /1/ && $attach =~ /[0-9a-fA-F]{4}\.dat$/) {
## Will prevent to quarantine email if MS Office/Corel
## attachment contains a .dat file
## .dat files are detected as executable in some instances
MailScanner::Log::InfoLog("Skipping archive .dat file type check (prevent wrong executable type)");
next;
}

$notypesafename = substr($safename,1);

# Find the attachment type from the 1st letter of the filename
Expand Down

0 comments on commit 576d702

Please sign in to comment.