Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IMAP forwarder

I'm wondering what is the quickest and most reliable way to forward mail from an IMAP account.

My university does not allow our student-mailbox to forward to a private e-mail account (everybody uses either Gmail or Hotmail here). It's a political thing, not technical. We do have IMAP access to the mailbox. I would like to have a service which downloads the mail through IMAP, and forwards. And it would be nice to scale it, so thousands of students can use it. Eventually, I want to build a public signup page, and have it processed automatically from there.

So far, I've made a decent PHP script which connects, downloads headers and body parts, and ties it all together. I have two problems with that.

1) I'm downloading all kind of parts, and sticking them back together. I hope that every exotic attached file, weird encoded piece of text and every type of header survives this. I'm not even sure I have the complete header.

2) The to: e-mail address becomes the private e-mail address, not the original student e-mail address. I think this is lame, and inconvenient in searching and archiving.

Is the PHP script the way to go? Is there a trick using a particular linux mail service/daemon? Does IMAP have a 'forward' command, I'm missing?

like image 768
Gerrit Avatar asked Sep 11 '08 20:09

Gerrit


People also ask

What does an email forwarder do?

A forwarding email address automatically directs incoming messages to another email address. You'll then access your email using the other account's inbox. For example, you can create a forwarding address to automatically deliver mail sent to your professional email account to your personal email account.

What is forwarding POP IMAP?

Gmail gives you the option of activating POP and IMAP access on your account. This allows you to check and send mail using an email client like Mozilla, Thunderbird and Microsoft Outlook. You can also have Gmail forward all your mail to a specific email address.

What is an IMAP provider?

We are a global provider of secure, performance-oriented, hybrid infrastructure serving the enterprise and the digital innovators of tomorrow. We bring together an interconnected bare metal cloud, modern data center, and services on a single technology platform.

What is the IMAP method?

Internet Message Access Protocol, or IMAP, is a standard email retrieval (incoming) protocol. It stores email messages on a mail server and enables the recipient to view and manipulate them as though they were stored locally on their device(s).


1 Answers

You might want to look at Fetchmail, as this sounds like the problem it was designed to solve. Fetchmail retrieves mail from POP/IMAP/etc servers and forwards it to SMTP/LMTP/etc servers. Fetchmail has the advantage of a few years and lots of users ironing out problems with various IMAP servers.

like image 124
DGentry Avatar answered Sep 26 '22 08:09

DGentry