Giter VIP home page Giter VIP logo

mailnag's Introduction

Screenshot

An extensible mail notification daemon

Mailnag is a daemon program that checks POP3 and IMAP servers for new mail.
On mail arrival it performs various actions provided by plugins.
Mailnag comes with a set of desktop-independent default plugins for
visual/sound notifications, script execution etc. and can be extended
with additional plugins easily.

This project needs your support!
If you like Mailnag, please help to keep it going by contributing code,
reporting/fixing bugs, translating strings into your native language,
writing docs or by making a donation.

PayPal — The safer, easier way to pay online.

Installation

Ubuntu

Mailnag has an official Ubuntu PPA.
Issue the following commands in a terminal to enable the PPA and install Mailnag.

sudo add-apt-repository ppa:pulb/mailnag
sudo apt-get update
sudo apt-get install mailnag

As of Ubuntu 13.04 (Raring), Mailnag is also available in the official repos.
Run sudo apt-get install mailnag in a terminal to install it.

Debian

Mailnag is available in Debian stable and unstable.
Run sudo apt-get install mailnag in a terminal to install it.

Fedora

As of Fedora 17, Mailnag is available in the official Fedora repos.
Just run yum install mailnag (as root) in a terminal to install the package.

Arch Linux

Mailnag is available in the official repos.
Please run pacman -Syu mailnag (as root) to install the package.

openSUSE

Mailnag is available in openSUSE Tumbleweed.
Run sudo zypper install mailnag in a terminal to install it.

Generic Tarballs

Distribution independent tarball releases are available here.
Just run ./setup.py install (as root) to install Mailnag,
though make sure the requirements stated below are met.

Requirements
  • python (>= 3.5)
  • pygobject
  • gir-notify (>= 0.7.6)
  • gir-gtk-3.0
  • gir-gdkpixbuf-2.0
  • gir-glib-2.0
  • gir-gst-plugins-base-1.0
  • python-dbus
  • pyxdg
  • gettext
  • gir1.2-secret-1 (optional)

Configuration

Run mailnag-config to setup Mailnag.
Closing the configuration window will start Mailnag automatically.

Default Mail Client

Clicking a mail notification popup will open the default mail client specified in GNOME Control Center -> Details -> Default Applications.
If you're a webmail (e.g. gmail) user and want your account to be launched in a browser, please install a tool like gnome-gmail.

Desktop Integration

By default, Mailnag emits libnotify notifications, which work fine on most desktop environments
but are visible for a few seconds only. If you like to have a tighter desktop integration
(e.g. a permanently visible indicator in your top panel) you have to install an appropriate
extension/plugin for your desktop shell. Currently the following desktop shells are supported:

Furthermore, I highly recommend GNOME users to install the GOA plugin,
which makes Mailnag aware of email accounts specified in GNOME Online Accounts.

Troubleshooting

Gmail doesn't work
If Mailnag is unable to connect to your Gmail account, please try the following solutions:

  • Install the GOA plugin to connect via GNOME online accounts
  • Have a look at the FAQ
  • Try to apply this workaround

Other issues
If Mailnag doesn't work properly for you, either examine the system log for errors (journalctl -b _COMM=mailnag) or run mailnag in a terminal and observe the output.

mailnag's People

Contributors

andia89 avatar cheshire-mouse avatar city-busz avatar denisiko avatar dutchy- avatar elleryq avatar jamespo avatar jdchristensen avatar mailaender avatar nocnokneo avatar pulb avatar tikank avatar todi avatar vincent-c avatar yakar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mailnag's Issues

mailnag-config error on Arch with Gnome 3.10.1 [solved]

On Arch Linux with Gnome 3.10.1 when starting mailnag-config (using latest commit from branch mailnag-next) I get the following error:

$ ./mailnag-config
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/Mailnag/config.py", line 54, in <module>
    if __name__ == "__main__":  main()
  File "/usr/lib/python2.7/site-packages/Mailnag/config.py", line 37, in main
    confwin = ConfigWindow()
  File "/usr/lib/python2.7/site-packages/Mailnag/configuration/configwindow.py", line 60, in __init__
    self._load_stylesheet('config_window.css')
  File "/usr/lib/python2.7/site-packages/Mailnag/configuration/configwindow.py", line 141, in _load_stylesheet
    provider.load_from_path(get_data_file(stylesheet))
