|
|
| ||||||
| comp.mail.sendmail Configuring and using the BSD sendmail agent. |
![]() |
| | Thread Tools |
| | #1 |
|
Posts: n/a Hébergeur: | I'm trying so send an e-mail with PHP and sendmail. The problem is that some lines in my email have more than 2040 characters. This lines are split by sendmail and ! character is inserted. Do you know if we can increase this limit of 2040 characters ? What maximum line length can be handle by sendmail ? Thanks per advance for your answers. |
|
| | #2 |
|
Posts: n/a Hébergeur: | In article <4914c1f2$0$891$ba4acef3@news.orange.fr> "Nathalie" <voisin.nat@wanadoo.fr> writes: >I'm trying so send an e-mail with PHP and sendmail. The problem is that some >lines in my email have more than 2040 characters. This lines are split by >sendmail and ! character is inserted. Do you know if we can increase this >limit of 2040 characters ? What maximum line length can be handle by >sendmail ? Sendmail can and does handle any length, it's just that since the standards forbid lines longer than 998 characters, it has to handle such non-compliant lines by folding them, or the next-hop MTA might reject the message, or truncate the lines instead of handling them, or crash... The proper fix for your problem is to send messages that follow the standards, which are designed for *text*, which never has such long lines. If your message content isn't text, you should use a proper MIME transport encoding, e.g. quoted-printable, which will fold your lines in a way that can be undone by the recipient MUA (or some other program at the recipient end). It *is* also possible to raise the "folding limit", via the L= parameter in the mailer definition, but this is a bad idea for the above reasons. The "standard" esmtp mailer has L=990 to ensure standards compliance, it is just the "relay" mailer that has L=2040, on the assumption that it will be sedning to another instance of sendmail or an equally line- length-tolerant MUA (it is used e.g. for mail forwarded to a SMART_HOST). --Per Hedeland per@hedeland.org |
|
| | #3 |
|
Posts: n/a Hébergeur: | "Per Hedeland" <per@hedeland.org> a écrit dans le message de news: gf2lf0$31l$1@hedeland.org... > In article <4914c1f2$0$891$ba4acef3@news.orange.fr> "Nathalie" > <voisin.nat@wanadoo.fr> writes: >>I'm trying so send an e-mail with PHP and sendmail. The problem is that >>some >>lines in my email have more than 2040 characters. This lines are split by >>sendmail and ! character is inserted. Do you know if we can increase this >>limit of 2040 characters ? What maximum line length can be handle by >>sendmail ? > > Sendmail can and does handle any length, it's just that since the > standards forbid lines longer than 998 characters, it has to handle such > non-compliant lines by folding them, or the next-hop MTA might reject > the message, or truncate the lines instead of handling them, or crash... > > The proper fix for your problem is to send messages that follow the > standards, which are designed for *text*, which never has such long > lines. If your message content isn't text, you should use a proper MIME > transport encoding, e.g. quoted-printable, which will fold your lines in > a way that can be undone by the recipient MUA (or some other program at > the recipient end). > > It *is* also possible to raise the "folding limit", via the L= parameter > in the mailer definition, but this is a bad idea for the above reasons. > The "standard" esmtp mailer has L=990 to ensure standards compliance, it > is just the "relay" mailer that has L=2040, on the assumption that it > will be sedning to another instance of sendmail or an equally line- > length-tolerant MUA (it is used e.g. for mail forwarded to a > SMART_HOST). > > --Per Hedeland > per@hedeland.org So the RFC 2821 and 5321 define a maximum line length : The maximum total length of a text line including the <CRLF> is 1000 octets (not counting the leading dot duplicated for transparency). This number may be increased by the use of SMTP Service Extensions. Tell if i'm right : all MTAs must handle this maximum some MTA can handle a greater maximum Is there other maximum line lenght guaranteed by all MTA ? |
|
| | #4 |
|
Posts: n/a Hébergeur: | On 11/19/08 12:05, taylorcw@gmail.com wrote: > I'm running into this issue as well. I'm using perl for example to > span a message to sendmail, how would you encode the message so that > it meets the RFC standards? You will need to enhance / alter your Perl code to output correctly formatted (from RFC (2)822's point of view) email messages to pipe them in to Sendmail. Or optionally you could write (what I call) a ""shim program that sits in between your Perl code and Sendmail to do the formatting for you. Either way, this is an issue with the Perl code and not Sendmail. Other Perl related news groups / mailing lists would be a better place to ask. Or if you would like, you can email me directly off news group and I'll give you some pointers from the code that I've hacked together. Grant. . . . |
|
| | #5 |
|
Posts: n/a Hébergeur: | taylorcw@gmail.com wrote: > > I'm running into this issue as well. I'm using perl for example to > span a message to sendmail, how would you encode the message so that > it meets the RFC standards ? Use MIME::Lite and set the transfer-encoding to quoted-printable. Ralf -- Ralf Döblitz * Schapenstraße 6 * 38104 Braunschweig * Germany Phone: +49-531-2361223 Fax: +49-531-2361224 mailto:doeblitz@doeblitz.net Homepage: http://www.escape.de/users/selene/ Mit UTF-8 kann man gleichzeitig äöüßÄÖÜæœłø‱¼½¾¤¹²³¢€£¥¶ §¬÷×±©®™¡¿ verwenden… |
|
| | #6 |
|
Posts: n/a Hébergeur: | On 2008-11-19 19:05, taylorcw@gmail.com wrote: > I'm running into this issue as well. I'm using perl for example to > span a message to sendmail, how would you encode the message so that > it meets the RFC standards ? > > Thanks For RFC 1855 , just include some text you reply to and write your reply under it. :-) /bb |
|
![]() |
| Thread Tools | |
| |