{"action":"created","issue":{"url":"https://api.github.com/repos/haraka/Haraka/issues/2509","repository_url":"https://api.github.com/repos/haraka/Haraka","labels_url":"https://api.github.com/repos/haraka/Haraka/issues/2509/labels{/name}","comments_url":"https://api.github.com/repos/haraka/Haraka/issues/2509/comments","events_url":"https://api.github.com/repos/haraka/Haraka/issues/2509/events","html_url":"https://github.com/haraka/Haraka/issues/2509","id":363662310,"node_id":"MDU6SXNzdWUzNjM2NjIzMTA=","number":2509,"title":"LMTP delivery crashes haraka","user":{"login":"pvagner","id":2298916,"node_id":"MDQ6VXNlcjIyOTg5MTY=","avatar_url":"https://avatars3.githubusercontent.com/u/2298916?v=4","gravatar_id":"","url":"https://api.github.com/users/pvagner","html_url":"https://github.com/pvagner","followers_url":"https://api.github.com/users/pvagner/followers","following_url":"https://api.github.com/users/pvagner/following{/other_user}","gists_url":"https://api.github.com/users/pvagner/gists{/gist_id}","starred_url":"https://api.github.com/users/pvagner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pvagner/subscriptions","organizations_url":"https://api.github.com/users/pvagner/orgs","repos_url":"https://api.github.com/users/pvagner/repos","events_url":"https://api.github.com/users/pvagner/events{/privacy}","received_events_url":"https://api.github.com/users/pvagner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-09-25T16:22:04Z","updated_at":"2018-12-10T18:03:44Z","closed_at":null,"author_association":"NONE","body":"### system info\r\n\r\nHaraka | Haraka.js — Version: 2.8.21\r\n --- | :--- \r\nNode | v10.11.0\r\nOS | Linux vps.mydomain.tld 3.16.6-042stab127.46 #1 SMP Wed Mar 28 01:57:40 CEST 2018 x86_64 GNU/Linux\r\nopenssl | OpenSSL 1.1.1  11 Sep 2018\r\n\r\n\r\n### Expected behavior\r\n\r\nWhen sending out messages via lmtp to dovecot I started getting errors like this.\r\nI am not able to figure out what might be affecting this. I have tried downgrading node and dovecot to previously working versions and I can't make it work.\r\nMessages are delivered via lmtp however haraka crashes like this.\r\n```\r\n\r\n[DEBUG] [CA4E3D5B-E4FE-44A2-9643-5893B914DE33.1.1] [outbound] Sending mail: 1537885957544_1537885957544_0_21768_GGPZLK_1_vps.mydomain.tld\r\n[DEBUG] [CA4E3D5B-E4FE-44A2-9643-5893B914DE33.1.1] [outbound] running get_mx hooks\r\n[DEBUG] [CA4E3D5B-E4FE-44A2-9643-5893B914DE33.1.1] [outbound] running get_mx hook in queue/lmtp plugin\r\n[NOTICE] [CA4E3D5B-E4FE-44A2-9643-5893B914DE33.1.1] [queue/lmtp] {\"main\":{\"path\":\"/run/dovecot/lmtp\"}}\r\n[NOTICE] [CA4E3D5B-E4FE-44A2-9643-5893B914DE33.1.1] [queue/lmtp] {\"using_lmtp\":true,\"priority\":0,\"exchange\":\"127.0.0.1\",\"path\":\"/run/dovecot/lmtp\"}\r\n[INFO] [CA4E3D5B-E4FE-44A2-9643-5893B914DE33.1.1] [outbound]  hook=get_mx plugin=queue/lmtp function=hook_get_mx params=exampledomain.com retval=OK msg=\"[object Object]\"\r\n[DEBUG] [CA4E3D5B-E4FE-44A2-9643-5893B914DE33.1.1] [outbound] Got an MX from Plugin: exampledomain.com => 0 [object Object]\r\n[INFO] [CA4E3D5B-E4FE-44A2-9643-5893B914DE33.1.1] [outbound] Attempting to deliver to: /run/dovecot/lmtp:25 using LMTP (0) (0)\r\n[INFO] [-] [core] [outbound] [outbound::25:/run/dovecot/lmtp:undefined:0] dispense() clients=1 available=0\r\n[DEBUG] [-] [core] [outbound] [outbound::25:/run/dovecot/lmtp:undefined:0] createResource() - creating obj - count=1 min=0 max=10\r\n[DEBUG] [8EA6BF2D-E14A-4066-9901-095F6EA4E14A] [core] [outbound] created\r\n[INFO] [-] [core] [outbound] acquired socket 8EA6BF2D-E14A-4066-9901-095F6EA4E14A for outbound::25:/run/dovecot/lmtp:undefined:0\r\n[DEBUG] [CA4E3D5B-E4FE-44A2-9643-5893B914DE33.1.1] [outbound] Trying TLS for domain: exampledomain.com, host: /run/dovecot/lmtp\r\n[DEBUG] [-] [core] client TLS upgrade in progress, awaiting secured.\r\n[DEBUG] [-] [core] client TLS secured.\r\n[INFO] [CA4E3D5B-E4FE-44A2-9643-5893B914DE33.1.1] [outbound] secured verified=false cipher=TLS_AES_256_GCM_SHA384 version=TLSv1/SSLv3 error=ERR_TLS_CERT_ALTNAME_INVALID cn=mail.mydomain.tld organization=\"\" issuer=\"Let's Encrypt\" expires=\"Dec 20 18:06:46 2018 GMT\" fingerprint=6D:CC:77:3D:63:51:A8:4B:AE:0B:8A:28:1B:69:6E:B5:E1:C2:DB:73\r\n[DEBUG] [-] [core] client TLS secured.\r\n[INFO] [CA4E3D5B-E4FE-44A2-9643-5893B914DE33.1.1] [outbound] secured verified=false cipher=TLS_AES_256_GCM_SHA384 version=TLSv1/SSLv3 error=ERR_TLS_CERT_ALTNAME_INVALID cn=mail.mydomain.tld organization=\"\" issuer=\"Let's Encrypt\" expires=\"Dec 20 18:06:46 2018 GMT\" fingerprint=6D:CC:77:3D:63:51:A8:4B:AE:0B:8A:28:1B:69:6E:B5:E1:C2:DB:73\r\n[DEBUG] [-] [core] client TLS secured.\r\n[INFO] [CA4E3D5B-E4FE-44A2-9643-5893B914DE33.1.1] [outbound] secured verified=false cipher=TLS_AES_256_GCM_SHA384 version=TLSv1/SSLv3 error=ERR_TLS_CERT_ALTNAME_INVALID cn=mail.mydomain.tld organization=\"\" issuer=\"Let's Encrypt\" expires=\"Dec 20 18:06:46 2018 GMT\" fingerprint=6D:CC:77:3D:63:51:A8:4B:AE:0B:8A:28:1B:69:6E:B5:E1:C2:DB:73\r\n[NOTICE] [CA4E3D5B-E4FE-44A2-9643-5893B914DE33.1.1] [outbound]  delivered file=1537885957544_1537885957544_0_21768_GGPZLK_1_vps.mydomain.tld domain=exampledomain.com host=127.0.0.1 ip=/run/dovecot/lmtp port=25 mode=LMTP tls=Y auth=N response=OK delay=0.167 fails=0 rcpts=1/0/0\r\n[DEBUG] [CA4E3D5B-E4FE-44A2-9643-5893B914DE33.1.1] [ou\t\ttbound] running delivered hooks\r\n[DEBUG] [-] [core] Temp fail for: Upstream error: 354OK\r\n[DEBUG] [CA4E3D5B-E4FE-44A2-9643-5893B914DE33.1.1] [outbound] running deferred hooks\r\n[INFO] [CA4E3D5B-E4FE-44A2-9643-5893B914DE33.1.1] [outbound] Temp failing 1537885957544_1537885957544_0_21768_GGPZLK_1_vps.mydomain.tld for 64 seconds: Upstream error: 354OK\r\n[INFO] [CA4E3D5B-E4FE-44A2-9643-5893B914DE33.1.1] [outbound] bouncing mail: Error re-queueing email: Error: ENOENT: no such file or directory, rename '/srv/haraka/inbound/queue/1537885957544_1537885957544_0_21768_GGPZLK_1_vps.mydomain.tld' -> '/srv/haraka/inbound/queue/1537885957544_1537886021711_1_21768_GGPZLK_2_vps.mydomain.tld'\r\n[DEBUG] [CA4E3D5B-E4FE-44A2-9643-5893B914DE33.1.1] [outbound] running bounce hooks\r\n[NOTICE] [CA4E3D5B-E4FE-44A2-9643-5893B914DE33.1.1] [outbound] Double bounce: Error populating bounce message: Error: ENOENT: no such file or directory, open '/srv/haraka/inbound/queue/1537885957544_1537885957544_0_21768_GGPZLK_1_vps.mydomain.tld'\r\n[CRIT] [-] [core] Error: Callback was already called.\r\n[CRIT] [-] [core]     at /usr/lib/node_modules/Haraka/node_modules/async/dist/async.js:966:32\r\n[CRIT] [-] [core]     at HMailItem.hmail.next_cb (/usr/lib/node_modules/Haraka/outbound/queue.js:41:9)\r\n[CRIT] [-] [core]     at HMailItem.double_bounce (/usr/lib/node_modules/Haraka/outbound/hmail.js:1254:14)\r\n[CRIT] [-] [core]     at /usr/lib/node_modules/Haraka/outbound/hmail.js:1238:29\r\n[CRIT] [-] [core]     at ReadStream.<anonymous> (/usr/lib/node_modules/Haraka/outbound/hmail.js:941:17)\r\n[CRIT] [-] [core]     at ReadStream.emit (events.js:182:13)\r\n[CRIT] [-] [core]     at lazyFs.open (internal/fs/streams.js:115:12)\r\n[CRIT] [-] [core]     at FSReqWrap.oncomplete (fs.js:141:20)\r\n```\r\n[NOTICE] [-] [core] Shutting down\r\n```\r\n\r\n### Observed behavior\r\n\r\nIt's happening to me since a few days ago however I have already tried reverting possible upgrades to restore the previous behaviour where haraka delivers messages via LMTP and don't crashes.\r\n\r\n### Steps to reproduce\r\n* Configure dovecot to accept mails via lmtp\r\n* Configure haraka to deliver messages to dovecot.\r\n* Send a message to haraka.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/haraka/Haraka/issues/comments/445912338","html_url":"https://github.com/haraka/Haraka/issues/2509#issuecomment-445912338","issue_url":"https://api.github.com/repos/haraka/Haraka/issues/2509","id":445912338,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NTkxMjMzOA==","user":{"login":"baudehlo","id":662371,"node_id":"MDQ6VXNlcjY2MjM3MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/662371?v=4","gravatar_id":"","url":"https://api.github.com/users/baudehlo","html_url":"https://github.com/baudehlo","followers_url":"https://api.github.com/users/baudehlo/followers","following_url":"https://api.github.com/users/baudehlo/following{/other_user}","gists_url":"https://api.github.com/users/baudehlo/gists{/gist_id}","starred_url":"https://api.github.com/users/baudehlo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baudehlo/subscriptions","organizations_url":"https://api.github.com/users/baudehlo/orgs","repos_url":"https://api.github.com/users/baudehlo/repos","events_url":"https://api.github.com/users/baudehlo/events{/privacy}","received_events_url":"https://api.github.com/users/baudehlo/received_events","type":"User","site_admin":false},"created_at":"2018-12-10T18:03:44Z","updated_at":"2018-12-10T18:03:44Z","author_association":"COLLABORATOR","body":"354 is the response LMTP should get from the DATA command. So I wonder if\nit somehow got mashed together, so instead of \"354 OK\" we saw \"354OK\".\nWeird.\n\nOn Mon, Dec 10, 2018 at 12:56 PM analogic <notifications@github.com> wrote:\n\n> @pvagner <https://github.com/pvagner> is it possible that the bug was\n> triggered by malformed email?\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/haraka/Haraka/issues/2509#issuecomment-445909819>, or mute\n> the thread\n> <https://github.com/notifications/unsubscribe-auth/AAobY27VnlLIH875A030t_YzzVDUYBAoks5u3qBQgaJpZM4W5Af9>\n> .\n>\n"}}
{"actor":{"display_login":"baudehlo"}}