Block Attachments with Certain Extensions

Just set up a student mail server using OS X Server 10.4.4. I am wondering if there is a way to ban or block attachments that contain specific extensions from being delivered.
I am specifically targeting .mpeg, .mp3, .zip, .vbs, .exe, .vbs, .js, .rar and a few others.
I haven't found a way to do this in the Apple Mail service. Is this possible? And if so how?
Thanks for any help!

Is it viruses you are concerned of? If yes, you are far better of activating virus filtering on your server. Extension based filtering is not particularly efficient and/or safe.
If you have other reasons for blocking certain attachments you can setup header checks in postfix. See here:
http://www.postfix.org/header_checks.5.html
Bear in mind there is no "intelligence" in this method. If a user renames a file's extension to .bla it will slip through.

Similar Messages

  • Attachments with no Extensions

    We have a requirement that any emails to a specific domain with certain attachments will be required to be blocked. The problem is, most of these attachments have no file extension. Anyone have a creative way to include this into an attachment rule? I also need to add pdf, doc, xls, etc.
    Thanks

    They are pretty much text files that were created from our iSeries. They just don't have a file extension such as file2009.txt.
    Hmmm, you may be able to use a regular expression:
    if (attachment-filename == "^[^.]+$")
    That will match any filename that does not contain a dot.
    if (attachment-filename == "^[^.]+\.$")
    That will match any filename that ends with a dot.

  • [SOLVED] Delete recursively all files with certain extensions

    Hi all,
    I am trying to recursively delete files with specific extensions. Many of these files have names containing spaces. The following, that I found googling around, didn't work:
    find /media/TSUNAMI -name '*out' -or -name '*aux' -or -name '*log' -or -name '*.blg' -or -name '*.toc' -or -name '*.bcf' -or -name '*.swp' -or -name '*blx' | rm
    find /media/TSUNAMI -name '*out' -or -name '*aux' -or -name '*log' -or -name '*.blg' -or -name '*.toc' -or -name '*.bcf' -or -name '*.swp' -or -name '*blx' -type f -ok rm '{}' ';'
    find /media/TSUNAMI -name '*out' -or -name '*aux' -or -name '*log' -or -name '*.blg' -or -name '*.toc' -or -name '*.bcf' -or -name '*.swp' -or -name '*blx' -exec rm -f '{}' \;
    find /media/TSUNAMI -name '*out' -or -name '*aux' -or -name '*log' -or -name '*.blg' -or -name '*.toc' -or -name '*.bcf' -or -name '*.swp' -or -name '*blx'| xargs /bin/rm -f
    find /media/TSUNAMI -name '*out' -or -name '*aux' -or -name '*log' -or -name '*.blg' -or -name '*.toc' -or -name '*.bcf' -or -name '*.swp' -or -name '*blx' -exec /bin/rm -f '{}' \;
    find /media/TSUNAMI -name '*out' -or -name '*aux' -or -name '*log' -or -name '*.blg' -or -name '*.toc' -or -name '*.bcf' -or -name '*.swp' -or -name '*blx'| xargs -0 rm
    and I think that it was the following that deleted all the files (except the directories):
    find /media/TSUNAMI -name '*out' -or -name '*aux' -or -name '*log' -or -name '*.blg' -or -name '*.toc' -or -name '*.bcf' -or -name '*.swp' -or -name '*blx' -type f -delete
    What am I doing wrong here?
    Thanks a lot in advance.
    PS. While writing this I realized that I fogot the dot in out, aux, log, and blx
    PS2. I'm experimenting around and don't mind deleting all the files if I do a mistake
    Last edited by geo909 (2014-09-30 06:12:04)

    geo909 wrote:Thanks so much. So  what is different when we group those options with \( \)?
    The implicit "and" operator binds stronger than the "or" (-o) operator. Therefore
    | -name a -o -name b -delete |
    will be grouped like this: 
    | (-name a) -o ( -name b -delete ) | .
    You want to group it like this: 
    | ((-name a ) -o ( -name b )) ( -delete )   | ,
    so you need to add some manual grouping: 
    | ( -name a -o -name b ) -delete |
    Last edited by progandy (2014-09-30 05:52:29)

  • Cannot open attachments with .eml extension and this not listed in Firefox Applications.

    Have been receiving attachments from trusted friends that have .eml file extensions and they won't open. The Firefox Application list doesn't include this. Any idea how to open them?

    .eml files are e-mail files. You need an e-mail program to open them.
    Thunderbird is my program of choice, but there are many others (both online and stand-alone on your PC.).

  • How can I open attachments with .emi extension

    When I receive an email with an attachment that has an .emi extension, the attachment opens to show a page of signs and tags, etc. I have to download the attachment in Entourage to open it and see it correctly.

    Are you sure that the attachment file type is a supported file? Can you open the attachment on your computer?
    If the answer to both questions is yes - try quitting the mail app completely and restart the iPad.
    Go to the home screen first by tapping the home button. Quit/close open apps by double tapping the home button and the task bar will appear with all of you recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner to close the apps. Restart the iPad.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.

  • Mail hangs when I try to open emails with certain attachments

    When I try to open emails with certain attachments, rather PS files (if I recall correctly) it hangs. It seems that Mail is trying to load the PS file for me, and maybe convert it to PDF, which take awful lot of time.
    So at the moment I cannot do anything! Because even if I force quit, and start the Mail program again, it tries to open this same email again!
    My question is: How can I prevent Mail from automatically loading attachments? I would the same for images etc. I want the power to load and view attachments whenever I want them to load.

    Do you keep the message preview pane open?
    If so, close the message preview pane below the message list by double-clicking on the horizontal divider bar that separates the message list from the preview pane.
    This will require double-clicking on a message in the message list to open it. If you have the Attachments and Message Size columns selected for the message list, you can select when you want to open a message that contains a large attachment or attachments.
    If this is for a POP type account, there is no setting in Mail to prevent a message attachment from being loaded when opening the message if the message with attachment has been downloaded from the server.
    Have a look at Mail Attachments Iconizer.
    http://lokisw.com/index.php?item=MailAttachmentsIconizer

  • How to allow attachments on forms saved with Reader Extensions?

    I have a Livecycle developed form that includes action builder buttons to attach other documents.  When I re-save the form with 'Reader Extensions', the attach buttons no longer work.  Is there a way to allow this functionality?  How?
    Thanks.

    Of course. This facility is only available with Reader extension server.  You need to apply reader Extension permissions for the form and specifically , you need to add Embedded File Attachments reader extension.

  • Vendor invoices are blocked automatically with payment blck A instead of R

    There is an issue with a specific vendor.This vendor's invoices are blocked automatically with payment block A instead of
    payment block R.
    I know that invoices are blocked when posted if there is a price variance exceeding 3% and/or 100 Euro with payment block R.The invoices with payment block A are not included in the report Z1PE which is used by the Production Planning in order to monitor the blocked invoices and these invoices remain blocked for a long time until the vendor requests their payment.Could you please check why this happens?

    HI,
    Discuss with your MM Consultant, in MM there is a facility to block the invoice automatically in certain scenarios.
    Thanks & Regards,
    Shashi Kanth.

  • Error in opening draft email saved with msg extension

    I am attempting to create a email and save it on local hard disc. The email is a file having msg extension. So that it can be opened with MS Outlook. Also I want it to be in DRAFT mode. Like we can create draft email with MS Outlook. This message will have multiple attachmets.
    Thus when user opens this file, it will get opened with MS Outlook and user will be able to edit the message text, TO/CC list, attachments.
    I am using MimeMessage.writeTo(Outstream) API to save the message to a file, say C:\test.msg
    But if I double click test.msg in explorer to open it, it gives error:
    Can't open file C:\test.msg. The file may not exist, you may not have permissions to open it, or it may be open in another program.
    Is it possible to create draft Outlook email message with msg extension?
    If yes, how?
    My code:
                   Properties props = new Properties();
                   props.load(new FileInputStream("C:/email.settings.properties"));
                   // create some properties and get the default Session
                   Session session = Session.getDefaultInstance(props);
                   session.setDebug(debug);
                   // create a message
                   msg = new MimeMessage(session);
                   //Create message from saved email
                   File savedFile = new File("C:/test.msg");
                   // set the from and to address
                   InternetAddress addressFrom = new InternetAddress(from);
                   msg.setFrom(addressFrom);
                   InternetAddress[] addressTo = null;
                   addressTo = new InternetAddress[recipients.length];
                   for (int i = 0; i < recipients.length; i++) {
                        addressTo[i] = new InternetAddress(recipients);
                   msg.setRecipients(Message.RecipientType.TO, addressTo);
                   // Setting the Subject and Content Type
                   msg.setSubject(subject);
                   msg.setContent(message, "text/plain");
                   MimeBodyPart attachmentBodyPart = new MimeBodyPart();
                   DataSource ds = new FileDataSource("C:/WhichSQLServer.pdf");
                   attachmentBodyPart.setDataHandler(new DataHandler(ds));
                   attachmentBodyPart.setFileName("WhichSQLServer.pdf");
                   Multipart multipart = new MimeMultipart();
                   multipart.addBodyPart(attachmentBodyPart);
                   msg.setContent(multipart);
                   //msg.setFlag(Flags.Flag.DRAFT, true);
                   msg.getFlags().add(Flags.Flag.DRAFT);
                   msg.setFileName("test.msg");
                   msg.saveChanges();
                   FileOutputStream os = new FileOutputStream("C:/test.msg");
                   msg.writeTo(os);
                   os.flush();
                   os.close();

    Outlook Msg files aren't as easy to write as you would believe. They are a propretary format that microsoft uses based on the DocFile format that Word and Excel uses.
    If you did the MimeMessage.writeTo(out) and saved it to a .eml file Outlook Express will open it, but Outlook doesn't directly read this file type.
    I've started on a library to allow the creation of Outlook msg files, right now it only allows you to set text, dates, long, and boolean values on the email message (which means you can set stuff like the recieved date/time, subject, body, to, from, etc), but it does not yet support attachments or extra recipents (CC, BCC, etc). I'll be updating the copy on my site as soon as I get the other stuff working (which isn't as easy as it sounds).
    Priasoft has a library available that can do what you want however.
    travis (at) overwrittenstack.com

  • Attachments with Webservices -  weblogic 9.2

    Is there a standard stack available for sending attachments with SOAP ? I guess SAAJ 1.2 is partially supported by weblogic. But does this require any changes to WSDL ? SWA and SAW ref implementations as indicated in the JAX-RPC specification is resulting in errors during web service generation from WSDL
    I would like to attach a WAV file to the SOAP request and invoke the web service. I would like to know the best possible way to acheive this in the 9.2 platform. Also let me know whether the service packs have resolved certain issues in this area

    Try using a tool like tcpmon to see the actually HTTP headers and content between IE and WebLogic:
    https://tcpmon.dev.java.net/
    That might give you some clues whether there is something unique in the IE6 request or response.

  • Files with .ejb extension

    Hi,
    I am using the <javadoc> task in an Ant build file. I have several EJB files with th extension .ejb that I want to have included in my javadocs.
    I have the following code:
    <target name="javadoc" description="Build Java Documentation">
            <javadoc destdir="${doc.dir}">
                    <fileset dir="src">
                            <include name="**/*.ejb" />
                    </fileset>
            </javadoc>
    </target>However, when I run this I get the following error:
    [javadoc] javadoc: Illegal package name: "C:\src\com\test\ejb\CommandInputEJB.ejb"I do need the .ejb file extension for another tool to work (Ejbgen). Is there a way to get this working?
    Thanks in advance for any help!
    Arjan Huijzer

    Hi Arjun
    I'm still learning all of this myself with Ant, but looking at your script, it does not appear to be complete. I understand that you need to have certain tags included. The Ant task documentation gives good information, but in brief, in the list of parameters, the required options are indicated. Your script as a minimum, must include either '<b>sourcepath</b>', '<b>sourcepatheref</b>', or '<b>sourcefiles</b>' and you then must include '<d>destdir</b>' (which you already use).
    You can find the documentation here:
    http://ant.apache.org/manual/CoreTasks/javadoc.html
    I have never included external files such as the EJB ones you are using, but I have written my own script for generating JavaDoc HTML output. Feel free to use it if it helps.
    It uses an external file for the package list (sourcepath), called from the property:
    <i> <property name="JDOCSOURCELIST" value="JDOCSourceList.properties" /> </i>
    This is the same as the -sourcepath option of the standard JavaDoc docelt. It is formatted:
    <code>
    com.supersaus.server
    com.supersaus.server.factories
    \\\\S5\\Documentation\\com\\supersaus\\common\\Association.java
    \\\\S5\\Documentation\\com\\supersaus\\common\\CData.java
    </code>
    Other properties used in the script are:
    <code>
    <property name="JDOCDIRECTORY" value="JavaDocOutput" />
    <property name="SOURCECODEROOT" value="\\\\S5\\Documentation" />
    <property name="STYLESHEET" value="./stylesheet.css" />
    <property name="BOTTOM" value="Supersaus 2004" />
    <property name="DOCTITLE" value="Supersaus Common Files" />
    <property name="LINK" value="http://java.sun.com/j2se/1.4.2/docs/api" />
    <property name="OVERVIEW" value="doc-files\\Saus_Overview.htm" />
    </code>
    The main ant target is built up as follows:
    <code>
    <!-- Generate the JavaDoc HTML. -->
    <target name="BuildJavaDoc">
    <splash/> <!-- Add Ant progress bar -->
    <echo message="Please wait whilst the document is generated into the folder ${JDOCDIRECTORY}" />
         <!-- call javadoc -->
         <javadoc destdir="${JDOCDIRECTORY}"
         sourcePath="${SOURCECODEROOT}"
              packageList="${JDOCSOURCELIST}"
              maxmemory="180M"
              stylesheetfile="${STYLESHEET}"
              bottom="${BOTTOM}"
              Doctitle="${DOCTITLE}"
              Windowtitle="${DOCTITLE}"
              Overview="${OVERVIEW}" >
              <Link href="${LINK}"/>
         </javadoc>
    </target>
    </code>
    Hope all this helps?
    Best wishes and good luck
    Supersaus

  • Files with .a extension using ftp transport

    Hi.
    Am using ftp adapter in osb to read .txt files(e.g. abcd.txt) from ftp location, process the body/text() in OSB and then place the incoming file to an outbound folder.
    the flow is like ftp-> Proxy Service->Business Service->outbound ftp
    the service works fine where then is less load or the no. of incoming files is less.
    However,sometimes the outbound folder contains the files with .a extension at the end.(e.g. abcd.txt.a)
    Can someone tell me the rootcause of these .a file creation and the scenarios in which the .a files are created.
    Also,please tell me what are these .a files meant for?
    How,can I eliminate this while configuring the services using ftp transport.
    Thanks in adavance

    I had this recently with a variety of FTP servers, FileZilla, Microsoft etc.
    For me, it happened when the file already exists in the destination and I was expecting the destination file to be overwritten. My application would generate the same filename, say FileA.txt and expect that to be overwritten, but with OSB 10gR3 I would get files with .a stuck on the end.
    This functionality changed between ALSB and OSB and I had a patch developed to restore the ALSB functionality.
    I spent ages looking at it, and debugging FTP commands and going from memory, I'm pretty certain that the FTP adapter doesn't implement the correct FTP spec for the RNFR command according to the RFC in the case where a file already exists - it doesn't handle overwrite.
    Hope that may help.
    Pete

  • Sending attachments with emails in Javamail

    I'm trying to send attachments with emails using Javamail. Following is the code through which I'm trying to achieve that. It works as expected on a JRE1.6 environment. But on JRE1.5, the content of the file gets added to the mail body as text.I want the file to be sent as an attachment.
    Any pointers on the observed difference in behavior would be highly appreciated!
    String msgText = mailInfo.getMessage();
            String attachmentFileName = mailInfo.getFileName();
            MimeBodyPart mimeBodyPart = new MimeBodyPart();
            mimeBodyPart.setText(msgText);
            // create the second message part
            MimeBodyPart attachmentBodyPart = new MimeBodyPart();
            // attach the file to the message
            FileDataSource fileDataSource = new FileDataSource(attachmentFileName);
            attachmentBodyPart.setFileName(fileDataSource.getName());
            attachmentBodyPart.setDataHandler(new DataHandler(fileDataSource));
            // create the Multipart and add its parts to it
            Multipart multipart = new MimeMultipart();
            multipart.addBodyPart(mimeBodyPart);
            multipart.addBodyPart(attachmentBodyPart);
            message.setContent(multipart);The email in case of JRE1.5 is as follows
    {color:#0000ff}------=_Part_0_33189144.1233078680250
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    Hi...Test Mail
    ------=_Part_0_33189144.1233078680250
    Content-Type: application/octet-stream; name=corba_architecture.pdf
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment; filename=corba_architecture.pdf
    Content-ID: Attachment
    JVBERi0xLjIgDSXi48/TDQogDTggMCBvYmoNPDwNL0xlbmd0aCA5IDAgUg0vRmlsdGVyIC9GbGF0
    ZURlY29kZSANPj4Nc3RyZWFtDQpIiUWPW07DMBBFV+A93E9QlWBP/Kj5awt8USFRbyBKnTQIkshK
    YfvYcQoaybrSzDkzFhCxQgemeWkUyKTXEIeSHMGjZXvHSFBJCpXUpQLcE+NIlbCHFw4pUxeuZQUv
    ueY25gYxk9mKmH9wtwvNpZ99M1+jc2wxXzxweHvf73AP9xGFhaIsTyC3/w6ZDYfxaxoHP8w4jmf/
    ------=_Part_0_33189144.1233078680250-- {color}

    Following is the debug trace obtained on running the program on 1.5.
    +12:45:57,218 INFO [MailerThread] EmailManager:306 - Sending message {toAddress [email protected],+
    +replyTo =null,+
    +cc =null,+
    +message =Hi...Test Mail,+
    +subject =test mail,+
    +contentType =null fileName =C:\docs\cbe\dist computing\A.txt }+
    Loading javamail.default.providers from jar:file:/C:/docs/cbe/lib/mail-1.4.jar!/META-INF/javamail.default.providers
    DEBUG: loading new provider protocol=imap, className=com.sun.mail.imap.IMAPStore, vendor=Sun Microsystems, Inc, version=null
    DEBUG: loading new provider protocol=imaps, className=com.sun.mail.imap.IMAPSSLStore, vendor=Sun Microsystems, Inc, version=null
    DEBUG: loading new provider protocol=smtp, className=com.sun.mail.smtp.SMTPTransport, vendor=Sun Microsystems, Inc, version=null
    DEBUG: loading new provider protocol=smtps, className=com.sun.mail.smtp.SMTPSSLTransport, vendor=Sun Microsystems, Inc, version=null
    DEBUG: loading new provider protocol=pop3, className=com.sun.mail.pop3.POP3Store, vendor=Sun Microsystems, Inc, version=null
    DEBUG: loading new provider protocol=pop3s, className=com.sun.mail.pop3.POP3SSLStore, vendor=Sun Microsystems, Inc, version=null
    DEBUG: getProvider() returning provider protocol=smtp; type=javax.mail.Provider$Type@77eaf8; class=com.sun.mail.smtp.SMTPTransport; vendor=Sun Microsystems, Inc
    DEBUG SMTP: useEhlo true, useAuth false
    DEBUG SMTP: trying to connect to host "10.16.68.131", port 25, isSSL false
    +220 mailhost5.vmware.com ESMTP Postfix (mailhost5)+
    DEBUG SMTP: connected to host "10.16.68.131", port: 25
    EHLO sbanerjee
    +250-mailhost5.vmware.com+
    +250-PIPELINING+
    +250-SIZE 26800000+
    +250-VRFY+
    +250-ETRN+
    +250-ENHANCEDSTATUSCODES+
    +250-8BITMIME+
    +250 DSN+
    DEBUG SMTP: Found extension "PIPELINING", arg ""
    DEBUG SMTP: Found extension "SIZE", arg "26800000"
    DEBUG SMTP: Found extension "VRFY", arg ""
    DEBUG SMTP: Found extension "ETRN", arg ""
    DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
    DEBUG SMTP: Found extension "8BITMIME", arg ""
    DEBUG SMTP: Found extension "DSN", arg ""
    DEBUG SMTP: use8bit false
    MAIL FROM:<[email protected]>
    +250 2.1.0 Ok+
    RCPT TO:<[email protected]>
    +250 2.1.5 Ok+
    DEBUG SMTP: Verified Addresses
    DEBUG SMTP:   [email protected]
    DATA
    +354 End data with <CR><LF>.<CR><LF>+
    ------=_Part_0_3278348.1233126957281
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    Hi...Test Mail
    ------=_Part_0_3278348.1233126957281
    Content-Type: text/plain; charset=us-ascii; name=A.txt
    Content-Transfer-Encoding: 7bit
    Content-Disposition: attachment; filename=A.txt
    Content-ID: Attachment
    adasdasdd
    ------=_Part_0_3278348.1233126957281--
    +.+
    +250 2.0.0 Ok: queued as 5BE5BDC100+
    +12:45:59,125 INFO [MailerThread] EmailManager:331 - Message {toAddress [email protected],+
    +replyTo =null,+
    +cc =null,+
    +message =Hi...Test Mail,+
    +subject =test mail,+
    +contentType =null fileName =C:\docs\cbe\dist computing\A.txt } sent to the SMTP server successfully+

  • Add attachments with Reader

    Hello,
    I am not being able to create a pdf that allows file attachments with Adobe Reader. With Adobe Acrobat Pro I have no issues but in Reader the option is grayed out. After enabling reader extended options I get the same result.
    I've made some searches online and I cant figure out what im doing wrong.
    Any ideas?
    Thanks!

    Yes you need the server-based Reader Extensions.
    If your organization doesn't have any of the server products though then your help desk won't be able to do much.
    And depending on how big your organization is they may not want to buy it as it is rather expensive.

  • How can I restrict a vendor with certain value limit?

    Hi Gururs,
    How can I restrict a vendor with certain value limit?.
    Scenario is like this
    If my company was decided to purchase goods from a particular vendor upto Rs.1000, if cross the rs.1000 limit don't allow the Posting the PO and get the Message as warning/error.
    Give the configuration setting's and T.codes
    Thanks and regards
    G.N.Rao

    Hi
    Go to T.Code oms4 and then select the material status BP (Blocked for purchasing)
    Click on Details
    In that under Purchasing select the option A= Warning or B=Error
    Click on Save
    Thus by doing this no further purchasing function for that material can be done. So the PO can not be issued
    So as and when the value limit reaches see that purchasing option is blocked
    So no further PO are generated in the future
    I hope this helps you out
    If found useful reward accordingly
    Thanks
    pavan

Maybe you are looking for

  • Attachment in CJ20N

    Dear All I have problem in TCODE CJ20N. I'm attachment file in project, but after i don't read this file. Already check permission in Operation System and they are ok. Some clue? Regards

  • Wine and xrandr

    I'm trying to run some games with wine, but everyone shows the same problem when I try to run it in fullscreen. For instance if I run Starcraft or Fallout 2, terminal says: fixme:advapi:SetSecurityInfo stub fixme:win:EnumDisplayDevicesW ((null),0,0x3

  • Redirect to the jsp page after user authenticated successfully  …

    Here is the requirement … I’m using “JAAS – Custom Login Module” for user authentication. I have few questions in Portal Logon process … 1. Exactly at what point I can conclude that the user has been authenticated successfully, because I have to redi

  • Safari Unable to Connect with Gmail Server?

    I tried to log into Gmail this morning. The top of the page shows, "Redirecting" and then I get an error message of: Safari can't connect to the server. Safari can't open the page "http://mail.google.com/mail/?zx=1f097o2n9gp73&zx=1kh3f7h1am1kh&zx=1cs

  • Can I insert a page break but carry on on the same page?

    I need to insert a section break in order to have the footnoting restart again, but I don't want any blank space. I want to insert a single footnote using an asterix that relates to the first footnote entry but then restart the footnoting using numbe