gryphon has asked for the wisdom of the Perl Monks concerning the following question:

Greetings fellow monks,

I've just recently run into a rather annoying situation. I've been using Juno for modem connectivity from home over the last 6 months. Riding on this connection, I'd use one of a variety of POP3/SMTP email clients to read and send email. While there were several really annoying "issues" with this troublesome Internet access solution, it worked (most of the time) and was really inexpensive. However, just yesterday (give or take) the "wise" folks at Juno decided to cut off SMTP throughput. I can grab my mail with POP3 as usual, and Web surfing is just a "fast" as ever. However, I can't send any email.

My first thought was to switch to a different provider, but I can't find anything out there that's as cheap/free and provides SMTP thoughput. So here's my thought:

I'll write an SMTP server for my local machine (running Windows) and point my local email client to that local SMTP server. That server will accept the outgoing email, translate it to a port 80 request out to my Web site where a CGI (in Perl) will accept the data. That CGI will then pipe the data into sendmail from there.

Here's my series of questions:

Thanks.

-gryphon
code('Perl') || die;

Replies are listed 'Best First'.
Re: SMTP Bypass/Proxy (a.k.a. Juno sucks)
by BazB (Priest) on Jan 23, 2002 at 00:06 UTC

    OK, quick 'n dirty opinions on your questions:

    • Is this a stupid idea?
    • Great _idea_, but it's likely to be a nightmare in practice. I just don't want to think about the scope for abuse if the implementation isn't rock solid (even then...)
    • What are the pros/cons to this idea?
    • Pros:
      Erm...

      Cons:
      You suddenly find that your account is being used to spam everyone and their dog.
      Update: Who knows what sort of wierdness proxies and oddities in your system will introduce to the situation!
      SMTP has been around for a long time, and does the job reasonably well.
    • Is there an easier way?
    • Find a webhost that has shell access and SSH port forwarding available - forward everything over an SSH tunnel to your webhost's SMTP port - send the mail that way.
      I actually do this to bypass my ISP's broken mail-relaying and solve a few other headaches in the process.

    • Is this a common problem for others?
    • Not this exact problem, but as mentioned above, I've had hassles with the way my ISP catches all traffic destined for port 25 (mail/SMTP) and tries to relay it for you.
    • Any suggestions?
    • Avoid it if you can.
      I'd probably make a great proof-of-concept project, but I wouldn't like to trust it in production or on an internet-exposed site.

    Sorry to be so negative, YMMV :-)
    I'm actually quite interested to see what code or suggestions everyone else has on this.

    BazB

Re: SMTP Bypass/Proxy (a.k.a. Juno sucks)
by moodster (Hermit) on Jan 23, 2002 at 00:00 UTC
    You'll have to be really, Really, REALLY careful with the CGI script and have some way to make sure that you are the only one who's allowed to relay mail. Otherwise it'll be an open relay just waiting to be abused. Since your workstation is on a modem connection I imagine that you get a new IP assigned every time you log on, so you've got to figure out another way to restrict access than checking the address of the client.

    Anyway, good luck. (Personally, I'd consider getting a web mail account or similar and do without all the hassle)

    Cheers,
    -- moodster

Re: SMTP Bypass/Proxy (a.k.a. Juno sucks)
by gryphon (Abbot) on Jan 22, 2002 at 23:59 UTC

    Greetings again,

    There may be someone out there who's thinking, "Why doesn't he just use a Web-base email client system?" Good question. There are a lot of good clients available, some written in Perl. I'm leaning towards that as a viable option, however, I don't like the unavoidable lag between actions.

    -gryphon
    code('Perl') || die;

Re: SMTP Bypass/Proxy (a.k.a. Juno sucks)
by boo_radley (Parson) on Jan 23, 2002 at 00:51 UTC
    I can't find anything out there that's as cheap/free and provides SMTP thoughput


    Ask jcwren for a perlmonk account.
Re: SMTP Bypass/Proxy (a.k.a. Juno sucks)
by kjherron (Pilgrim) on Jan 23, 2002 at 04:17 UTC
    Sorry to suggest a non-perl solution, but given that you have a web server capable of supporting an SMTP server, here's a simpler possibility:

    Juno is no doubt just filtering port 25. You can set sendmail to listen on some other port which isn't filtered by Juno, then set your email client to connect to that port instead of the standard SMTP port.

    In fact, port 587 has been designated as the standard port for this kind of operation (see RFC 2476). You should find some mention of the "message submission protocol" in the sendmail documentation.

Re: SMTP Bypass/Proxy (a.k.a. Juno sucks)
by cfreak (Chaplain) on Jan 23, 2002 at 03:57 UTC

    Ummm... why not just switch providers. Acually I guess the question is, how cheap is cheap? Where I live Juno/Netzero uses local providers for their access numbers and connectivity. Most local providers will sell you dial in anywhere from $10 - $20 a month. What is wrong with that?

    Also it could be whoever owns the SMTP server you were using has denied relaying. Most SMTP servers do this now. IE you have to be in their IP range to use the server...

    I don't know if that helps or not maybe I'm misunderstanding the problem

Re: SMTP Bypass/Proxy (a.k.a. Juno sucks)
by Anonymous Monk on Jan 23, 2002 at 03:40 UTC
    Can't you just use Juno's SMTP servers? Or have they restricted SMTP traffic out of their network *and* taken down SMTP servers?