<[email protected]> wrote:
I am busy setting up an automatic mail retrieval system at home. It will
collect email from a number of different remote POP mailboxes and deliver it
to the appropriate local users.
---8<--- snip ---
Stephen Irons
Thank you for all the responses. When I get a bit more Time, I will see
about making getmail deliver the retrieved mail to a maildir, and
perhaps set up an IMAP server.
To mitigate locking issues, what I have actually done is have getmail
deliver mail to /var/spool/GETMAIL/$USER, rather than
/var/spool/MAIL/$USER. Then there at most two things accessing the mbox
(mail client and getmail). I don't know who else writes to
/var/spool/mail, but I do occasionally get email from anacron, and there
might be other things that also write to the mbox. But that is really
just a temporary hack; unless I can know that they all use the same
locking scheme, it is only a matter of time before bad things happen.
Some context for why I am complicating the mail system:
Four people share a computer at home. We have individual user accounts
on the computer, and individual email addresses with separate mailboxes.
We all check our email individually. We have a dial-up connection. It
all works well enough...
...except for two things that have long annoyed me:
* We have to check email individually. I would prefer to collect
everyone's email at one go.
* In order to send email to another family member, it goes via the
ISP -- it should just get delivered locally. (We do actually talk to one
another, but sometimes it is convenient to forward emails, send photos,
etc).
So my idea for improving the mail system was to
* use a mail retrieval agent (like getmail or fetchmail) to retrieve
everyone's email all at once from various POP3 mailboxes.
* use a local MTA (like sendmail or exim, with external SMTP server
disabled) to send local mail locally and remote mail to the ISP's smart
SMTP server.
* do this on-demand from the command line at first, then automate it
so that it happens whenever someone dials up, and then every 15 minutes
or so.
* get the MTA to rewrite email addresses so that I can send email
addressed to [email protected] and it gets delivered to
wifes_account locally.
I have the system up and running for my mail, using getmail (because it
seemed easier to configure than fetchmail) and exim (because I found a
tutorial on how to set it up just as I wanted). When I get home, I have
new email waiting for me without having to dial out, simply because
someone else has dialed out during the day. Email disappears immediately
from the outbox, and gets sent later when someone dials out or I want to
browse the web.
I had to do some magic in /etc/ppp/ip-up.d to ensure that getmail runs
when a connection appears. Exim does this for you (as does fetchmail, as
I later found out).
When I am happy, I will adjust everyone else's mail client settings to
use the super new whizzy system.
I am not completely happy at the moment. Apart from my mbox locking
concern: there is no indication whether getmail is busy receiving email,
or whether exim is busy sending email, so you don't know whether it is
safe to hang up. The only solution is to browse the web for a bit
longer...or perhaps make a little Gnome panel applet that monitors the
Exim queue (exim -bp), checks whether getmail is running and turns green
when it is safe to hang up...
I have considered setting up a local IMAP server, but that seemed just a
bit too much just now. Perhaps next year, though we might well have
broadband by then and a few more computers, so there will be different
influences driving the situation. I would like to get a
wireless-router-switch with USB port running OpenWRT (like the Asus
WL520GU for NZ$85) to act as an IMAP server...
Stephen Irons
(My original mail did not make it back through the incoming spam filter,
so I have replied to a reply)
=======================================================================
This email, including any attachments, is only for the intended
addressee. It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
altered or corrupted during transmission.
=======================================================================