Newsgroup: it.comp.os.linux.iniziare
Titolo: fetchmail

Ho un vuoto di memoria:
ho configurato fetchamil e scarica la posta correttamente, ma:
- come faccio ad avviarlo all'avvio devo metterlo in rc.local a mano oppure 
si deve fare in altro modo più astuto?
- come faccio a fargli fare il controllo della posta ogni x minuti? Devo 
usare cron? Oppure anche in questo caso c'è un sistema più astuto?
grazie

 man fetchmail (modo 'daemon')
per chi fosse interessato
DAEMON MODE
       The  --daemon  <interval>  or  -d  <interval>  option  runs fetchmail 
in daemon mode.  You must specify a
       numeric argument which is a polling interval in seconds.
       In daemon mode, fetchmail puts itself in background and runs forever, 
querying each  specified  host  and
       then sleeping for the given polling interval.
       Simply invoking
              fetchmail -d 900
       will,  therefore,  poll  all  the  hosts  described  in your 
~/.fetchmailrc file (except those explicitly
       excluded with the `skip' verb) once every fifteen minutes.
       It is possible to set a polling interval in your ~/.fetchmailrc file 
by saying `set  daemon  <interval>',
       where  <interval> is an integer number of seconds.  If you do this, 
fetchmail will always start in daemon
       mode unless you override it with the command-line option --daemon 0 
or -d0.
       Only one daemon process is permitted per user; in daemon mode, 
fetchmail makes  a  per-user  lockfile  to
       guarantee this.
       Normally,  calling fetchmail with a daemon in the background sends a 
wakeup signal to the daemon, forcing
       it to poll mailservers immediately.  (The wakeup signal is  SIGHUP 
if  fetchmail  is  running  as  root,
       SIGUSR1  otherwise.)   The  wakeup action also clears any `wedged' 
flags indicating that connections have
       wedged due to failed authentication or multiple timeouts.
       The option --quit will kill a running daemon process instead of 
waking it up (if there is  no  such  pro-
       cess, fetchmail notifies you).  If the --quit option is the only 
command-line option, that's all there is
       to it.
       The quit option may also be mixed with other command-line options; 
its effect is to kill any running dae-
       mon before doing what the other options specify in combination with 
the rc file.
       The  -L  <filename>  or  --logfile <filename> option (keyword: set 
logfile) allows you to redirect status
       messages emitted while detached into a specified logfile (follow the 
option with the logfile name).   The
       logfile  is  opened for append, so previous messages aren't deleted. 
This is primarily useful for debug-
       ging configurations.
       The --syslog option (keyword: set syslog) allows you to redirect 
status and error messages emitted to the
       syslog(3)  system  daemon  if  available.   Messages  are  logged 
with  an id of fetchmail, the facility
       LOG_MAIL, and priorities LOG_ERR, LOG_ALERT or LOG_INFO.  This option 
is intended for logging status  and
       error  messages  which  indicate  the  status  of the daemon and the 
results while fetching mail from the
       server(s).  Error messages for command line options and parsing the 
.fetchmailrc file are  still  written
       to stderr, or to the specified log file.  The --nosyslog option turns 
off use of syslog(3), assuming it's
       turned on in the .fetchmailrc file, or that the -L or --logfile 
<file> option was used.
       The -N or --nodetach option suppresses backgrounding and detachment 
of the daemon process from  its  con-
       trol terminal.  This is primarily useful for debugging.  Note that 
this also causes the logfile option to
       be ignored (though perhaps it shouldn't).
       Note that while running in daemon mode polling a POP2 or IMAP2bis 
server, transient errors (such  as  DNS
       failures  or  sendmail  delivery  refusals) may force the fetchall 
option on for the duration of the next
       polling cycle.  This is a robustness feature.  It means that if a 
message is  fetched  (and  thus  marked
       seen by the mailserver) but not delivered locally due to some 
transient error, it will be re-fetched dur-
       ing the next poll cycle.  (The IMAP logic doesn't delete messages 
until they're delivered, so this  prob-
       lem does not arise.)
       If  you  touch  or  change  the .fetchmailrc file while fetchmail is 
running in daemon mode, this will be
       detected at the beginning of the next poll cycle.  When a changed 
.fetchmailrc  is  detected,  fetchmail
       rereads  it  and  restarts  from  scratch  (using  exec(2);  no 
state information is retained in the new
       instance).  Note also that if you break the .fetchmailrc file's 
syntax, the new instance will softly  and
       silently vanish away on startup.

 per chi fosse interessato
ma magari le manpage ce le abbiamo pure noi... :-)
.a.
-- 
Il mattino ha l'oro in bocca. Il MATTino ha l'OrO In bOcca.
i lma tt ino ha l'o roin bocc a.ilmattinohal'oroinbocca. il ma tt in
oh al' or oi nb oc ca. il matti noha l'oroinbocca. IL MATtiNO Ha l'ORO
InBOCCa. I l m a t t i n o  h a l' o r o i n b o c c a . ilmattinohal'oroin
BoCcA. iLmAtTiNoHaL'oRoInBoCcA.