TypeError: Argument 1 does not allow None as a value

mailnagd and mailnag-config are installed in /usr/bin. mailnag.cfg is deleted (renamed) before start.
Thanks for your support.

Problem with connecting to gmail

Here is my mailnag.log:

Gtk-Message: Failed to load module "overlay-scrollbar"
/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
  import gobject._gobject
Checking 2 email account(s) at: Tue Nov  6 10:10:22 2012
Error: Cannot connect to IMAP account: imap.google.com. 
Error: Cannot connect to IMAP account: imap.google.com. 

and mailnag.cfg:

[filter]
filter_enabled = 0
filter_text = newsletter, viagra

[script]
script0_file = 
script0_enabled = 0
script1_file = 
script1_enabled = 0

[Account2]
enabled = 1
name = Spamowe
user = s*****[email protected]
server = imap.google.com
port = 
ssl = 1
imap = 1
idle = 1
folder = 

[Account1]
enabled = 1
name = Prywatne
user = p******[email protected]
server = imap.google.com
port = 
ssl = 1
imap = 1
idle = 1
folder = 

[general]
soundfile = mailnag.ogg
check_interval = 1
sender_format = 1
notification_mode = 0
autostart = 1
playsound = 1

maybe this is important , that I followed this instruction: http://www.webupd8.org/2012/10/how-to-get-complete-gnome-3-desktop-in.html and switched from Unity to Gnome 3.6

click on mail to access it on thunderbird

It will be great if we could click on a new mail in mailnag and it automatically show me this mail in thunderbird and I could do that for all the new mails. When I click on a mail, it disappears form the mailnag list. For this feature, mailnag shoul discuss with thunderbird at his starting. In unity you could do that with the mail indicator.

Thanks.

LGDN.

crash on notifications in summary mode

Hi all,
I wrote and tested a japanese translation and it basically worked,
but when I choose the "summary" mode config option,
(and when I have more than MAIL_LIST_LIMIT unseen mails,)
mailnag crahses at the line:131 in MailChecker._notify_summary(), producing the following log messages.

  File "/home/xxxx/git/mailnag/Mailnag/daemon/mailchecker.py", line 95, in check
    self._notify_summary(unseen_mails)
  File "/home/xxxx/git/mailnag/Mailnag/daemon/mailchecker.py", line 131, in _notify_summary
    body += "<i>" + _("(and {0} more)").format(str(len(unseen_mails) - self.MAIL_LIST_LIMIT)) + "</i>"
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 4: ordinal not in range(128)

It seems that "body" is an unicode string because senders and titles are decoded in Mails._convert()
and concatenated to "body", but translated texts are not deocded and incorrectly assumed that
they are 'ascii' encoded, as gettext.traslation('mailnag', './locale').output_charset() is not set.
I changed the last line of Mailnag/common/i18n.py to
_ = gettext.translation(PACKAGE_NAME, './locale').ugettext
and it worked, but I'm not confident if this is the right way to fix this problem.

Mailnag asks for password to unlock keyring but fails every time

After I upgraded to Ubuntu 12.04, every time I boot I get a dialog from mailnag saying:

Mailnag can't access the keyring because it is locked. Please enter the password:

I enter the password, and a new dialog appears saying it failed to unlock the keyring. At first I thought I had misspelled my password, but this is not the case. I can keep on switching from one dialog to another all day long, and mailnag won't unlock the keyring.

Can't make mailnag works properly

I use Ubuntu Quantal with gnome 3.6 and I have installed from your PPA mailnag, but it doesn't work.
mailnag.py is running and I can see it with gnome-system-monitor, but it doesn't notify any mail and the extension downloaded is not displayer on gnome-tweak-tool.
Thank you if you can help me!

Mailnag does not check new emails inside of imap folders

There are a number of imap servers, gmail for example, which supports server side filters, i.e. new messages can occur outside of INBOX and mailnag does not handle this case. Besides, it is absolutely must to have the possibility of specifying a folders list which should be checked, i.e. I have a lot of imap folders inside of my account and I only need to get notification about few of them (kmail has exact this behavior).

Not Work on Debian wheezy

I try to install on Debian Wheezy (shell 3.0.2)

