Re: Limit IMAP/IMAPS listening IPs

2017-06-25 Thread Mart Pirita
Dudi Goldenberg wrote:
> Hello list.
>
> I am running dovecot v2.2.13 on debian 8.8;
>
> I tried to add a "address =" statement for only localhost and one private IP, 
> but then I got a complaint from system:
>
> dovecot[20515]: Error: systemd listens on port 143, but it's not configured 
> in Dovecot. Closing.
>
> What is the proper way to resolve this?
>

I suggest to use iptables for this.


-- 
Mart


Re: Limit IMAP/IMAPS listening IPs

2017-06-25 Thread Marcus Rueckert

On 2017-06-24 17:59, Dudi Goldenberg wrote:

Hello list.

I am running dovecot v2.2.13 on debian 8.8;

I tried to add a "address =" statement for only localhost and one
private IP, but then I got a complaint from system:

dovecot[20515]: Error: systemd listens on port 143, but it's not
configured in Dovecot. Closing.

What is the proper way to resolve this?


$ mkdir -p /etc/systemd/system/dovecot.socket.d
$ vim /etc/systemd/system/dovecot.socket.d/ports.conf

content:

[Socket]
# unset all ports defined in the global file
ListenStream=
# add our new ports
ListenStream=[1.2.3.4]:143

$ systemctl daemon-reload
$ systemctl restart dovecot.socket dovecot.service

--
   openSUSE - SUSE Linux is my linux
   openSUSE is good for you
   www.opensuse.org


Re: Limit IMAP/IMAPS listening IPs

2017-06-25 Thread Marcus Rueckert

On 2017-06-25 14:10, Marcus Rueckert wrote:

ListenStream=[1.2.3.4]:143


of course the [] are only needed for ipv6 IPs and not also IPv4


RE: Limit IMAP/IMAPS listening IPs

2017-06-25 Thread Dudi Goldenberg
Hi,

>> What is the proper way to resolve this?
>
>$ mkdir -p /etc/systemd/system/dovecot.socket.d
>$ vim /etc/systemd/system/dovecot.socket.d/ports.conf
>
>content:
>
>[Socket]
># unset all ports defined in the global file ListenStream= # add our new ports
>ListenStream=[1.2.3.4]:143
>
>$ systemctl daemon-reload
>$ systemctl restart dovecot.socket dovecot.service

Thanks for the prompt reply!

How do I specify more than 1 IP? I'd like 127.0.0.1 and say 192.168.1.100 only.

Regards,

Dudi


Re: Limit IMAP/IMAPS listening IPs

2017-06-25 Thread Marcus Rueckert

On 2017-06-25 19:15, Dudi Goldenberg wrote:
How do I specify more than 1 IP? I'd like 127.0.0.1 and say 
192.168.1.100 only.


Multiple ListenStream lines.