Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #98557

Re: Getting response by email reply message

From Ian Kelly <ian.g.kelly@gmail.com>
Newsgroups comp.lang.python
Subject Re: Getting response by email reply message
Date 2015-11-09 15:30 -0700
Message-ID <mailman.189.1447108292.16136.python-list@python.org> (permalink)
References <79f2c622-e626-43ae-bcec-f85d394ce575@googlegroups.com> <20151109121529.2a3e7c03@bigbox.christie.dr>

Show all headers | View raw


On Mon, Nov 9, 2015 at 11:15 AM, Tim Chase
<python.list@tim.thechases.com> wrote:
> On 2015-11-09 08:12, zljubisic@gmail.com wrote:
>> I know how to send an email, but I would like to be able to receive
>> a reply and act accordingly. Mail reply should contain yes/no
>> answer.
>
> You have a couple options that occur to me:
>
> 1) set up an SMTP server somewhere (or use the existing one you're
> receiving this email at in the event you're getting it as mail
> rather than reading it via NNTP or a web interface) to receive the
> mail, then create a Python script to poll that inbox (usually POP3 or
> IMAP) for messages addressed.  The mails can be extracted, parsed,
> and deleted
>
> 2) similar to above, set up an SMTP server, but use server processing
> scripts (e.g. procmail scripts) to launch some script when matching
> emails are received.  It would save you from polling (reducing server
> load) and most scripting frameworks pipe the message in on stdin so
> you don't have to muck with POP3/IMAP logins.
>
> 3) write your own STMP daemon that would do listen and react when
> appropriate messages come in.
>
> In most cases, I'd expect that #2 is the easiest/best solution. The
> biggest exception being if you have a mail server that doesn't play
> well with external tools that expect stdin/stdout processing
> (coughexchangecough).

I'd agree with that provided that the SMTP server is already set up
somewhere and you're able to to just add a procmail script to it.

I wouldn't suggest trying to set up an SMTP server without a strong
reason, however. These things are surprisingly tricky to configure so
that your server doesn't get used for spam forwarding, and if you
don't play nicely with the SMTP community then you'll find your domain
and mail server getting added to various blacklists.

If you don't already have an SMTP server to use, better IMO to just
use hosted email like Gmail or Zoho. The need to poll it may be an
inconvenience, but you'll likely avoid some headaches in the long run.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Getting response by email reply message zljubisic@gmail.com - 2015-11-09 08:12 -0800
  Re: Getting response by email reply message Joel Goldstick <joel.goldstick@gmail.com> - 2015-11-09 11:21 -0500
    Re: Getting response by email reply message zljubisic@gmail.com - 2015-11-09 13:45 -0800
      Re: Getting response by email reply message Laura Creighton <lac@openend.se> - 2015-11-10 06:42 +0100
        Re: Getting response by email reply message zljubisic@gmail.com - 2015-11-09 23:09 -0800
          Re: Getting response by email reply message Laura Creighton <lac@openend.se> - 2015-11-10 11:23 +0100
          Re: Getting response by email reply message Laura Creighton <lac@openend.se> - 2015-11-10 11:37 +0100
  Re: Getting response by email reply message Tim Chase <python.list@tim.thechases.com> - 2015-11-09 12:15 -0600
    Re: Getting response by email reply message zljubisic@gmail.com - 2015-11-09 13:53 -0800
      Re: Getting response by email reply message Denis McMahon <denismfmcmahon@gmail.com> - 2015-11-09 22:14 +0000
      Re: Getting response by email reply message Tim Chase <python.list@tim.thechases.com> - 2015-11-09 16:45 -0600
  Re: Getting response by email reply message Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-09 15:30 -0700
    Re: Getting response by email reply message Marko Rauhamaa <marko@pacujo.net> - 2015-11-10 00:43 +0200
  Re: Getting response by email reply message Chris Angelico <rosuav@gmail.com> - 2015-11-10 09:37 +1100

csiph-web