Sending email issue, LMTP connection localhost>localhost

Issue #1029 closed
Martin Koštial created an issue

Hello! after latest update of docker version (digest 6fab3cf4731c), I have issues with sending emails. Web UI show just "SMTP Error ()", Admin looks normal except Delivery quene, which is constantly loading and nothing is shown. Can you help please?

Jan 19 20:11:56 mail01 dovecot: lmtp(7180): Connect from local
Jan 19 20:11:56 mail01 dovecot: lmtp(user@domain.tld)<7180><lcgWBozXqmUMHAAADqa4FA>: Error: smtp-client: conn 127.0.0.1:587 [1]: connect(127.0.0.1:587) failed: Connection refused
Jan 19 20:11:56 mail01 dovecot: lmtp(user@domain.tld)<7180><lcgWBozXqmUMHAAADqa4FA>: Error: sieve: msgid=592597239-2785860@senderdomain.tld: redirect action: failed to redirect message to forwardrecipient@recipientdomain.tld: smtp(127.0.0.1:587): RCPT TO failed: Failed to connect to remote server (temporary failure)
Jan 19 20:11:56 mail01 dovecot: lmtp(user@domain.tld)<7180><lcgWBozXqmUMHAAADqa4FA>: Error: sieve: Execution of script /data/domains/domain.tld/user/.dovecot.sieve was aborted due to temporary failure (user logfile /data/domains/domain.tld/user/.dovecot.sieve.log may reveal additional details)
Jan 19 20:11:56 mail01 dovecot: lmtp(7180): Disconnect from local: Logged out (state=READY)

Comments (14)

  1. Martin Koštial reporter

    It looks like it’s fiixed, I dunno why this happened. Only thing may be that there were maybe some DB upgrade running after?

  2. SH repo owner

    It might be temporarry error - see log/s6/haraka-submission/* if there is any error with restart afterwards

  3. Martin Koštial reporter

    I see this:

    2024-01-26 13:01:53.752917500  [DEBUG] [F2EE05E6-845B-4D3E-8D0B-A7A14678064A.1.1] [outbound] Trying TLS for domain: someDomain, host: someIP
    2024-01-26 13:01:53.752924500  [PROTOCOL] [F2EE05E6-845B-4D3E-8D0B-A7A14678064A.1.1] [outbound] C: STARTTLS
    2024-01-26 13:01:53.753110500  [PROTOCOL] [E8EE3552-7F95-4DE4-B5C7-2E1E7555FB50.1.1] [outbound] C: .
    2024-01-26 13:01:53.753541500  [CRIT] [-] [core] Error: EACCES: permission denied, open '/var/log/delivery/del/F/2/F2EE05E6-845B-4D3E-8D0B-A7A14678064A.1'
    2024-01-26 13:01:53.753782500  [NOTICE] [-] [core] Shutting down
    

    and also it started sending error reports to sender:

    Reaction of the server: Error: Too many failures (Some recipients temp failed: <localuser@mailserver.example.net>)

    Final-Recipient: rfc822;localuser@mailserver.example.net
    Action: failed
    Status: 5.2.0
    Remote-MTA: 127.0.0.1
    Diagnostic-Code: smtp;451 4.2.0 localuser@mailserver.example.net Execution of Sieve filters was aborted due to temporary failure

  4. Martin Koštial reporter

    Oh, docker last status report this:

    Clamd is running Rspamd is running Cron is running Dovecot is running NGiNX is running p0f is running PHP-fpm is running Redis is running SMTP is running Submission is not running

  5. Martin Koštial reporter

    I have fixed issue by creating missing file in error log, then clearing mail quene and it seems to be working just fine. There were 2 files missing, one in F/2/ and other one in 2/A/. for some reason, file was not created so haraka-submission was not able to read it and restarted. Maybe you can implement some check or warning in admin webUI if some of service is failing with log? Maybe if it’s possible, let haraka-submission running in case of these errors and report to admin?

  6. Martin Koštial reporter

    webmail is unable to send email on first try, after tapping “send” button, I am getting error:

    on 2nd tap “send” it will send email correctly. sometimes it will show also sender email address in this error.

    oh well, error is back, with different file:

    '/var/log/delivery/del/9/E/9EB12756-DC7D-45F0-A934-15308C5ED5DA.1'

  7. Martin Koštial reporter

    to correct informations:
    It’s happening when email is received, not sent. I tought it’s sending issue because I was forwarding received emails, that’s it’s mission.

    current state:

    email received >

    a) nothing delivered, service is running

    b) service is stopped, haraka-submission or haraka-smtp, with error from haraka I have mentioned earlier.

    after removing /data/quene/submission/file or /data/quene/smtp/file, service is able to run again, and email is ocassionaly delivered, not always. kinda weird.

    system is running in Qemu/KVM VM and Vdisk is using ZFS dataset, updated docker, host AMD R9-5950x, 128GB ECC RAM, ZFS on quad NVMe (ZFS’s RAID1 equivalent (2xmirror and stripe)), everything in perfect condition.

  8. Martin Koštial reporter

    I will migrate data to new poste.io container, can you help me with reindexing mailbox? INBOX seems to be in Maildir/cur/ folder, so I have copied all emails from old container to new one. I will keep old container for test if you need.

  9. SH repo owner

    Please try the latest one (released today). There is an awful NodeJS bug that corrupts the delivery directory with files owned by root that are not available to the mail:mail process.

    Older files can be fixed with chown 88:8 /data/log/delivery -R

  10. Martin Koštial reporter

    seems to be working without issues on 2.3.19, in new/old container. anyway, can you help me with that migration of emails? There are new emails delivered to new container and I need to merge them with older one.

  11. SH repo owner

    Please update to the latest and fix the permissions - there was a nodejs bug that caused a lot of bugs. If this does not work, please open a new ticket.

  12. Log in to comment