SMTP Server Response 451 - TCP-IP

This is a discussion on SMTP Server Response 451 - TCP-IP ; As part of an academic project, I'm implementing my own basic SMTP server in C++ on Linux. So far I've made good progress: it supports all the basic commands, and successfully delivers mail to other hosts. However, I've run into ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: SMTP Server Response 451

  1. SMTP Server Response 451

    As part of an academic project, I'm implementing my own basic SMTP
    server in C++ on Linux. So far I've made good progress: it supports
    all the basic commands, and successfully delivers mail to other
    hosts. However, I've run into one major problem. When I try to send
    a file with an attachment to another host, the remote host responds
    with a 451 error code.

    My test case is: I send a small JPEG file (4K) to google's SMTP server
    (gmail). The client/server conversation goes fine until my SMTP
    program sends the DATA command to google. At this point, google's
    SMTP server replies with error 451.

    Note that this ONLY happens with attachments. If I send a message
    without an attachment, it works fine. Naturally, I thought the
    problem had something to do with encoding, but gmail's SMTP server
    supports 8BITMIME, so I don't understand the problem. Are there any
    obvious problems that might be causing this? I'll post code if
    necessary.


  2. Re: SMTP Server Response 451

    In article <1180291579.041000.196560@w5g2000hsg.googlegroups.c om>,
    chsalvia@gmail.com wrote:

    > As part of an academic project, I'm implementing my own basic SMTP
    > server in C++ on Linux. So far I've made good progress: it supports
    > all the basic commands, and successfully delivers mail to other
    > hosts. However, I've run into one major problem. When I try to send
    > a file with an attachment to another host, the remote host responds
    > with a 451 error code.
    >
    > My test case is: I send a small JPEG file (4K) to google's SMTP server
    > (gmail). The client/server conversation goes fine until my SMTP
    > program sends the DATA command to google. At this point, google's
    > SMTP server replies with error 451.
    >
    > Note that this ONLY happens with attachments. If I send a message
    > without an attachment, it works fine. Naturally, I thought the
    > problem had something to do with encoding, but gmail's SMTP server
    > supports 8BITMIME, so I don't understand the problem. Are there any
    > obvious problems that might be causing this? I'll post code if
    > necessary.


    Is there an error message sent along with the 451 code?

    --
    Barry Margolin, barmar@alum.mit.edu
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
    *** PLEASE don't copy me on replies, I'll read them in the group ***

  3. Re: SMTP Server Response 451

    I'm sorry. It seems the 451 error code was a red herring. What
    happens now is that google's mail server simply fails to respond at
    all, after I submit the DATA.

    I send the DATA command, and receive the 354 response code. So far so
    good. But then I send the actual data, and gmail's SMTP server
    doesn't respond at all. It simply waits forever, even though the data
    I send is terminated with a . as specified by the
    standard. Also, this only seems to happen with attachments. If I
    don't send an attachment, it works fine.

    I thought maybe there was some pre-processing necessary before sending
    the attachment - but gmail says it supports 8BITMIME.


  4. Re: SMTP Server Response 451

    In article <1180325119.755487.93520@h2g2000hsg.googlegroups.co m>,
    wrote:

    >I send the DATA command, and receive the 354 response code. So far so
    >good. But then I send the actual data, and gmail's SMTP server
    >doesn't respond at all. It simply waits forever, even though the data
    >I send is terminated with a . as specified by the
    >standard. Also, this only seems to happen with attachments. If I
    >don't send an attachment, it works fine.
    >
    >I thought maybe there was some pre-processing necessary before sending
    >the attachment - but gmail says it supports 8BITMIME.


    Have you tried other SMTP server implementations such as sendmail
    or postfix running on your own computer? I would not try to connect
    my own SMTP or most other applications to other people's computers
    without first thoroughly debugging it on a private local network
    with de facto standard peers.

    Have you tried the command `telnet x.y.z.w 25` for x.y.z.w one of
    the gmail.com MX IP addresses, and then typing something like what
    you think your SMTP client does?


    Vernon Schryver vjs@rhyolite.com

+ Reply to Thread