cherti / mailexporter

Export Prometheus-style metrics about mail server functionality
https://prometheus.io
GNU General Public License v3.0
45 stars 9 forks source link

mailexporter fails to delete mail in maildir #29

Closed ScrumpyJack closed 5 years ago

ScrumpyJack commented 5 years ago

here is some debug

DEBUG: adding path to watcher: /home/ScrumpyJack/Maildir/monitor/new
DEBUG: composed payload: host-7KnoD0ya5gQKW0HhUxzr1q8i5nbfh3Old9ahFOgw-1552920210121102350
DEBUG: sending mail
DEBUG: payload to decompose: [110 111 45 115 112 97 109 46 117 107 45 55 75 110 111 68 48 121 97 53 103 81 75 87 48 72 104 85 120 122 114 49 113 56 105 53 110 98 102 104 51 79 108 100 57 97 104 70 79 103 119 45 49 53 53 50 57 50 48 50 49 48 49 50 49 49 48 50 51 53 48]
DEBUG: no fitting decomp
WARNING: Delivery-Timeout, Message-ID: host-7KnoD0ya5gQKW0HhUxzr1q8i5nbfh3Old9ahFOgw-1552920210121102350@host

the debug messages don't tell me much. can you interpret them?

ScrumpyJack commented 5 years ago

Found the bug:

the payload is composed of a string join of three elements (name, token, time) joined by "-", and to be decomposed later: so if the name value, chosen by the user

servers:
    - name: my-mail-host

contains "-", the decompose fails

cherti commented 5 years ago

Because you have a - in your configname, which mailexporter uses as a delimiter for the tokens and can therefore not be used in config names (although this is not documented currently). The quickfix for you is to replace that with an underscore or leave it out entirely. Equally you should receive a mail_deliver_success-value of 0, correct?

I'm working on a fix inside of mailexporter.

cherti commented 5 years ago

ah, you found it as well

cherti commented 5 years ago

Should be fixed, you can rebuild from master. If you still encounter any problems, feel free to reopen. :)