ix-ai / smtp

This is a SMTP docker container for sending emails. You can also relay emails to gmail and amazon SES.
MIT License
97 stars 15 forks source link

Get error "lost while reading message data" some time #19

Closed jackchuong closed 1 year ago

jackchuong commented 1 year ago

Hi all, I'm using ixdotai/smtp as a sidecar container with my app container (PHP), for sending out email.

      containers:
      - name: myapp
        image: myapp
        imagePullPolicy: Always
        ...
      - name: smtp
        image: ixdotai/smtp
        env:
        - name: TZ
          value: "Asia/Ho_Chi_Minh"

myapp (PHP) will send out going emails through localhost smtp port 25 (smtp container), I'm getting strange problem. After a few hours of no use, users access myapp and use it to send out emails , it will fail , with smtp logs like

  337 LOG: MAIN
  337   SMTP connection from localhost ([10.244.0.81]) [127.0.0.1] lost while reading message data

Users try second , third time more , and it back to work normally.

  338 Exim version 4.94.2 uid=101 gid=101 pid=338 D=80001
Berkeley DB: Berkeley DB 5.3.28: (September  9, 2013)
Support for: crypteq iconv() IPv6 GnuTLS move_frozen_messages DANE DKIM DNSSEC Event I18N OCSP PIPE_CONNECT PRDR SOCKS TCP_Fast_Open
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmjz dbmnz dnsdb dsearch nis nis0 passwd
Authenticators: cram_md5 plaintext
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore autoreply lmtp pipe smtp
Fixed never_users: 0
Configure owner: 0:0
Size of off_t: 8
  338 LOG: queue_run MAIN
  338   Start queue run: pid=338
  338 LOG: queue_run MAIN
  338   End queue run: pid=338

The problem keeps repeating, I also tried with bytemark/smtp & namshi/smtp before, same problem , so it's my app's fault or something else ?

tlex commented 1 year ago

Hello,

Looking a bit for this, it looks like there is some problem with the network configuration (in particular, I've seen reports that mentioned having fixed the problem by either adjusting the MTU or by otherwise tuning the network interface card.

I'm sorry I can't help more here. The software inside the docker container is exim from the official debian repository. Any sort of problems with the software will need to be reported upstream, since this docker package only provides a couple of scripts.

jackchuong commented 1 year ago

I fixed my PHP app and problem was gone.