View previous topic :: View next topic |
Author |
Message |
luna80 Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/129716452142b78b3e486e9.gif)
Joined: 01 Feb 2004 Posts: 1564 Location: switzerland
|
Posted: Tue Jan 11, 2005 5:21 pm Post subject: [risolto] check mail for bash |
|
|
ho seguito questo how to per avere nel mio prompt i nuovi mail, soltanto che adesso ho un problema.
nel prompt mi viene sempre visualizzato "No mail" ma se manualmente do un
mi vengono correttamenti visualizzati i nuovi mail.
qualcuno può aiutarmi a capire come mai?
nel crontab ho fatto esattamente come spiegato nell'howto
Last edited by luna80 on Thu Jan 13, 2005 4:47 am; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
koma Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/208407359441b4bbd170574.jpg)
Joined: 06 Jun 2003 Posts: 2702 Location: Italy
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
koma Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/208407359441b4bbd170574.jpg)
Joined: 06 Jun 2003 Posts: 2702 Location: Italy
|
Posted: Tue Jan 11, 2005 8:03 pm Post subject: |
|
|
e anche un Code: | cat ~/.filefetchrc |grep message |awk '
{ acc+=$1 }
END { if (acc==0)
printf("No Mail");
else if (acc==1)
printf("1 Mail");
else
printf("%d Mails", acc);
}' | Poi magari criptando o oscurando le tue mail e i tuoi pop nonchè le password anche _________________ http://www.youtube.com/watch?v=_yoJI-Tl94g GLORY GLORY HYPNOTOAD |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
luna80 Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/129716452142b78b3e486e9.gif)
Joined: 01 Feb 2004 Posts: 1564 Location: switzerland
|
Posted: Tue Jan 11, 2005 9:17 pm Post subject: |
|
|
koma wrote: | puoi farci un cat manuale di .mail_cunt ? |
Code: | $cat .mail_count
No Mail |
Code: | $cat ~/.filefetchrc |grep message |awk '
{ acc+=$1 }
END { if (acc==0)
printf("No Mail");
else if (acc==1)
printf("1 Mail");
else
printf("%d Mails", acc);
}'
No Mail
|
Code: | $ cat .filefetchrc
fetchmail: no mail for luna80 at xxxx@xxx
|
ma da notare
Code: | $fetchmail -c
2 messages for luna80 at xxxx@xxx (11154 octets)
|
boh non so....magari crontab non viene eseguito? c'è magari un log? avete qualche consiglio? grazie mille! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
luna80 Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/129716452142b78b3e486e9.gif)
Joined: 01 Feb 2004 Posts: 1564 Location: switzerland
|
Posted: Tue Jan 11, 2005 9:25 pm Post subject: |
|
|
ho trovato ora i log:
Code: | $ more /var/log/mail.err
Jan 11 22:00:02 acertm sSMTP[7893]: Unable to locate mail
Jan 11 22:00:02 acertm sSMTP[7893]: Cannot open mail:25
Jan 11 22:05:01 acertm sSMTP[7986]: Unable to locate mail
Jan 11 22:05:01 acertm sSMTP[7986]: Cannot open mail:25
Jan 11 22:10:01 acertm sSMTP[8109]: Unable to locate mail
Jan 11 22:10:01 acertm sSMTP[8109]: Cannot open mail:25
Jan 11 22:15:01 acertm sSMTP[8184]: Unable to locate mail
Jan 11 22:15:01 acertm sSMTP[8184]: Cannot open mail:25
Jan 11 22:20:01 acertm sSMTP[8286]: Unable to locate mail
Jan 11 22:20:01 acertm sSMTP[8286]: Cannot open mail:25
|
...ora cerco se trovo soluzioni |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
koma Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/208407359441b4bbd170574.jpg)
Joined: 06 Jun 2003 Posts: 2702 Location: Italy
|
Posted: Tue Jan 11, 2005 10:26 pm Post subject: |
|
|
ti dice che non riesce a contattare la mail.
Code: | #crontab -u UTENTE -e
All'interno ho scritto questo che e' l'equivalente di un controllo ogni 5 minuti
Citazione:
*/5 * * * * check4mail -c >> /dev/null |
Hai messo nel crontab giusto? nel senso è nel crontab dell'utente desiderato? _________________ http://www.youtube.com/watch?v=_yoJI-Tl94g GLORY GLORY HYPNOTOAD |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
luna80 Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/129716452142b78b3e486e9.gif)
Joined: 01 Feb 2004 Posts: 1564 Location: switzerland
|
Posted: Wed Jan 12, 2005 3:28 am Post subject: |
|
|
koma wrote: | ti dice che non riesce a contattare la mail.
Code: | #crontab -u UTENTE -e
All'interno ho scritto questo che e' l'equivalente di un controllo ogni 5 minuti
Citazione:
*/5 * * * * check4mail -c >> /dev/null |
Hai messo nel crontab giusto? nel senso è nel crontab dell'utente desiderato? |
beh credo di si,...ho fatto (da root):
Code: | # crontab -u luna80 -e |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
luna80 Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/129716452142b78b3e486e9.gif)
Joined: 01 Feb 2004 Posts: 1564 Location: switzerland
|
Posted: Wed Jan 12, 2005 4:56 am Post subject: |
|
|
per sicurezza ho aggiunto luna80 al gruppo crontab, cmq poi effettivamente ho visto che il crontab era quello giusto anche prima. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
luna80 Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/129716452142b78b3e486e9.gif)
Joined: 01 Feb 2004 Posts: 1564 Location: switzerland
|
Posted: Wed Jan 12, 2005 5:04 pm Post subject: |
|
|
nessuno da darmi qualche consiglio? ![Crying or Very sad :cry:](images/smiles/icon_cry.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
luna80 Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/129716452142b78b3e486e9.gif)
Joined: 01 Feb 2004 Posts: 1564 Location: switzerland
|
Posted: Wed Jan 12, 2005 8:08 pm Post subject: |
|
|
beh a furia di "darci" sono almeno riuscita a capire una cosa:
-crontab esegue correttamente checkmail e tutto va a buon fine
-nel log viene messo un errore del tipo " Jan 11 22:20:01 acertm sSMTP[8286]: Unable to locate mail
Jan 11 22:20:01 acertm sSMTP[8286]: Cannot open mail:25"
perchè credo tenti di spedire un qualche mail di log ma non trova i dati che gli servono (giustamente dato che per ssmtp non ho impostato assolutamente niente e per quello che voglio fare non mi serve). ora questo errore non l'ho più perchè ho aggiunto MAILTO="" a crontab
ho scoperto che il VERO problema è che il prompt bash non viene aggiornato con il numero di mail, se invece apro una nuova shell allora li avrò il numero corretto.
ora devo capire il perchè di questo.
(questo thread è quasi un monologo, eheheheh,...scherzo koma!!! )
Last edited by luna80 on Wed Jan 12, 2005 8:21 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
koma Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/208407359441b4bbd170574.jpg)
Joined: 06 Jun 2003 Posts: 2702 Location: Italy
|
Posted: Wed Jan 12, 2005 8:11 pm Post subject: |
|
|
scusami ma in questi gorni sono davvero molto preso purtroppo non ho nemmeno il tempo per cenare
Appena ho tempo guardo prometto _________________ http://www.youtube.com/watch?v=_yoJI-Tl94g GLORY GLORY HYPNOTOAD |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
luna80 Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/129716452142b78b3e486e9.gif)
Joined: 01 Feb 2004 Posts: 1564 Location: switzerland
|
Posted: Wed Jan 12, 2005 8:19 pm Post subject: |
|
|
koma wrote: | scusami ma in questi gorni sono davvero molto preso purtroppo non ho nemmeno il tempo per cenare
Appena ho tempo guardo prometto |
non preoccuparti ci mancherebbe!!!
era soltanto una battuta perchè gli ultimi messaggi me li ero autoscritti senza avere altre risposte da altri, ti ho messo nella battuta perchè eri stato l'unico a rispondermi!
se risolvo da sola poi ho più soddisfazioni...eheheh
ciao |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Jecko_Hee Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/20798899140d2cc45ef267.jpg)
Joined: 20 Aug 2003 Posts: 142 Location: Svizzera/Ticino
|
Posted: Wed Jan 12, 2005 8:30 pm Post subject: |
|
|
luna80 wrote: |
ho scoperto che il VERO problema è che il prompt bash non viene aggiornato con il numero di mail
|
ciao, il resto funziona? i files .filefetchrc .mail_count sono aggiornati correttamente?
potresti postare il tuo .bashrc?
Ciao _________________ Negli anni 60 una delle tante ragazze di Fonzie, dopo aver fatto "petting", gli disse: "FONZIE, SE NON TI LECCHI LE DITA GODI SOLO A META'!"
EVITIAMO GLI OT - LINEE GUIDA DEL FORUM |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
luna80 Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/129716452142b78b3e486e9.gif)
Joined: 01 Feb 2004 Posts: 1564 Location: switzerland
|
Posted: Wed Jan 12, 2005 8:59 pm Post subject: |
|
|
Jecko_Hee wrote: | luna80 wrote: |
ho scoperto che il VERO problema è che il prompt bash non viene aggiornato con il numero di mail
|
ciao, il resto funziona? i files .filefetchrc .mail_count sono aggiornati correttamente?
potresti postare il tuo .bashrc?
Ciao |
come non detto,
insomma, il punto è questo:
se faccio manualmente ($checkmail -c) funziona, mentre con il crontab no, i file non vengono aggiornati.
il problema del prompt l'ho sistemato facendomi ritornare il cat da una funzione e ora aggiorna correttamente, il perchè prima non lo facesse rimane un mistero. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
koma Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/208407359441b4bbd170574.jpg)
Joined: 06 Jun 2003 Posts: 2702 Location: Italy
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
luna80 Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/129716452142b78b3e486e9.gif)
Joined: 01 Feb 2004 Posts: 1564 Location: switzerland
|
Posted: Wed Jan 12, 2005 9:09 pm Post subject: |
|
|
koma wrote: | quindi ora funziona? |
no, mi sa che non so spiegarmi!
crontab non aggiorna |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Jecko_Hee Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/20798899140d2cc45ef267.jpg)
Joined: 20 Aug 2003 Posts: 142 Location: Svizzera/Ticino
|
Posted: Wed Jan 12, 2005 9:37 pm Post subject: |
|
|
luna80 wrote: |
crontab non aggiorna |
Prova a mettere il path completo al crontab, a me non lo trovava cosi'.
Code: | */5 * * * * /usr/local/bin/check4mail -c >> /dev/null
|
_________________ Negli anni 60 una delle tante ragazze di Fonzie, dopo aver fatto "petting", gli disse: "FONZIE, SE NON TI LECCHI LE DITA GODI SOLO A META'!"
EVITIAMO GLI OT - LINEE GUIDA DEL FORUM |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
luna80 Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/129716452142b78b3e486e9.gif)
Joined: 01 Feb 2004 Posts: 1564 Location: switzerland
|
Posted: Thu Jan 13, 2005 4:46 am Post subject: |
|
|
Jecko_Hee wrote: | luna80 wrote: |
crontab non aggiorna |
Prova a mettere il path completo al crontab, a me non lo trovava cosi'.
Code: | */5 * * * * /usr/local/bin/check4mail -c >> /dev/null
|
|
infatti, è la cosa che mi è venuta in mente questa mattina, ho provato ed è andata! potevo anche arrivarci prima però....va beh
grazie mille sia a te che a koma! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
luna80 Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/129716452142b78b3e486e9.gif)
Joined: 01 Feb 2004 Posts: 1564 Location: switzerland
|
Posted: Thu Jan 13, 2005 6:32 am Post subject: |
|
|
in ogni caso ora ho visto un'altra cosa interessante che può essere utile anche ad altri:
cron va a sccrivere gli errori eventualmente ritornati nel file ~/dead.letter
se lo avessi scoperto prima il problema l'avrei risolto forse in 2 minuti...
![Very Happy :D](images/smiles/icon_biggrin.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|