I configured all accounts but not see notifications

Mailnag takes long to start (when run automatically at system startup)

Hey,

I seem to have a problem similar to the one described at
#42

At first I thought that mailnag failed to start every second time or so I start my system. But then I found out that this is not actually what happens: Mailnag DOES start automatically, but it takes about 10 minutes until it does anything AND until "ps -A | grep mailnag" lists it as a process. Prior to that there are no notifications or any other signs that mailnag is running.

However, when I run mailnag config within that 10 minute time span, mailnag does start working right away!

I'm somewhat confused.

Here's my most recent log:


/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
import gobject._gobject
Checking 1 email account(s) at: Thu Nov 29 15:40:50 2012
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/Mailnag/mailnag.py", line 165, in
if name == 'main': main()
File "/usr/lib/python2.7/dist-packages/Mailnag/mailnag.py", line 128, in main
mailchecker.check(accounts)
File "/usr/share/pyshared/Mailnag/daemon/mailchecker.py", line 97, in check
self._notify_single(new_mails)
File "/usr/share/pyshared/Mailnag/daemon/mailchecker.py", line 147, in _notify_single
n.show()
File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function
return info.invoke(_args, *_kwargs)
gi._glib.GError: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Keine derartige Schnittstelle »org.freedesktop.Notifications« des Objekts im Pfad /org/freedesktop/Notifications


About text not localized

All translations works ok except about of mail_config which stays in english...
Very little thing but imo very easy to correct quickly ;-)

Persistent notification above screensaver?

Hi, great work on this project. However, I was wondering if you think it would be possible to have the notification (no message content) display above the gnome 3 screensaver so unlocking the desktop to check for new mail isn't required?

Thanks,
David.

ImportError: No module named gi.repository

Mailnag is a no go for me:

mailnag_config
Traceback (most recent call last):
File "/usr/share/mailnag/Mailnag/config.py", line 25, in
from gi.repository import Gtk
ImportError: No module named gi.repository
mailnag-config discarded

Istalled from Archlinux AUR

Error when "Add" is pushed

Hi, here is an error I get when running mailnag_config on a kernel=3.2.29-1-1 Python 2.6.7 Foresight linux box. Any ideas?

(config.py:7029): Gtk-WARNING **: Unknown property: GtkGrid.n-rows

(config.py:7029): Gtk-WARNING **: Unknown property: GtkGrid.n-columns
Traceback (most recent call last):
File "/home/berrie/soft/mailnag/Mailnag/configuration/configwindow.py", line 261, in _on_btn_add_clicked
d = AccountDialog(self._window, acc)
File "/home/berrie/soft/mailnag/Mailnag/configuration/accountdialog.py", line 59, in init
self.entry_account_port.set_placeholder_text(("optional"))
AttributeError: 'Entry' object has no attribute 'set_placeholder_text'

Mailnag and GNOME 3.8.4

Does it work with gnome 3.8.4 ?

I have mailnag running but I dont get any notification, any clue ?

thanks

mailnag-config discarded

I have the latest version of Mailnag on ubuntu 11.10 with gnome-shell of course.
I have used Mailnag before but now I get the above message.
If I run:

python '/opt/mailnag/Mailnag/config_window.py'    

I get:

/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
  import gobject._gobject
Gkr-Message: secret service operation failed: The password was incorrect.
Traceback (most recent call last):
  File "/opt/mailnag/Mailnag/config_window.py", line 610, in 
    if __name__ == "__main__":  main()
  File "/opt/mailnag/Mailnag/config_window.py", line 603, in main
    keyring = Keyring()
  File "/opt/mailnag/Mailnag/keyring.py", line 54, in __init__
    self.show_keyring_dialog()                          # get keyring password
  File "/opt/mailnag/Mailnag/keyring.py", line 168, in show_keyring_dialog
    builder.add_from_file(get_datafile("keyring_dialog.ui"))
NameError: global name 'get_datafile' is not defined    

Add "Keywords" field to .desktop file?

According to Debian bug #693918 and the most recent desktop entry spec from FDO, there's a new field called "Keywords" that you may want to consider adding to the .desktop file. It's particularly relevant for gnome-shell >= 3.6 since apparently the shell no longer searches through Comment: fields in .desktop files.

I just came across this issue for the first time today through a tag issued by Debian's lintian. I'm not sure if replacing Comments: with Keywords: is the preferred solution, or just duplicating the contents of Comments: with Keywords:, or something else (or just ignoring this, really)...

Wait before startup

Sorry for my english. Congratulations for Mailnag, wich is very useful.
Since a month, i noticed problems with notifications (Ubuntu 12.04). Sometimes nothing, i saw new mails opening Thunderbird. After looking on other issues, i finally opened mailnag.log and saw some error messages (i can give them to you next time), and also noticed that it restarted, after "Mailnag Configuration", that do it every time. It seems that Mailnag works after that. I finally think that it would be a solution for me, that Mailnag wait before starting, because this problem appears after startup of my laptop. But i don't know exactly how to do it. Is it possible to make it simply.Thanks for your help.

My mailnag log starts systematically with: /usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
import gobject._gobject
Is it a problem or not ?

No option to open mail client

I have installed mailnag on a new laptop and loads and check mail OK. The problem is that I have no button to open mail client (I want to set up firefox) and when try to configure with mailnag_config I don't have the option to set up app for mail.
Thanks for this app!! jose.

A way to disable the "ding" sound when notifications are turned off?

GNOME Shell has a nice way to turn off notifications, it works great with Mailnag and any other notification. But Mailnag keeps the "ding" sound that actually notifies and distracts, thus, making the whole turning off pointless. :P

Is there a way to detect that and disable the sound accordingly?

Thank you. :)

UBUNTU + mailnag = no IMAP

I have installed mailnag from https://launchpad.net/~webupd8team/+archive/gnome3
But now IMAP is impossible.

The error log (mailnag.log) :

/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
import gobject._gobject
47:27.88 MainThread last 20 log messages:
48:00.80 MainThread last 20 log messages:
Checking email accounts at: Tue Dec 6 13:47:24 2011
Warning: Cannot connect to IMAP account: secureimap.t-online.de. Next try in 30 seconds.
Error: Cannot connect to IMAP account: secureimap.t-online.de. Next try in 5 minutes.

how can I solve this problem. My Ubuntu version is 11.10 and in use gnome.shell 3.2.

No tray icon, but mailnag.py runs

That's the issue, the daemon works, checks for messages, opens evolution, all good, but there is no tray icon, so when the message shows up it disappears after some time, so I can miss the event. I have all dependencies installed on Fedora 15 x86_64 GNOME3.

Sprache wird nicht installiert

Um die Sprache z.B. in deutsch zu haben, muss man in Ubuntu 11.10 noch gettext installieren, sonst werden keine .mo Dateien gebaut.

mailnag crashed

Time to time I got error:

Traceback (most recent call last):
File "./Mailnag/mailnag.py", line 510, in timeout
self.mail_list = self.mails.get_mail('desc') # get all mails from all inboxes
File "./Mailnag/mailnag.py", line 216, in get_mail
status, data = srv.search(None, 'UNSEEN') # ALL or UNSEEN
File "/usr/lib/python2.7/imaplib.py", line 627, in search
typ, dat = self._simple_command(name, *criteria)
File "/usr/lib/python2.7/imaplib.py", line 1070, in _simple_command
return self._command_complete(name, self._command(name, *args))
File "/usr/lib/python2.7/imaplib.py", line 825, in _command
', '.join(Commands[name])))
imaplib.error: command SEARCH illegal in state AUTH, only allowed in states SELECTED

after this mailnag crashed.
I use Ubuntu 11.10 and mailnag installed from webupd8 repository

Mailnag works only sometimes

Ubuntu 11.10 64 bits with Gnome-shell

Mailnag only reports new messages sometimes.

mailnag.log:

/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed
  import gobject._gobject
Checking email accounts at: Mon Dec 12 14:39:35 2011
Checking email accounts at: Mon Dec 12 14:44:45 2011
Checking email accounts at: Mon Dec 12 14:44:54 2011
Checking email accounts at: Mon Dec 12 14:45:03 2011
Checking email accounts at: Mon Dec 12 14:45:12 2011
  46:00.21 imap.gmail.com reader last 20 log messages:
  46:00.21 imap.gmail.com handler last 20 log messages:
Exception in thread Thread-28:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
     self.run()
  File "/usr/lib/python2.7/threading.py", line 505, in run
     self.__target(_self.__args, *_self.__kwargs)
  File "/home/simon/sources/mailnag/Mailnag/daemon/idler.py", line 62, in _idle
     self._conn.idle(callback=callback)
  File "/home/simon/sources/mailnag/Mailnag/daemon/imaplib2.py", line 800, in idle
     return self._simple_command(name, *_kw)
  File "/home/simon/sources/mailnag/Mailnag/daemon/imaplib2.py", line 1582, in _simple_command
     self._command(name, *args, callback=self._command_completer, cb_arg=kw, cb_self=True)
  File "/home/simon/sources/mailnag/Mailnag/daemon/imaplib2.py", line 1316, in _command
     ok, data = crqb.get_response('command: %s => %%s' % name)
  File "/home/simon/sources/mailnag/Mailnag/daemon/imaplib2.py", line 173, in get_response
     raise typ(exc_fmt % str(val))
abort: command: IDLE => socket error: <class 'socket.error'> - [Errno 104] Connection reset by peer

  54:55.38 imap.gmail.com reader last 20 log messages:
  54:55.39 imap.gmail.com handler last 20 log messages:
Checking email accounts at: Mon Dec 12 14:54:55 2011
Exception in thread Thread-16:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
     self.run()
  File "/usr/lib/python2.7/threading.py", line 505, in run
     self.__target(_self.__args, *_self.__kwargs)
  File "/home/simon/sources/mailnag/Mailnag/daemon/idler.py", line 62, in _idle
     self._conn.idle(callback=callback)
  File "/home/simon/sources/mailnag/Mailnag/daemon/imaplib2.py", line 800, in idle
     return self._simple_command(name, **kw)
  File "/home/simon/sources/mailnag/Mailnag/daemon/imaplib2.py", line 1582, in _simple_command
     self._command(name, *args, callback=self._command_completer, cb_arg=kw, cb_self=True)
  File "/home/simon/sources/mailnag/Mailnag/daemon/imaplib2.py", line 1282, in _command
     raise self.abort('connection closed')
abort: connection closed

  55:04.59 imap.gmail.com reader last 20 log messages:
  55:04.62 imap.gmail.com handler last 20 log messages:
  55:12.79 imap.gmail.com reader last 20 log messages:
  55:12.79 imap.gmail.com handler last 20 log messages:
Checking email accounts at: Mon Dec 12 14:55:04 2011
Exception in thread Thread-20:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
     self.run()
  File "/usr/lib/python2.7/threading.py", line 505, in run
     self.__target(_self.__args, *_self.__kwargs)
  File "/home/simon/sources/mailnag/Mailnag/daemon/idler.py", line 62, in _idle
     self._conn.idle(callback=callback)
  File "/home/simon/sources/mailnag/Mailnag/daemon/imaplib2.py", line 800, in idle
     return self._simple_command(name, **kw)
  File "/home/simon/sources/mailnag/Mailnag/daemon/imaplib2.py", line 1582, in _simple_command
     self._command(name, *args, callback=self._command_completer, cb_arg=kw, cb_self=True)
  File "/home/simon/sources/mailnag/Mailnag/daemon/imaplib2.py", line 1282, in _command
     raise self.abort('connection closed')
abort: connection closed

Checking email accounts at: Mon Dec 12 14:55:12 2011
Exception in thread Thread-24:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
     self.run()
  File "/usr/lib/python2.7/threading.py", line 505, in run
     self.__target(_self.__args, *_self.__kwargs)
  File "/home/simon/sources/mailnag/Mailnag/daemon/idler.py", line 62, in _idle
     self._conn.idle(callback=callback)
  File "/home/simon/sources/mailnag/Mailnag/daemon/imaplib2.py", line 800, in idle
     return self._simple_command(name, **kw)
  File "/home/simon/sources/mailnag/Mailnag/daemon/imaplib2.py", line 1582, in _simple_command
     self._command(name, *args, callback=self._command_completer, cb_arg=kw, cb_self=True)
  File "/home/simon/sources/mailnag/Mailnag/daemon/imaplib2.py", line 1282, in _command
     raise self.abort('connection closed')
abort: connection closed```

Enforce SSL encryption individually

Currently Mailnag tries to establish connections via SSL for every account. If this fails, an unencrypted connection is established.
An SSL checkbox should be added to the account window so SSL can be enabled individually on accounts that support this encryption method.

Error: cannot format subject

  Installed: 0.2-1+git20111115~oneiric
  Candidate: 0.2-1+git20111115~oneiric
  Version table:
 *** 0.2-1+git20111115~oneiric 0
        500 http://ppa.launchpad.net/webupd8team/gnome3/ubuntu/ oneiric/main amd64 Packages```


![Screenshot](http://img7.imagebanana.com/img/myt4t7af/captura_1124_230735.png)

mailnag-config discarded

Hi, I'm using mailnag with gnome 3 on Ubuntu 11.10. Mailnag doesn't want to start. When I run $ mailnag_config I get the message in the title above.
If i run python Mailnag/config_window.py i get this:

Traceback (most recent call last):
File "Mailnag/config_window.py", line 30, in
from gi.repository import GLib, GdkPixbuf, Gtk
File "/usr/lib/python2.7/dist-packages/gi/init.py", line 23, in
from ._gi import _API, Repository
ImportError: could not import gobject (error was: ImportError('When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject".',))

Any ideas?

[Migrated from launchpad] Add a way for email applications to register themselves to mailnag

[Julien Olivier]
I think the perfect solution to avoid having to configure email accounts both in mailnag and in the email client could be to add a way for email applications to "register" themselves to mailnag.

For example, mailnag would start with no configuration. Then, when evolution or thunderbird is launched, it would find the running mailnag and send it information about the user accounts so that mailnag automatically adds them automatically. Of course, this would need to add an extension in evolution or thunderbird to do the client part. It could even send information about how to open a new email and how to reply to it.

[pulb]
Nice idea, but I guess its easier for users to enter their accounts twice instead of messing around with plugin installations :-)

[Julien Olivier]
That's true, except that it is not too unrealistic to imagine that, if successfull, those extensions could come bundled into the email clients packages in distributions such as ubuntu or fedora.

[pulb]
I just noticed that popper (the mail notifier mailnag forked from) has an import button which enables you to import accounts (e.g. evolution) from gnome keyring. The code is available in mailnag too, just not yet exposed in the configuration gui.

[Julien Olivier]
That would already be a step in the right direction, but I'm convinced that we really need a solution that works automatically.

[pulb]
The import function imports all keyring keys starting with "pop://" or "smtp://". This includes evolution accounts, not sure about thunderbird though.But maybe the import function could detect automatically the presence of evolution or thunderbird...

Update mail list when mail has been read

I am having another problem which I would like to fix but I don't know where to start.

I am currently using it with both gmail and some other imap services using push mail (idle state). I would expect that the mail disappears from mailnag notify window (and the counter decreases in the shell-message-notifier) once the mail has been marked as read by an external program. Currently it does not, is this a problem with using push mail or does it behave this way by design? I also do not know much about the imap protocol, does it push changes or only new mail?

Checking mail after entering password

First, thank you for this nice application. Gnome-shell needed it :)

This isn't a bug report but could rather be added to the the wishlist.

Mailnag works as expected except for two rare occasions:

(1) When the system is started for the first time and Gnome session begins, gnome keyring wants my password. It seems that Mailnag doesn't check email immediately after the password is entered while Popper did;

(2) Once I started the computer but forgot to turn on the router. After going to the Gnome session, I turned on the router but it seems that Mailnag didn't check mails immediately after that; again, popper did so.

I use Mailnag to check my two Gmail accounts with "pop.gmail.com".

no module named urllib2

I get this when trying to run mailnag_config:

File /path/to/pulb-mailnag-8cc98be/Mailnag/common/utils.py", line 30, in
import urllib2
ImportError: No module named urllib2
mailnag-config discarded.

mailchecker fails with add_action() number of arguments

After updating Arch Linux and Fedora 20 to Gnome 3.10, I found that mailnag
failed with:
Checking 4 email account(s) at: Sun Oct 6 11:35:00 2013
KeyError exception for key 'Subject' in message.
Could not get subject from POP message.
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/Mailnag/mailnag.py", line 150, in poll_func
mailchecker.check(non_idle_accounts)
File "/usr/lib/python2.7/site-packages/Mailnag/daemon/mailchecker.py", line 99, in check
self._notify_single(new_mails)
File "/usr/lib/python2.7/site-packages/Mailnag/daemon/mailchecker.py", line 148, in _notify_single
n = self._get_notification(mail.sender, mail.subject, "mail-unread")
File "/usr/lib/python2.7/site-packages/Mailnag/daemon/mailchecker.py", line 158, in _get_notification
n.add_action("default", "default", self._notification_action_handler, None, None)
TypeError: add_action() takes exactly 5 arguments (6 given)

I resolved the issue with the following patch, which probably breaks earlier versions
of Notify():

diff --git a/Mailnag/daemon/mailchecker.py b/Mailnag/daemon/mailchecker.py
index fa06717..615df1e 100644
--- a/Mailnag/daemon/mailchecker.py
+++ b/Mailnag/daemon/mailchecker.py
@@ -101,7 +101,8 @@ class MailChecker:
# play sound if it is enabled in mailnags settings and
# gnome-shell notifications aren't disabled
if (self._cfg.get('general', 'playsound') == '1') and \

  •               (self._gsettings.get_int('saved-session-presence') != 2):
    
  •               (('saved-sesion-presence' not in self._gsettings) or \
    
  •                (self._gsettings.get_int('saved-session-presence') != 2)):
                gstplay(get_data_file(self._cfg.get('general', 'soundfile')))
    
        self._reminder.save(self._mail_list)
    

    @@ -147,7 +148,7 @@ class MailChecker:
    for mail in new_mails:
    n = self._get_notification(mail.sender, mail.subject, "mail-unread")
    notification_id = str(id(n))

  •       n.add_action("mark-as-read", _("Mark as read"), self._notification_action_handler, (mail, notification_id), None)  
    
  •       n.add_action("mark-as-read", _("Mark as read"), self._notification_action_handler, (mail, notification_id))
        n.show()
        self._notifications[notification_id] = n
    

@@ -155,7 +156,7 @@ class MailChecker:
def _get_notification(self, summary, body, icon):
n = Notify.Notification.new(summary, body, icon)
n.set_category("email")

  •   n.add_action("default", "default", self._notification_action_handler, None, None)
    
  •   n.add_action("default", "default", self._notification_action_handler, None)
    
    return n
    

Mail status extention

It would be convenient to always show mail status before your eyes. To do this, you can write extention to display icon near volume control and other indicators.

Use default mail application

Rather than offer a box to type in a command name, shouldn't mailnag use the mail reader as configured in System Settings→System Info→Default Applications? One less thing to configure, one more thing that Just Works™…

(Thanks for this app; yet another example of a helpful developer filling in the pieces missing from GNOME 3.)

ping test for network connectivity is unreliable

Does not work with a LAN-only connection, ICMP-blocking firewall, etc...

Consider looking at NetworkManager connection state (org.freedesktop.NetworkManager.Connection.Active). Here's a python example:

www.puyb.net/download/OpenWifiAutoConnect.py

As a fallback for non-NetworkManager-managed systems you could do a ping test. But ping one of the /etc/resolv.conf name servers or test that you can open a TCP connection to one of the user's configured mailservers.

[Migrated from launchpad] Setup.py for better distro integration

[llaumgui]
Hi,

currently where isn't any installation script like setup.py
(http://docs.python.org/dev/install/pysetup.html) for a better distro integration.

[pulb]
Hi,

thanks for your bugreport.

Unfortunately I'm currently very busy with reallife work and other projects so I have very little time left to work on Mailnag, let alone to mess around with python configuration stuff.
I'd be very pleased if someone could help out here, the needed python dependencies are listed in the README file.

Mailnag doesn't notify the second time it checks.

The first time Mailnag starts-up with the OS, it notifies about emails like it should, but after I read those emails and empty everything, it kind of stops working even if I get a new mail!

I tried killing it and starting it again, I got the same results. logging out doesn't do it either.

I tried it with a new email and with a previously read email set to un-read. I'm willing to restart the computer to test it further.

Wrong unread email count

I'm using mailnag to check on 3 gmail acounts and I'm getting the wrong unread email count. It's higher than the real unread email count.

Is this a bug?

Cheers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.