Can download mail through fetchmail but where does it go?
Linux - NewbieThis forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Hi,
I have started tinkering around with mail on a hosted linux (think its red hat enterprise) account. I have root access to everything except modifying the kernel.
Having configured fetchmail it seems to be working ok, it says its downloaded messages, but I am not sure where its likely to have put them, or if there is a setting in fetchmail where it tells it where to put my mail. I have checked /var/spool/mail and /var/mail as well as /home/user1/mail and /home/user1/Mail too.
Another question, I have installed mutt also, and it seems to want to access /var/spool/mail/root even though I am not using the root account. I have added /var/spool/mail/root but of course mutt is showing no messages.
I know I can edit the muttrc file but I don't know what to put there, because I don't know for sure where my mail is being downloaded. Ideally I would like it in my home directory somewhere.
fetchmail doesn't deliver mail, only fetch it. once it's pulled back to the local machine, it's sent through the sendmail command, and whatever is providing that tool (obviously assumed to be sendmail, but all MTA's, postfix, qmail etc... will provide the same program name for reasons like this one)
fetchmail doesn't deliver mail, only fetch it. once it's pulled back to the local machine, it's sent through the sendmail command, and whatever is providing that tool (obviously assumed to be sendmail, but all MTA's, postfix, qmail etc... will provide the same program name for reasons like this one)
OK, I think I understand that, I was following a tutorial from lifehacker which didn't exactly make it clear. Before I get too into it, its probably better explaining what I want to do, maybe there's a far easier way to achieve this.
All I want to do is to be able to download my POP3 mail, and view it in something like mutt. I have two mail accounts, both POP3, nothing in the domain or anything like that, and I do not need to run a mail server. I have an smtp server available to for outgoing mail. Do I need to go the Postfix / Sendmail route, as it seems a bit over the top for what I am trying to do?
Short but sweet (and all I needed to know) response! Procmail seems to be working ok as an MDA as long as fetchmail is told to use procmail. I specified a directory, mail is being received. Set .muttrc to check that folder for messages.
One slight problem, and one question, if I may.
Mutt still tries to load /var/spool/mail/root when opened. I can then change to the folder I want by pressing 'C' to change to the correct folder which then displays my messages just fine. How can I get mutt to open the correct folder when I open it rather than me switching from /var/spool/mail/root all the time?
Not too familiar with cron jobs, I have one to run fetchmail but I need to edit it to instead run fetchmail with procmail (fetchmail -m "/usr/bin/procmail -d %T".) How would I do this?
Having configured fetchmail it seems to be working ok, it says its downloaded messages, but I am not sure where its likely to have put them, or if there is a setting in fetchmail where it tells it where to put my mail. I have checked /var/spool/mail and /var/mail as well as /home/user1/mail and /home/user1/Mail too.
If you use procmail, and this is a great option, you should have the following in your ~/.fetchmailrc:
Code:
mda "/usr/bin/procmail -d %T"
And of course check the path to your own procmail.
Quote:
Another question, I have installed mutt also, and it seems to want to access /var/spool/mail/root even though I am not using the root account. I have added /var/spool/mail/root but of course mutt is showing no messages.
It will only try to access this folder if told to do so :-) There are several ways to set your default mailbox. To see what is currently set run the following:
Code:
$ echo $MAIL
If you need to alter it you can add it to ~/.bashrc as:
Code:
MAIL=/var/spool/mail/username && export MAIL
or set it in your ~/.muttrc as:
Code:
set spoolfile = /var/spool/mail/username
This is arguably the best place to deliver the mail.
Quote:
I know I can edit the muttrc file but I don't know what to put there, because I don't know for sure where my mail is being downloaded. Ideally I would like it in my home directory somewhere.
My usual practice is to have the mail delivered to /var/spool/mail/username but have procmail sort messages to $HOME/mail. This can be done by adding the following to ~/.procmailrc:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.