Hi

Good idea. Indeed there is no ip address yet when opensmtpd start... 

Any way to correct the systemd service to tell him to wait for an ip address ?

I know it's not an opensmtpd package but more a bug with the integration on 
debian and systemd, doesn't it ?


Le 7 août 2017 18:48:30 GMT+02:00, Ryan Kavanagh <r...@debian.org> a écrit :
>package opensmtpd
>tags 871311 + moreinfo
>thanks
>
>Hi Nicolas,
>
>On Mon, Aug 07, 2017 at 05:16:07PM +0200, Nicolas Repentin wrote:
>> Aug 07 17:07:00 debian opensmtpd[380]: invalid virtual ip or
>interface:
>> enp1s0
>> 
>> The interface really exists:
>
>Does enp1s0 have an associated inet4/inet6 address? I tried debugging
>here, and observed that I can start smtpd with it listening on an
>interface only if that interface has an address. Here's what happens
>when I assign my (unplugged ethernet) interface eno1 a bogus address
>and
>try to start smtpd, versus what happens when I try to start smtpd when
>eno1 doesn't have an address associated with it.
>
>rak@zeta:~$ grep eno1 /etc/smtpd.conf
>listen on eno1
>rak@zeta:~$ sudo ip address flush dev eno1
>rak@zeta:~$ ip addr show eno1
>2: eno1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast
>state DOWN group default qlen 1000
>    link/ether 20:47:47:ae:78:79 brd ff:ff:ff:ff:ff:ff
>rak@zeta:~$ sudo smtpd -n
>invalid virtual ip or interface: eno1
>rak@zeta:~$ sudo ip addr add 123.123.123.123 dev eno1
>rak@zeta:~$ ip addr show eno1
>2: eno1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast
>state DOWN group default qlen 1000
>    link/ether 20:47:47:ae:78:79 brd ff:ff:ff:ff:ff:ff
>    inet 123.123.123.123/32 scope global eno1
>       valid_lft forever preferred_lft forever
>rak@zeta:~$ sudo smtpd -n
>configuration OK
>rak@zeta:~$ sudo ip address flush dev eno1
>rak@zeta:~$ sudo smtpd -n
>invalid virtual ip or interface: eno1
>
>Best wishes,
>Ryan
>
>-- 
>|_)|_/  Ryan Kavanagh      | GPG: 4E46 9519 ED67 7734 268F
>| \| \  https://ryanak.ca/ |      BD95 8F7B F8FC 4A11 C97A

-- 
Nicolas

Reply via email to