Increasing the size of message to be emailed

Help
RAMKI
2006-09-28
2013-04-09
  • RAMKI

    RAMKI - 2006-09-28

    hi

    Am using jwma with qmail.
    I would like to allow a user to email large attachments. The approach was like...
    I have created a file /var/qmail/control/databytes.
    I have added only a line 10000000.(10MB)
    and restarted the qmail server.
    Reference:http://www.qmailrocks.org/faq/?category=qmail#51

    But still am unable to send email with large attachment.(am getting error message:"Failed to receive and process uploaded files")
    Please suggest how to go about this.

    Thanks so much.
    Rk.

     
    • Leonard Sitongia

      Hi,

      Which release of Jwma are you using?  0.9.8 or the code in CVS?

      In the CVS code, and probably in 0.9.8 also, there is a limit which can be set in configuration.xml.  The element is named "transport-limit", and defaults to 2MB if not set.  This is documented at
      http://jwma.sourceforge.net/configuration/configuration.html

      ==Leonard

       
      • Leonard Sitongia

        Using the version that is in CVS, I modified the upload limit in MailTransportAgent, setting

          private int m_TransportLimit = 20480;

        and I am now able to send large files.

         
    • RAMKI

      RAMKI - 2006-09-29

      First of all, let me thank you for your time and patience for concerning my question.

      I am using JWMA 0.9.8 and am quite new to it.
      I observed in web-inf/etc/configuration.xml the following set of attributes
        <mta name="Default MTA" authenticated="true" secure="false">
          <protocol>smtp</protocol>
          <address>10.254.21.40</address>
          <port>-1</port>
        </mta>

      http://jwma.sourceforge.net/configuration/configuration.html from this link I peeped into dtw.webmail.util.config.MailTranportAgent and set the Transport limit to 8192.

      I have tried sending an attachment of 6.46Mb.
      While sending am not getting any exception. But later when I view my Inbox I dint find the mail.
      Also the mail is not in the sent items.

      When I type qmailctl queue I got this
      messages in queue 0
      messages in queue but not yet processed 0.

      Wheres the mail could have possibly gone?

       
      • Leonard Sitongia

        Check in your Drafts mailbox.  Is it there?
        ==Leonard

         
    • RAMKI

      RAMKI - 2006-10-03

      Am using Jwma0.9.8
      The messages are not in the drafts folder either. Am able to send file size less than 2Mb only.
      Am getting error "Failed to send message" or sometimes "failed to upload file"

      In jwma0.9.8 there is a configuration.xml but no element called "transport.limit". If you insist me to add this element could you please let me konw how to add it?

      PLEASE HELP!

      Ramki.

       
      • Leonard Sitongia

        Hi Ramki,

        I see the same transport-limit element in the 0.9.8 release as in the newer one.  Note that it has a dash in it, not a period.

        In the mta part of configuration.xml you should be able to set something like

          <mta name="Default MTA" authenticated="false" secure="false">
            <protocol>smtp</protocol>
            <address>localhost</address>
            <port>-1</port>
            <transport-limit>10240</transport-limit>
          </mta>

        If that doesn't work, then you can modify the sources and rebuilt it.  In MailTransportAgent.java, change

          private int m_TransportLimit=2048;
        to
          private int m_TransportLimit=10240;

        ==Leonard

         
    • RAMKI

      RAMKI - 2006-10-04

      Leonard,

      I was trying with the option private int m_TransportLimit=40960; from long time.

      I have set the size to 8190 (8Mb) and was not able to send large attachement close to 7 or 6 Mb. Later I have set the variable to 40960(40Mb) and I am able to send large attachments.

      -->
      But one thing I would like to clear it off-(PLEASE CLARIFY)- What would be the optimum size that I need to set if I want to allow user to send emails with attachments of size 8Mb.(coz thats the requirement).
      -->

      Also the user quota needs to be more than the data-transfer limit. The mail got bounced after sending a mail of size 7Mb to the user of quota 2Mb.

      Three elements needs to be modified:
      1.dtw.webmail.util.config.MailTransportAgent.java
      2./var/qmail/databytes (include a line only contains the datatransfer limit.
      3.User account.(Be it huge/triple the size of data-transfer limit.

      AND FINALLY, LEONARD THANKS A MILLION FOR BEING WITH ME TO RESOLVE THIS ISSUE.

      RAMKI.

       
    • RAMKI

      RAMKI - 2006-10-05

      The mails with large attachments are not getting saved in Sent Items????

      COULD YOU PLLEEAASSEEE HELP ME UNDERSTANDING WHY??

      ramki.

       
      • Leonard Sitongia

        That's not because of user quota?  Or, the qmail configuration?  I'm not familiar with qmail.  Are there any log messages relating to this?

        Saving the message is handled by archiveSentMail in JwmaStoreImpl.  I don't see anything in there that sets a limit.

        ==Leonard

         
    • RAMKI

      RAMKI - 2006-10-05

      I AM GETTING A java.lang.OutOfMemoryError

      while sending attachments.

      i am getting this error only on linux server where the qmail is running. when am running the same webmail application from my system (XP) am able to send mails successfully.

      What could be the reason??

      Ramki

       
      • Leonard Sitongia

        Do you run this under Tomcat?  Have you looked at the JAVA_OPTS for startup to see what your memory configuration is?  There are parameters related to this like -Xms64m -Xmx512m.  See "java -X".

        ==Leonard

         
    • RAMKI

      RAMKI - 2006-10-06

      Leonard,
      Let me share this with you..

      I have inserted the following line in startup.sh of Tomcat 4.

      export CATALINA_OPTS="-Xms256 -Xmx512"
      just before the line exec"$PRGDIR..."

      and it has worked well. Now I dont get OutOfMemoryError.

      also I suspect user quota for the messages NOT being saved in sent folder.

      I will do some r&d and find it out.

      BUT I AM STILL NOT KNOWN WITH MEMORY SETTINGS FOR A USER TO BE SET UP FOR ALLOWING HIM/HER SEND/RECIEVE/STORE MESSAGES!!!!

      Thanks a lot.

      Ramki.

       
      • Leonard Sitongia

        Hi Ramki,

        I'm happy to hear that the memory settings are working.

        I would like to limit the support provided for the older release of Jwma (0.9.8) because the code in CVS is much improved and more familiar.  Tomcat 4 is also older and less familiar.

        In the tradition of email, typing in all capital letters means that you are yelling.  I hope you're typing that for emphasis and not yelling!  :-)

        What do you mean by memory settings for a user?  Do you mean the transport limit?

        ==Leonard

         
    • RAMKI

      RAMKI - 2006-10-09

      Leonard!!
      Am not really yelling :)!
      Since I cannot format them in bold or highlight them, It is to draw more attention of reader I preferred to put them in capitals.

      I have observed dtw.webmail.JwmaSendMail.java, the following lines

      //Now send message
      message.send(session);
      //Archive message if necessary
      session.getJwmaStore().archiveSentMail(message.getMessage());

      ..signify that the message is getting saved.

      Even when the user's quota is increased by 60Meg the mail send with large attachment(ONLY) is not getting saved. Rest all mails are getting saved with normal text.

      With respect to qmail i really dont suspect there would some configuration to limit the size of sent items.
      Would be glad if you could suggest any qmail forum site for technical discussion.

      Thanks so much.

      Ramki.

       
      • Leonard Sitongia

        Hi Ramki,

        There must be some error in processing the large attachments during the save operation.  I'm sorry, but I don't have the time to troubleshoot 0.9.8.  I am working on releasing 1.0.0, which is the version in CVS.

        I'm not familiar with qmail.
        ==Leonard

         

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks