Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
bbmail with fetchmail and random wav-file playing
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Kodama
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jan 2003
Posts: 85
Location: Linköping, Sweden

PostPosted: Wed Feb 26, 2003 5:11 pm    Post subject: bbmail with fetchmail and random wav-file playing Reply with quote

I have configured the bbmail quite nicely now, so I tough I'd share.

ebuilds used:

bbmail
fetchmail
smixer
bplay

To configure fetchmail just do "fetchmailconfig".

Relevant stuff from my bbmail.bb file

Code:
bbmail.checkDelay:            20
bbmail.forceCheck.onDelay:    1
bbmail.show.newmail.counter:    True
bbmail.show.totalmail.counter:  True
bbmail.show.envelope:           True
bbmail.show.onlyAtnewmail:      True
bbmail.raised:                  True
bbmail.autoRaise:               True
bbmail.pressed.runCommand:      sylpheed &
bbmail.numberOf.mailboxes:      1
bbmail.mailbox.1.type:          other
bbmail.mailbox.1.newmail.runCommand: /stuff/stuff/misc/mail_wav_script
bbmail.mailbox.1.newmail.bell:  False
bbmail.mailbox.1.mode:          1
bbmail.mailbox.1.proc: fetchmail -c | /usr/bin/bbmailparsefm.pl


NOTE: The server must be of IMAP type for bbmailparesefm.pl to work.

bbmail run this script when it sees new mail.

Code:
# mail_wav_script
# Play random wav file

# Number of wav files
FILES=3

# This to lower the volume, without that,
# bplay plays the wav files too loud
# Also it gives a nice effect
# lowvolume is file that contains the text "vol Vol 70"
smixer -s lowvolume

NUMBER=$RANDOM
let "NUMBER %= $FILES"

case "$NUMBER" in

0)
bplay ../wav/ftrama025.wav
;;

1)
bplay ../wav/mail58.wav
;;

2)
bplay ../wav/mailhere.wav
;;

esac

# Restore original volume
smixer -s volume
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum