[systemd-devel] Fwd: dovecot and systemd

Lennart Poettering lennart at poettering.net
Tue Apr 10 15:20:59 PDT 2012


On Thu, 05.04.12 12:26, Michal Hlavinka (mhlavink at redhat.com) wrote:

> >This is what we do in CUPS and what I think is a nice approach since it
> >basically means that any user configuration is always taken into
> >account.
> 
> Unfortunately, this can't be used here. CUPS offers only one
> service, so it always know what to expect on any connection.
> Dovecot, on the other hand, provides five services (imap, imaps,
> pop3, pop3s, managesieve) and when it gets connection on port that
> is not configured in it's config files, it can't know what to do
> with the connection.
> 
> So if the connection comes to extra port, it won't be served. There
> are three possibilities what can happen next:
> 1) just log message that configuration does not match, do nothing
> 2) log message and close socket that listens on port dovecot won't serve
> 3) log message and terminate dovecot

> I think the 2nd option is the best one here. 

I'd vote for the 2nd option as well.

> Does systemd provide any API to close those sockets?

Hmm, no, but you can simply close all sockets you get passed and don't
know what do with. Just go through the open fds, use the ones you
recognize and close the ones you don't.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list