none
ForeFront Online Protection for Exchange RRS feed

  • Question

  • Is their any way to block Java, c++, VB languages base codes in outbound emails, i tried to make dictionaries and try to block it through policies but it doesn't work for me.
    Tuesday, March 19, 2013 12:48 PM

All replies

  • Hi,

    this should be possible by blocking the extensions.

    Check the follwing article how to block file extensions: (Reject messages containing a specific filename)

    http://technet.microsoft.com/en-us/library/ff715218.aspx

    Greetings

    Christian


    Christian Groebner MVP Forefront

    Tuesday, March 19, 2013 2:44 PM
  • you are right and i tried to make the policies in that way you have mentioned but unfortunately it doesn't work i am giving you the syntax may it help you understand what i need.

    import javax.swing.KeyStroke;

    public class Calculator extends JFrame implements ActionListener{
                // Variables
                final int MAX_INPUT_LENGTH = 20;
                final int INPUT_MODE = 0;
                final int RESULT_MODE = 1;
                final int ERROR_MODE = 2;
                int displayMode;

                boolean clearOnNextDigit, percent;
                double lastNumber;
                String lastOperator;

                private JMenu jmenuFile, jmenuHelp, jmenuTest;
                private JMenuItem jmenuitemExit, jmenuitemAbout, jmenuitemMytest;
                
                private JLabel jlbOutput;
                private JButton jbnButtons[];
                private JPanel jplMaster, jplBackSpace, jplControl;
                
                /*
                 * Font(String name, int style, int size)
          Creates a new Font from the specified name, style and point size.
                 */
                
                Font f12 = new Font("Times New Roman", 0, 12);
                Font f121 = new Font("Times New Roman", 1, 12);
                
                // Constructor
                public Calculator()
                {
                            /* Set Up the JMenuBar.
                             * Have Provided All JMenu's with Mnemonics
                             * Have Provided some JMenuItem components with Keyboard Accelerators
                             */
                            
                            jmenuFile = new JMenu("File");
                            jmenuFile.setFont(f121);
                            jmenuFile.setMnemonic(KeyEvent.VK_F);
                            
                            jmenuitemExit = new JMenuItem("Exit");
                            jmenuitemExit.setFont(f12);
                
                            jmenuitemMytest.setFont(f12);
                            jmenuTest.add(jmenuitemMytest);

                            
                            JMenuBar mb = new JMenuBar();
                            mb.add(jmenuFile);
                            mb.add(jmenuHelp);
                            mb.add(jmenuTest);
                            setJMenuBar(mb);
                            
                            //Set frame layout manager

                            setBackground(Color.gray);

                            jplMaster = new JPanel();

                            jlbOutput = new JLabel("0");
                            jlbOutput.setHorizontalTextPosition(JLabel.RIGHT);
                            jlbOutput.setBackground(Color.WHITE);
                            jlbOutput.setOpaque(true);
                            
                            // Add components to frame
                            getContentPane().add(jlbOutput, BorderLayout.NORTH);

                            jbnButtons = new JButton[23];
    //                     GridLayout(int rows, int cols, int hgap, int vgap)

                            JPanel jplButtons = new JPanel();                               // container for Jbuttons

                            // Create numeric Jbuttons
                            for (int i=0; i<=9; i++)
                            {
                                        // set each Jbutton label to the value of index
                                        jbnButtons[i] = new JButton(String.valueOf(i));
                            }

                            // Create operator Jbuttons
                            jbnButtons[10] = new JButton("+/-");
                            jbnButtons[11] = new JButton(".");
                            jbnButtons[12] = new JButton("=");
                            jbnButtons[13] = new JButton("/");
                            jbnButtons[14] = new JButton("*");
                            jbnButtons[15] = new JButton("-");
                            jbnButtons[16] = new JButton("+");
                            jbnButtons[17] = new JButton("sqrt");
                            jbnButtons[18] = new JButton("1/x");
                
                            jplButtons.add(jbnButtons[18]);

                            // Third row
                            for( int i=1; i<=3; i++)
                            {
                                        jplButtons.add(jbnButtons[i]);
                            }
                            
                            //adds button - and %
                            jplButtons.add(jbnButtons[15]);
                            jplButtons.add(jbnButtons[19]);
                            
                            //Fourth Row
                            // add 0, +/-, ., +, and =
                            jplButtons.add(jbnButtons[0]);
                            jplButtons.add(jbnButtons[10]);
                            jplButtons.add(jbnButtons[11]);
                            jplButtons.add(jbnButtons[16]);
                            jplButtons.add(jbnButtons[12]);
                            
                            jplMaster.setLayout(new BorderLayout());
                            jplMaster.add(jplBackSpace, BorderLayout.WEST);
                            jplMaster.add(jplControl, BorderLayout.EAST);
                            jplMaster.add(jplButtons, BorderLayout.SOUTH);

                            // Add components to frame
                            getContentPane().add(jplMaster, BorderLayout.SOUTH);
                            requestFocus();
                            
                            //activate ActionListener
                            for (int i=0; i<jbnButtons.length; i++){
                                        jbnButtons[i].addActionListener(this);
                            }
                            
                            jmenuitemAbout.addActionListener(this);
                            jmenuitemExit.addActionListener(this);

                            clearAll();

                            //add WindowListener for closing frame and ending program
                            addWindowListener(new WindowAdapter() {

                                                    public void windowClosed(WindowEvent e)
                                                    {
                                                                System.exit(0);
                                                    }
                                        }
                            );
                            this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                }           //End of Contructor Calculator

                // Perform action
                public void actionPerformed(ActionEvent e){
                            double result = 0;
                   
                            if(e.getSource() == jmenuitemAbout){
                                        JDialog dlgAbout = new CustomABOUTDialog(this, "About Java Swing Calculator", true);
                                        dlgAbout.setVisible(true);
                            }else if(e.getSource() == jmenuitemExit){
                                        System.out.println(e.getSource());
                                        System.exit(0);
                            }else if(e.getSource() == jmenuitemMytest){
                                        JDialog dlgAbout = new CustomABOUTDialog(this, "Testing Java Swing Calculator", true);
                                        dlgAbout.setVisible(true);
                  

    Wednesday, March 20, 2013 5:36 AM
  • Hi,

    where is the javascript located? Is is inside the e-mail body or an attachment?

    Greetings

    Christian


    Christian Groebner MVP Forefront

    Wednesday, March 20, 2013 5:23 PM
  • some time may be user put it in body, sometime they try to make it as attachment.  we want to avoid to send codes by our user to outside through emails.
    Thursday, March 21, 2013 8:54 AM
  • Hi,

    you could do it with file and keyword filter. As far as I know java uses as extension .jar so if you block this extension it will be blocked.

    If the code is inside the body you could create a keyword filter that blocks e.g. "public class". If these words will be found in the body the mail will be blocked.

    Greetings

    Christian


    Christian Groebner MVP Forefront

    Thursday, March 21, 2013 9:37 AM
  • You are right i have tried it meet some of my requirement but it also blocked my legitimate emails as well.
    Friday, March 22, 2013 6:42 AM
  • Pardon the necro-post, but this link isn't available anymore. I want to block .vhd and .vhdx files from making it through, but I can't find a way to add them to the "Common Attachment Types" filter in Anti-malware.

    I also tried using a rule but the one for attachment's content seems to be concerned with what's inside the attachment rather than the name of the attachment.

    Any ideas?

    Tuesday, October 15, 2019 4:14 PM