Networking Forums

Networking Forums > Computer Networking > Linux Networking > How to get fetchmail to drop e-mail into my IMAP account on localhost.

Reply
Thread Tools Display Modes

How to get fetchmail to drop e-mail into my IMAP account on localhost.

 
 
David
Guest
Posts: n/a

 
      02-10-2004, 11:48 PM
First of all, I'm not even completely sure how to ask this question so
please forgive me.

I have 3 POP e-mail accounts with different e-mail providers. I
installed Postfix, Fetchmail, and bincimapd on my system. (I first
tried IMAP2000 but had issues with it.)

All 3 daemons/services are working just fine. I have my e-mail client
set so that it uses 127.0.0.1 as the SMTP server. Mail gets sent just
fine. I can connect to my IMAP server and create folders, copy
messages in, and so on. So that part works fine too. My fetchmail is
also working fine. It connects to my POP servers and downloads the
messages.

Now here is the question. How do I "tell" fetchmail (or Postfix?)
where to put the e-mail? The problem is when fetchmail brings in the
e-mail from my POP accounts, it goes in /var/spool/mail. But when I
check my e-mail with my e-mail client, it's looking in $HOME/Maildir

I don't (DO NOT) want to set up my e-mail client to connect to my
localhost so that I can get the e-mail via POP. That defeats the
purpose. (I use several computers and I want to connect to this
computer's IMAP server from the other machines so that the e-mail is
always in sync regardless which computer I'm using to check my
e-mail.)

And I know I can't just move or copy the /var/spool/mail/user_name
file to $HOME/Maildir because the file formats are different. So how
do I get the file processed and delivered into the proper location?
 
Reply With Quote
 
 
 
 
Nick E.
Guest
Posts: n/a

 
      02-11-2004, 12:02 AM
David wrote:

> First of all, I'm not even completely sure how to ask this question so
> please forgive me.
>
> Now here is the question. How do I "tell" fetchmail (or Postfix?)
> where to put the e-mail? The problem is when fetchmail brings in the
> e-mail from my POP accounts, it goes in /var/spool/mail. But when I
> check my e-mail with my e-mail client, it's looking in $HOME/Maildir


fetchmail is fine. Postfix is the problem.

> I don't (DO NOT) want to set up my e-mail client to connect to my
> localhost so that I can get the e-mail via POP. That defeats the
> purpose. (I use several computers and I want to connect to this
> computer's IMAP server from the other machines so that the e-mail is
> always in sync regardless which computer I'm using to check my
> e-mail.)
>
> And I know I can't just move or copy the /var/spool/mail/user_name
> file to $HOME/Maildir because the file formats are different. So how
> do I get the file processed and delivered into the proper location?


You need to edit your /etc/postfix/main.cf for postfix.
uncomment this line:
home_mailbox = Maildir/
(note the trailing slash)
comment out all other "home_mailbox" lines, and the "mail_spool_directory"
lines.

Assuming this is all local, open your email client (kmail?), set up a new
receiving account, and select "Maildir Mailbox." then just check this
account. Actually reading your post again. don't do this. Just check your
mail like normal over IMAP.

HTH.

--john (recently did this on a Mandrake9.2 box & a RH9 box)

--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.
--Linus Torvalds
 
Reply With Quote
 
Alan Connor
Guest
Posts: n/a

 
      02-11-2004, 12:58 AM
On Wed, 11 Feb 2004 01:02:18 GMT, Nick E. <(E-Mail Removed)> wrote:
>


<snip>

I'd add procmail to your system and have fetchmil send the mail there to
be filtered, forwarded, auto-responded-too, and distributed, etc.

Procmail has great manpages and I wouldn't be without it.

In your .fetchmailrc put the line:

and wants mda "/usr/bin/formail -ds /usr/bin/procmail"

(formail comes with procmail)

Exim is easier to use than postfix, by-the-way.

AC

