On 22-06-14 21:10, Nolan Darilek wrote:
> Hi.
> 
> I'm attempting to use DBMail along with OpenSMTPD as a containerized
> email solution. Each component runs as a single process in a Docker
> container without syslog. Ideally all logging is sent to stdout/stderr
> so the "docker logs" command, and indirectly journalctl on CoreOS, can
> read container logs.

ok. sounds viable.


> Unfortunately, I'm encountering some errors in the communication between
> OpenSMTPD and DBMail that I'd imagine should log something, only I get
> nothing. I have this in my config:
> 
> syslog_logging_levels     = 255
> file_logging_levels       = 255
> 
> I would assume this should leave something in /var/log/dbmail.{log,err},
> but both are empty. Ideally I'd like for there not to be a
> dbmail.{log,err} and just log everything to stdout/stderr.

In file_logging mode all stderr output is simply redirected to the
error_log file. So the basic infrastructure is there. It just needs to
skip the redirection step (scan for freopen).

> 
> What am I missing? I can't find any documentation on how to do this.

Eh. Docker hit 1.0 only last week or so. What did you expect :-) No-one
ever asked for stderr/stdout logging on the tty before, ever!

> Docker shows no process output for dbmail-lmtp even after I connect
> manually and send all sorts of bad data that I'd expect to log
> *something*, even if only "session connected, session disconnected."

So how *are* you launching dbmail-lmtpd? I suppose you specify it in the
CMD statement of your dockerfile, but you might clarify here. Perhaps
even share your dockerfile.

If *I* would launch lmtpd from a single-process container I would use
something like

CMD ["/usr/sbin/dbmail-lmtpd", "-D"]

But maybe you're doing it differently.

Anyway. DBMail not logging at all means something else is going on. Can
you properly connect and get a decent handshake when talking to lmtpd (a
220 reply)?

Have you tried running the container with /bin/bash as entrypoint and
starting the lmtpd process manually, perhaps even in stdin/stdout mode
using -n ? Just to see if it actually works and is able to talk to the
database etc.



-- 
________________________________________________________________
Paul J Stevens       pjstevns @ gmail, twitter, github, linkedin
           www.nfg.nl/[email protected]/+31.85.877.99.97
_______________________________________________
DBmail mailing list
[email protected]
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

Reply via email to