@@ -1182,7 +1182,15 @@ def install(self, packages=[], apt_packages=[], disp_msg=True):
11821182 "Adminer" ]]
11831183
11841184 if self .app .pargs .mailscanner :
1185- apt_packages = (apt_packages + EEVariables .ee_mailscanner )
1185+ if not EEAptGet .is_installed (self , 'amavisd-new' ):
1186+ if (EEAptGet .is_installed (self , 'dovecot-core' ) or
1187+ self .app .pargs .mail ):
1188+ apt_packages = (apt_packages +
1189+ EEVariables .ee_mailscanner )
1190+ else :
1191+ Log .error (self , "Failed to find installed Dovecot" )
1192+ else :
1193+ Log .error (self , "Mail scanner allready installed" )
11861194
11871195 if self .app .pargs .utils :
11881196 Log .debug (self , "Setting packages variable for utils" )
@@ -1266,7 +1274,8 @@ def remove(self):
12661274 (not self .app .pargs .php ) and (not self .app .pargs .mysql ) and
12671275 (not self .app .pargs .postfix ) and (not self .app .pargs .wpcli ) and
12681276 (not self .app .pargs .phpmyadmin ) and
1269- (not self .app .pargs .adminer ) and (not self .app .pargs .utils )):
1277+ (not self .app .pargs .adminer ) and (not self .app .pargs .utils ) and
1278+ (not self .app .pargs .mailscanner )):
12701279 self .app .pargs .web = True
12711280
12721281 if self .app .pargs .web :
@@ -1354,7 +1363,8 @@ def purge(self):
13541363 (not self .app .pargs .php ) and (not self .app .pargs .mysql ) and
13551364 (not self .app .pargs .postfix ) and (not self .app .pargs .wpcli ) and
13561365 (not self .app .pargs .phpmyadmin ) and
1357- (not self .app .pargs .adminer ) and (not self .app .pargs .utils )):
1366+ (not self .app .pargs .adminer ) and (not self .app .pargs .utils ) and
1367+ (not self .app .pargs .mailscanner )):
13581368 self .app .pargs .web = True
13591369
13601370 if self .app .pargs .web :
0 commit comments