--
ed(1)
Check out the original tutorials by Brian W. Kernighan:
----- http://tinyurl.com/2uprx -----
If it's good enough for BWK, it's good enough for me.
 
Reply With Quote
 
David
Guest
Posts: n/a

 
      02-11-2004, 03:25 PM
Thanks for the help.

I uncommented "home_mailbox = Maildir/" line (and noted the trailing
slash)

The other home_mailbox line was already commented out so I left it.

I commented out the "mail_spool_directory"

Saved changes and exited the editor.

I restarted postfix with "/etc/init.d/postfix restart"

Then I did an "ls -l /var/spool/mail" command to make sure the e-mail
file for my user name was 0 bytes. It was.

Then I sent myself an e-mail from my yahoo.com account but it is still
going to "/var/spool/mail/david" which I can see by looking at the
contents of that file.


> You need to edit your /etc/postfix/main.cf for postfix.
> uncomment this line:
> home_mailbox = Maildir/
> (note the trailing slash)
> comment out all other "home_mailbox" lines, and the "mail_spool_directory"
> lines.
>
> Assuming this is all local, open your email client (kmail?), set up a new
> receiving account, and select "Maildir Mailbox." then just check this
> account. Actually reading your post again. don't do this. Just check your
> mail like normal over IMAP.
>
> HTH.
>
> --john (recently did this on a Mandrake9.2 box & a RH9 box)

 
Reply With Quote
 
David
Guest
Posts: n/a

 
      02-11-2004, 03:31 PM
> I'd add procmail to your system and have fetchmil send the mail there to
> be filtered, forwarded, auto-responded-too, and distributed, etc.
>
> Procmail has great manpages and I wouldn't be without it.


Ugg... Unless there is some tremendous advantage to using procmail,
I'd rather not. (It is on my system already but this whole process is
already complicated enough (to me anyway). Adding yet another program
into the mix doesn't appeal to me if I can avoid it. I only have a
pretty basic understanding of this fetchmail/postfix/imap combo.)

> Exim is easier to use than postfix, by-the-way.


Maybe I'll check into that another time. But since I already have
postfix installed and working, I'll probably stick with it for now.
 
Reply With Quote
 
Nick E.
Guest
Posts: n/a

 
      02-11-2004, 07:00 PM
David wrote:

> Thanks for the help.
>
> I uncommented "home_mailbox = Maildir/" line (and noted the trailing
> slash)
>
> The other home_mailbox line was already commented out so I left it.
>
> I commented out the "mail_spool_directory"
>
> Saved changes and exited the editor.
>
> I restarted postfix with "/etc/init.d/postfix restart"
>
> Then I did an "ls -l /var/spool/mail" command to make sure the e-mail
> file for my user name was 0 bytes. It was.
>
> Then I sent myself an e-mail from my yahoo.com account but it is still
> going to "/var/spool/mail/david" which I can see by looking at the
> contents of that file.


hmm.

check this page (goes into more detail than you need, but still a good
reference):
http://www.jennings.homelinux.net/ma...er_config.html

Make sure you didn't miss anything obvious. You do have a
$HOME/Maildir/cur,new,tmp right?

or try this instead of restarting postfix:
$>service postfix reload

-john

--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.
--Linus Torvalds
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Mail Server without need for fetchmail Math Lumala Linux Networking 14 02-28-2005 11:42 AM
IMAP with fetchmail Christian Linux Networking 2 07-03-2004 08:41 PM
Problems Using external IMAP mail server Vijay Sankaran Broadband Hardware 10 04-22-2004 02:25 AM
postfix + cyrus IMAP: central sent-mail folder on IMAP server Thomas Schamberg Linux Networking 0 01-08-2004 01:31 PM
Cannot read mail fetched with fetchmail. Doug Laidlaw Linux Networking 2 09-25-2003 06:26 AM



1 2 3 4 5 6 7 8 9 10 11