3 ms·
It's not much of a trick and it certainly isn't very complex. fetchmailrc: poll pop.gmail.com with proto pop3 port 995 user "user@mydomain.com
by snprbob86 17y ago
It's not much of a trick and it certainly isn't very complex.
fetchmailrc:
poll pop.gmail.com with
proto pop3
port 995
user "user@mydomain.com"
password "pa$$w0rd"
no rewrite
ssl
mda "procmail -f %F"
procmailrc:
LOGFILE=$HOME/log/procmail.log
# Process the mail and let the application do its own logging.
:0
| python2.5 $HOME/procmail.py
# Alert the admins of any failures and keep a copy of the failed message.
:0 c
| python2.5 $HOME/alertfailure.py
Then start fetchmail to run every 10 seconds or so:
fetchmail -d 10
- sho 17y agoOops, sorry, I actually removed that bit since I thought I sounded like a douchebag. Serves me right for using "edit" to change my "drafts". Thanks for the explanation, that's simpler than I imagined. But you had said IMAP, which is way more fiddly than pop3, since you'd be holding open connections and all that stuff, so I was envisaging having to run long-running processes, etc, which can be a headache in itself. Is gmail really happy with you polling a POP server every 10 seconds all day every day?
- snprbob86 17y agoI meant pop. Oops myself :-) Honestly, I haven't the slightest clue if Gmail minds the polling. I assumed that by the time we had enough mail traffic for it to be a problem, we'd be prepared to migrate to something like Lamson. Release early/often and all that jazz :-)
- sho 17y agoHm, interesting. I hadn't even thought to use pop like that because I just assumed the admins or their automated scripts would get annoyed and block me. Yeah, good approach. Just do the simplest thing that could possibly work; upgrade if and when you need to. I should perhaps tattoo that somewhere since it never seems to sink in : /