MAILTRAY(1) OpenBSD Reference Manual MAILTRAY(1) NAME Mailtray - Display an email notification tray icon SYNOPSIS mailtray [-hvV] [-d datadir] [-f configfile] [-s server] [-i pol_interval] [-c command] [-t tooltip] DESCRIPTION Mailtray is a tray icon or status icon to notify you of new email. -h, --help Display help message and exit. -v, --version Display version and exit. -V, --verbose Print extra status messages for debugging. Will disable the fea- ture if it's already enabled in the config file. -d, --datadir Datadir to get icons from. -f, --file Configuration file to use. A configuration file in mandatory. -s, --server Mail server to connect to. See server in the CONFIGURATION sec- tion for details. -i, --interval Poll the server every n seconds. -c, --command Command to execute when the server is click on. -t, --tooltip Append to tooltip. This should be valid Python code, it will be eval()-ed upon every run. CONFIGURATION The configuration file is imported in Python, any valid Python code goes. Take note of the different data types used: string Any sequence of characters. Surrounded by quotes (' or "). int Integer, any natural number. bool Boolean value, either True or False. Do not surround by quotes. More information about data types can be found in the Python manual: http://docs.python.org/library/stdtypes.html OPTIONS Options recognized: datadir (string) Directory for data files (i.e. icons). On a typical installation it will be /usr/share/mailtray/ or /usr/local/share/mailtray/. server (string) Mail server to connect to, the format should be an URI: scheme://username:password@server:port Supported schemes at the moment: imap:// - Normal IMAP server. imaps:// - SSL secured IMAP server. If port is omitted them the default port will be used (143 for imap, 993 for imaps) Example: imaps://donald:duck@example.com:5993 interval (int) Connect to the mailserver every n seconds and check for new mes- sages. command (string) Command to execute when the icon is left-clicked on. Executed in- side a shell. verbose (bool) Print extra status messages to stdout for debugging. folders (tuple) Specify the folder to monitor, see FOLDER SPECIFICATION. tooltip (string) Append to tooltip. This should be valid Python code, it will be eval()-ed upon every run. FOLDER SPECIFICATION. A tuple containing any number of dictionary which specify a folder to monitor and several folder-specific options. Small example (take note of the interpunction): folders = ( { 'folder': 'INBOX', 'unseen': True [...] }, { 'folder': 'Folder2' [...] } ) Keys recognized: folder (string) Folder name. case-sensitive. notify (bool) Notify (i.e. change icon) upon new messages. unseen (bool) Consider UNSEEN messages (Without \Seen flag) as new? Normally an email client sets the \Seen flag whenever you open the mailbox, even if you did not open the message. subjects (bool) Display a list of subjects for new messages in the tooltip. numsubjects (int) Display n new messages in the tooltip if subjects is set to True. Set to 0 to display all subjects. Has no effect if subjects is set to False. EXAMPLES An example file mailtrayrc.py.example should be included in the package. BUGS The configuration could be significantly easier, the fact that it's im- ported in Python makes configuration pretty flexible, but also makes it more difficult for non-python programmers. Also note that if you have a mailtrayrc.py file in the same path as mailtray or mailtray.py then python will import that file, as far as Python is concerned this is not a bug but a feature, but due to my (mis)use of import it is a bug. SEE ALSO python(1) AUTHORS Martin Tournoij Mailtray is licensed under a Creative Commons Attribution 3.0 Unported License. http://creativecommons.org/licenses/by/3.0/ OpenBSD 4.6 September 15 2009 3