[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How the average guy gets mail...



* Viktor Rosenfeld <rosenfel@informatik.hu-berlin.de>, 2001-05-10 02:36 +0200:
> Hi Cameron,
> 
> I second everything said so far on this thread, however, on a multi-user
> system I would implement fetchmail-on-dialup in a slightly different
> way.
> 
> Create an /etc/fetchmail-users file with all the users that want to run
> fetchmail
> 
> ---8< snip >8---
> # users that get mail by fetchmail
> user_foo
> user_bar
> ---8< snip >8---
> 
> Then create a ip-up script:
> 
> #!/bin/bash
> 
> if [ -f /etc/fetchmail-users ]; then
> 	for user in `grep -v '^#' /etc/fetchmail-users`; do 
> 		if [ -f ~$user/.fetchmailrc ];  then

This gives root control (and hassle) about everybody's mail. 
If you pass control to the users, you could do

for i in $(ls /home/); do
        if [ -f /home/$i/.fetchmailrc ] && \
           [ -f /home/$i/email-addresses ]; then

> 			su -c "fetchmail -d 900" $user

I'd recommend the "-k" option for an "official", the "-a" option for a
"family box". "-k" means the mail stays on the server (because people might
also want to have it at home), "-a" for a final destination (fetch all
regardless).

A. B.                                       [andre.berger@topmail.de]



Reply to: