]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/mail.cgi
suricata: Change midstream policy to "pass-flow"
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / mail.cgi
old mode 100755 (executable)
new mode 100644 (file)
index 4ebc6b0..0ed3dfe
@@ -283,6 +283,10 @@ sub checkmailsettings {
                        $errormessage .= "$Lang::tr{'email invalid'} $Lang::tr{'email mailsender'}<br>";
                }
        }
+       # Check for a valid recipient
+       if (!&General::validemail($cgiparams{'txt_recipient'})) {
+               $errormessage .= $Lang::tr{'email recipient invalid'} . "<br>";
+       }
        return $errormessage;
 }
 
@@ -293,7 +297,7 @@ sub testmail {
                To              => $mail{'RECIPIENT'},
                #Cc             => 'some@other.com, some@more.com',
                Subject => 'IPFire Testmail',
-               Type    => 'multipart/mixed'
+               Type    => 'multipart/alternative'
        );
 
        ### Add parts (each "attach" has same arguments as "new"):
@@ -302,15 +306,6 @@ sub testmail {
                Data    => "This is the IPFire test mail."
        );
 
-       ### Add attachment for testing
-       #$msg->attach(
-       #       Type     => 'application/txt',
-       #       Encoding => 'base64',
-       #       Path     => '/var/ipfire/dma/dma.conf',
-       #       Filename => 'dma.conf',
-       #       Disposition => 'attachment'
-       #);
-
        $msg->send_by_sendmail;
 }