You are not logged in.
Pages: 1
Hi,
My school does not provide POP access, so I can't use Gmail fetcher to grab the mail outright. Also, they run Exchange Server (eek!). And for some reason, the forwarding rules I tried in Exchange Server do not forward my email from my school email address to my Gmail account. My workaround is to use fetchmail on my home server to pull the IMAP mail down from school and then forward it to my Gmail account.
Only problem is I have no idea how to do this. Can anyone help or advise me of a better solution?
Thanks,
print
Last edited by print (2007-09-17 20:32:05)
% whereis whatis whence which whoami whois who
Offline
~/.fetchmailrc:
set daemon 600
defaults proto imap ssl mda "/usr/bin/procmail"
fetchall
poll mail.server.edu username "user" password "pass
Offline
Thanks,
I found a good page about procmail:
If you want to forward all messages to another address
:0 c ! your_id@your.other.address.ca
In this example there are no conditions, meaning that this action will be performed on every mail message. Since all procmail commands are executed in order this will forward all mail (without filtering it) to You@YourAddress if it is the first command in .procmailrc or it will only forward your filtered messages if it the last command in .procmailrc
I was hoping to avoid running a full-blown MTA like qmail, which I used to have installed on Gentoo... and it was just too complicated for my primate brain,
http://ugweb.cs.ualberta.ca/howtos/procmail.html
If all I want to do is forward untouched and unexamined, then do I even need procmail?
Thanks,
print
% whereis whatis whence which whoami whois who
Offline
If all I want to do is forward untouched and unexamined, then do I even need procmail?
Yes. fetchmail requires either an MTA (eg, postfix, qmail, sendmail, etc) listening on local port 25 or an MDA (eg, procmail) to deliver locally.
To cause procmail to deliver all mail to a local folder, ~/.procmailrc:
PATH=/bin:/usr/bin:/usr/local/bin
SHELL=/bin/bash
VERBOSE=off
MAILDIR=$HOME/.maildir
DEFAULT=$MAILDIR/
LOGFILE=$HOME/.procmail.log
:0:
$DEFAULT
(Yeah, the decomposition into MAILDIR and DEFAULT isn't strictly necessary, but it'll provide a good starting point should you decide to make your delivery rules more complicated.)
Offline
And then, how do you automatically forward these mails?
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
Yeah, I guess I should clarify that by "forward" I mean from local box to Gmail account...
The flow as I understand it:
1) [fetchmail pull on localhost] <--- [.edu IMAP address]
2) [fetchmail push] ---> [gmail account as new mail]
shining, I think tam is saying that an MTA is required for step 2
% whereis whatis whence which whoami whois who
Offline
Oh, no. In that case, you'd use a slightly modified version of what you originally posted:
:0:
! your_id@your.other.address.ca
(The 'c' makes a copy, which it seems you don't care about, hence it can be dropped.)
Offline
Pages: 1