Gideon N. Guillen
Thu, 18 Nov 2004 17:36:11 -0800
On Thu, 18 Nov 2004 07:30:16 -0500, Jason 'vanRijn' Kasper <[EMAIL PROTECTED]> wrote: > > btw, based on the discussions here, it seems that gmail _does_ offer the > > ability for mail-users to actually pop/imap their mails to the user's > > respective clients?? > > > > True or am I mistaken? I always thought it's web-based only like > > Yahoo/Hotmail. > > I agree--please post your script! =:) Also, it looks like gmail only offers > POP right now, correct? Is IMAP coming, does anyone know?
Well, Gmail also offers SMTP to POP users. :D If you're using Evolution 2.0.x, you probably don't need this script because according to another poster, it works on 2.0.x. Anyway, I'm posting the SMTP proxy script that I used. The user name and password for Gmail's SMTP is hard coded in the script though. -- Gideon N. Guillen [EMAIL PROTECTED] Take back the web! Download Firefox Today! http://getfirefox.com
#!/bin/env python
import smtpd, smtplib, asyncore
class GmailSMTPProxy(smtpd.SMTPServer):
def process_message(self, peer, mailfrom, rcpttos, data):
server = smtplib.SMTP('smtp.gmail.com',587)
# server.set_debuglevel(1)
server.ehlo()
server.starttls()
server.ehlo()
server.login('[EMAIL PROTECTED]', 'password')
server.sendmail(mailfrom, rcpttos, data)
server.quit()
if __name__ == '__main__':
import __main__
GmailSMTPProxy(('localhost',8025), None)
try:
asyncore.loop()
except KeyboardInterrupt:
pass