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