Debugging and logs

If you hit issue there are couple things that might help you better understand what is going on with your delivery.

Delivery problems

One of most common problems when running own mailserver is delivery refusal. PRO version have advantage of Log viewer which visually helps with identify issue in most common cases.

PRO version

in summary detail:

Although this example is clearly quarantined spam, some cases might be not that simple and might require more details even with protocol and internal debug messages included. This is mostly required for reporting errors to support, since raw logs gives us enough information about processing.

For FREE version and more complicated cases when delivery transaction is not even started you might find useful debug logs placed at log/delivery

$ ls -1

$ grep *-total
2022-04-26-total:2022-04-26T07:07:24.507Z [36C26C1A-88AA-49B2-B4EA-BE43286094B6.1] () <> -> <>( - [17.113239][<>] 250 Quarantined! (36C26C1A-88AA-49B2-B4EA-BE43286094B6.1)


$ grep *-total
2022-04-26-total:2022-04-26T07:07:24.507Z [36C26C1A-88AA-49B2-B4EA-BE43286094B6.1] () <> -> <>( - [17.113239][<>] 250 Quarantined! (36C26C1A-88AA-49B2-B4EA-BE43286094B6.1)

Now we have obtained connection and transaction ID we can investigate further (36C26C1A-88AA-49B2-B4EA-BE43286094B6.1).

Interested folders are: - conn - connection initialization logs part with blacklist, whitelist, IP karma and reputation checks. - tx - transaction logs - sender and recipient, and mail itself - del - outbound delivery logs

(For more details please see Haraka internals.)

Connection log:

$ cat conn/3/6/36C26C1A-88AA-49B2-B4EA-BE43286094B6

2022-04-26T07:06:47.351Z [NOTICE] [core] connect ip= port=31211 local_ip= local_port=25
2022-04-26T07:06:47.351Z [DEBUG] [core] running connect_init hooks
2022-04-26T07:06:47.351Z [DEBUG] [core] running connect_init hook in guard plugin
2022-04-26T07:06:47.353Z [DEBUG] [core] hook=connect_init plugin=guard function=hook_connect_init params="" retval=CONT msg=""

Transaction log:

$ cat tx/3/6/36C26C1A-88AA-49B2-B4EA-BE43286094B6.1

2022-04-26T07:06:59.410Z [DEBUG] [core] running mail hooks
2022-04-26T07:06:59.410Z [DEBUG] [core] running mail hook in karma plugin
2022-04-26T07:06:59.410Z [DEBUG] [karma] tarpit capped to: 4

Delivery log:

(not available since original email was quarantined internaly)

$ cat del/3/6/36C26C1A-88AA-49B2-B4EA-BE43286094B6.1
cat: del/3/6/36C26C1A-88AA-49B2-B4EA-BE43286094B6.1: No such file or directory

Haraka crashing problems

There might be extreme cases when Haraka fails spectacularly and doesn't generate transaction log. Then there is nodejs output log to help placed at: - log/s6/haraka-smtp/current (port 25) - log/s6/haraka-submission/current (port 465 and 582)

Dovecot problems (imap, pop3, sieve, lmtp)

Most information you can find at log/syslog, Dovecot implementation is based on default settings. For detailed description logs or increasing verboseness of Dovecot please see official documentation.