LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't get my head around system-wide email... (https://www.linuxquestions.org/questions/linux-newbie-8/cant-get-my-head-around-system-wide-email-555089/)

ArthurDent 05-19-2007 03:09 AM

Can't get my head around system-wide email...
 
Hello All,

For some time now I have been very happily using a fetchmail-> procmail-> Clamassassin-> Spamassin-> Dovecot -> email client combination - but all as my individual user. I now want to get a bit cleverer (but I fear I'm not clever enough!).

The basic problem is this:

I have 3 or 4 email accounts each of which are collected from their respective POP servers by my ~/fetchmailrc and delivered into the hands of procmail which handles the virus and spam checking and sorts them into various mbox files (all as my user in ~/Msgs).

Our main email account however is with Demon Internet - it allows infinite email accounts in the form
email1@mychosenname.demon.co.uk
email2@mychosenname.demon.co.uk
anythingreally@mychosenname.demon.co.uk

I use a procmail recipe to sort stuff for me@mychosenname@demon.co.uk into an mbox for me, mywife@mychosenname@demon.co.uk into a file for my wife, and myson@mychosenname@demon.co.uk into a file for him. Anything else goes into my /var/spool/mail/myname folder.

This is fine for when I am sitting at the PC and my wife pushes me off to check her email - its just in its own folder in Evolution. However, it can't work if I'm not here and she logs on as herself. For that I have had to set up Evolution in her account to read the POP server directly, and use Evolution to filter for her mail.

This is not a huge problem, but it means that a) there are now 2 copies of all her mail on the PC and; b) she gets confused and says things like "Didn't I reply to that already?"

What I'd like to do is this:

1) Run fetchmail to collect all mail from all accounts(as root?)
2) Run clamassassin + spamassassin over it all
3) Sort it into mail for me, mail for my wife etc. and place it into /var/spool/mail/user as appropriate
4) Further sort my mail into mailing list responses / work / home etc as I do now.

I failed at the first hurdle.

When I tried to copy my ~/.fetchmailrc file into /etc/fetchmailrc and run fetchmail I got the error
Code:

[root@myserver ~]# fetchmail --daemon 180
fetchmail: WARNING: Running as root is discouraged.
fetchmail: no mailservers have been specified.

Am I going about this the wrong way?

Thanks in advance for your help...

Mark

arckane 05-19-2007 08:00 PM

How about if you copy ~/.fetchmailrc to /home/wifey/.fetchmailrc | chown wifey .fetchmailrc, then run as your wife?

Obviously you'll need to edit the /home/wifey/.fetchmailrc file to only retrieve her mail.

ArthurDent 05-20-2007 01:56 AM

Maybe I'm just confused, but the problem - I think - is with procmail, not fetchmail. You see the mail for BOTH of us is on the one POP server (pop3.demon.co.uk). Once it's "fetched" I need to "sort" it into wifey/me/son. It is not identified in anyway differently other than a difference in the "To" address.

Can there be a promailrc in each account?

The problems with this are (I think... again... oh my head hurts!)
a) If MY procmail has run first there will be no mail to sort for wifey etc.
b) If HER procmail runs first there will be no virus/spam checking done (unless I include that in her procmailrc too) and then what if there is a lot of mail and they are both trying to run at once and... and... - I think I need to lie down.

Thanks for sharing my headache!


All times are GMT -5. The time now is 04:27 AM.