home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / mail / sendmail / 2801 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  2.5 KB

  1. Path: sparky!uunet!wupost!spool.mu.edu!agate!doc.ic.ac.uk!uknet!mcsun!sun4nl!nikhefh!e07
  2. From: e07@nikhefh.nikhef.nl (Eric Wassenaar)
  3. Newsgroups: comp.mail.sendmail
  4. Subject: Re: Limiting file size in Sendmail
  5. Message-ID: <2020@nikhefh.nikhef.nl>
  6. Date: 17 Nov 92 00:24:11 GMT
  7. References: <pnta-161192094041@134.174.142.252>
  8. Organization: Nikhef-H, Amsterdam (the Netherlands).
  9. Lines: 62
  10.  
  11. In article <pnta-161192094041@134.174.142.252>, pnta@warren.med.harvard.edu (Patrick Nta) writes:
  12. > Sorry, the previous question had a typo from me ( The missing '=' after M).
  13. > OK, this is the modified version:
  14. > Mtcp,  P=[IPC],  F=CDFMXImue,  S=11,  R=21,  E=\r\n,  M=150000, A=IPC $h
  15. > Unfortunately, it still doesn't work. I tested this option by e-mailing a
  16. > 300kbyte file through the relay.
  17.  
  18. No, this does not work because of the 'e' in the 'F=' mailer flags,
  19. which causes the mail to be queued, and delivered on a subsequent
  20. queue run. Unfortunately, during queue runs, the maximum message size
  21. is not honoured.
  22.  
  23. A couple of weeks ago I posted a fix for this in this newsgroup.
  24. This posting follows here again:
  25.  
  26. Ref:    All versions of sendmail
  27.  
  28. Problem:
  29.     If you have established a maximum message size for a particular
  30.     mailer (using the M=maxsize mailer option in sendmail.cf), this
  31.     measure can be circumvented by forcing the mail to be queued
  32.     first and to be delivered during a subsequent queue run.
  33.  
  34. Analysis:
  35.     The message size is computed during collect() and stored in
  36.     e_msgsize. It is checked against the mailer m_maxsize during
  37.     actual delivery. When the message is queued, the message size
  38.     is not saved, nor restored later, and will be zero after
  39.     readqf() during queue runs.
  40.  
  41. Fix:
  42.     Reset e_msgsize to some reasonable value during queue runs,
  43.     e.g. to the size of the data file containing the message body,
  44.     in module readqf() in queue.c.
  45.  
  46. *** queue.c.original    Mon Oct 19 14:26:56 1992
  47. --- queue.c    Mon Oct 19 14:27:42 1992
  48. ***************
  49. *** 914,921 ****
  50. --- 914,926 ----
  51.             case 'D':        /* data file name */
  52.               if (!full)
  53.                   break;
  54.               e->e_df = newstr(&buf[1]);
  55.               e->e_dfp = fopen(e->e_df, "r");
  56.               if (e->e_dfp == NULL)
  57.                   syserr("readqf: cannot open %s", e->e_df);
  58. +             {
  59. +                 struct stat st;
  60. +                 if (stat(e->e_df, &st) >= 0)
  61. +                     e->e_msgsize = st.st_size;
  62. +             }
  63.               break;
  64.  
  65. Eric Wassenaar
  66. -- 
  67. Organization: NIKHEF-H, National Institute for Nuclear and High-Energy Physics
  68. Address: Kruislaan 409, P.O. Box 41882, 1009 DB Amsterdam, the Netherlands
  69. Phone: +31 20 592 5012, Home: +31 20 6909449, Telefax: +31 20 592 5155
  70. Internet: e07@nikhef.nl
  71.