# mail server died with kern.ipc.maxpipekva exceeded



## dieselnutjob (Jul 12, 2021)

Hi, last night my mail server died.
I could no longer ssh into the server.
When I logged onto the console with VNC this is what I got:-





I could not login so I rebooted the server vm from the providers boot controls.

Since then I did

```
freebsd-update fetch
freebsd-update install
pkg upgrade
```
I only run binary packages.
I am on FreeBSD 12.2-RELEASE-p7 GENERIC  i386


I built this server many, many years ago and it has been upgraded and upgraded, with no clean rebuilds, but that shouldn't matter right?

Here is the output of a command I found by googling the problem

```
mail# fstat | grep pipe
root     csh         1097    0* pipe  47629f0 <->  4762ab8      0 rw
root     fstat       1096    1* pipe  4762ab8 <->  47629f0      0 rw
auser1   imap        1059    2* pipe 12a07910 <-> 12a07848      0 rw
auser1   imap        1059    3* pipe 12a0cc60 <-> 12a0cb98      0 rw
auser1   imap        1059    5* pipe 12a06270 <-> 12a061a8      0 rw
auser1   imap        1059    6* pipe 12a05e08 <-> 12a05d40      0 rw
auser1   imap        1059   13* pipe 12a17b98 <-> 12a17c60      0 rw
auser1   imap        1059   14* pipe 12a17c60 <-> 12a17b98      0 rw
dovenull imap-login  1058    2* pipe 12a92270 <-> 12a921a8      0 rw
dovenull imap-login  1058    3* pipe 12a0cc60 <-> 12a0cb98      0 rw
dovenull imap-login  1058    5* pipe 128375c0 <-> 128374f8      0 rw
dovenull imap-login  1058    6* pipe 12a0c910 <-> 12a0c848      0 rw
dovenull imap-login  1058   15* pipe  4763350 <->  4763418      0 rw
dovenull imap-login  1058   16* pipe  4763418 <->  4763350      0 rw
auser1   imap        1055    2* pipe 12a07910 <-> 12a07848      0 rw
auser1   imap        1055    3* pipe 12a0cc60 <-> 12a0cb98      0 rw
auser1   imap        1055    5* pipe 12a06270 <-> 12a061a8      0 rw
auser1   imap        1055    6* pipe 12a05e08 <-> 12a05d40      0 rw
auser1   imap        1055   13* pipe 128366a0 <-> 12836768      0 rw
auser1   imap        1055   14* pipe 12836768 <-> 128366a0      0 rw
auser2   imap        1041    2* pipe 12a07910 <-> 12a07848      0 rw
auser2   imap        1041    3* pipe 12a0cc60 <-> 12a0cb98      0 rw
auser2   imap        1041    5* pipe 12a06270 <-> 12a061a8      0 rw
auser2   imap        1041    6* pipe 12a05e08 <-> 12a05d40      0 rw
auser2   imap        1041   13* pipe  47be4f8 <->  47be5c0      0 rw
auser2   imap        1041   14* pipe  47be5c0 <->  47be4f8      0 rw
dovenull imap-login  1040    2* pipe 12a92270 <-> 12a921a8      0 rw
dovenull imap-login  1040    3* pipe 12a0cc60 <-> 12a0cb98      0 rw
dovenull imap-login  1040    5* pipe 128375c0 <-> 128374f8      0 rw
dovenull imap-login  1040    6* pipe 12a0c910 <-> 12a0c848      0 rw
dovenull imap-login  1040   15* pipe 12a92350 <-> 12a92418      0 rw
dovenull imap-login  1040   16* pipe 12a92418 <-> 12a92350      0 rw
dovenull imap-login  1025    2* pipe 12a92270 <-> 12a921a8      0 rw
dovenull imap-login  1025    3* pipe 12a0cc60 <-> 12a0cb98      0 rw
dovenull imap-login  1025    5* pipe 128375c0 <-> 128374f8      0 rw
dovenull imap-login  1025    6* pipe 12a0c910 <-> 12a0c848      0 rw
dovenull imap-login  1025   15* pipe  47631a8 <->  4763270      0 rw
dovenull imap-login  1025   16* pipe  4763270 <->  47631a8      0 rw
auser3   imap        1024    2* pipe 12a07910 <-> 12a07848      0 rw
auser3   imap        1024    3* pipe 12a0cc60 <-> 12a0cb98      0 rw
auser3   imap        1024    5* pipe 12a06270 <-> 12a061a8      0 rw
auser3   imap        1024    6* pipe 12a05e08 <-> 12a05d40      0 rw
auser3   imap        1024   13* pipe  4762d40 <->  4762e08      0 rw
auser3   imap        1024   14* pipe  4762e08 <->  4762d40      0 rw
dovenull imap-login  1023    2* pipe 12a92270 <-> 12a921a8      0 rw
dovenull imap-login  1023    3* pipe 12a0cc60 <-> 12a0cb98      0 rw
dovenull imap-login  1023    5* pipe 128375c0 <-> 128374f8      0 rw
dovenull imap-login  1023    6* pipe 12a0c910 <-> 12a0c848      0 rw
dovenull imap-login  1023   15* pipe 128369f0 <-> 12836ab8      0 rw
dovenull imap-login  1023   16* pipe 12836ab8 <-> 128369f0      0 rw
auser4   imap        1020    2* pipe 12a07910 <-> 12a07848      0 rw
auser4   imap        1020    3* pipe 12a0cc60 <-> 12a0cb98      0 rw
auser4   imap        1020    5* pipe 12a06270 <-> 12a061a8      0 rw
auser4   imap        1020    6* pipe 12a05e08 <-> 12a05d40      0 rw
auser4   imap        1020   13* pipe  47bd9f0 <->  47bdab8      0 rw
auser4   imap        1020   14* pipe  47bdab8 <->  47bd9f0      0 rw
dovenull imap-login  1019    2* pipe 12a92270 <-> 12a921a8      0 rw
dovenull imap-login  1019    3* pipe 12a0cc60 <-> 12a0cb98      0 rw
dovenull imap-login  1019    5* pipe 128375c0 <-> 128374f8      0 rw
dovenull imap-login  1019    6* pipe 12a0c910 <-> 12a0c848      0 rw
dovenull imap-login  1019   15* pipe 13377848 <-> 13377910      0 rw
dovenull imap-login  1019   16* pipe 13377910 <-> 13377848      0 rw
auser2   imap        1009    2* pipe 12a07910 <-> 12a07848      0 rw
auser2   imap        1009    3* pipe 12a0cc60 <-> 12a0cb98      0 rw
auser2   imap        1009    5* pipe 12a06270 <-> 12a061a8      0 rw
auser2   imap        1009    6* pipe 12a05e08 <-> 12a05d40      0 rw
auser2   imap        1009   13* pipe 12a0e1a8 <-> 12a0e270      0 rw
auser2   imap        1009   14* pipe 12a0e270 <-> 12a0e1a8      0 rw
dovenull imap-login  1008    2* pipe 12a92270 <-> 12a921a8      0 rw
dovenull imap-login  1008    3* pipe 12a0cc60 <-> 12a0cb98      0 rw
dovenull imap-login  1008    5* pipe 128375c0 <-> 128374f8      0 rw
dovenull imap-login  1008    6* pipe 12a0c910 <-> 12a0c848      0 rw
dovenull imap-login  1008   15* pipe  4763000 <->  47630c8      0 rw
dovenull imap-login  1008   16* pipe  47630c8 <->  4763000      0 rw
dovecot  stats       1001    2* pipe 12a055c0 <-> 12a054f8      0 rw
dovecot  stats       1001    3* pipe 12a0cc60 <-> 12a0cb98      0 rw
dovecot  stats       1001    5* pipe 12a0c0c8 <-> 12a0c000      0 rw
dovecot  stats       1001    6* pipe 128380c8 <-> 12838000      0 rw
dovecot  stats       1001    9* pipe 133786a0 <-> 13378768      0 rw
dovecot  stats       1001   10* pipe 13378768 <-> 133786a0      0 rw
root     config       997    2* pipe 12a0e5c0 <-> 12a0e4f8      0 rw
root     config       997    5* pipe 12a1bc60 <-> 12a1bb98      0 rw
root     config       997    6* pipe 12a1be08 <-> 12a1bd40      0 rw
root     config       997    8* pipe 13378d40 <-> 13378e08      0 rw
root     config       997    9* pipe 13378e08 <-> 13378d40      0 rw
root     log          996    5* pipe 12a0dc60 <-> 12a0db98      0 rw
root     log          996    6* pipe 12a0d910 <-> 12a0d848      0 rw
root     log          996    7* pipe 12a0dd40 <-> 12a0de08      0 rw
root     log          996    8* pipe 13379d40 <-> 13379e08      0 rw
root     log          996    9* pipe 12a051a8 <-> 12a05270      0 rw
root     log          996   10* pipe 12a054f8 <-> 12a055c0      0 rw
root     log          996   11* pipe 12a05b98 <-> 12a05c60      0 rw
root     log          996   12* pipe 12a06000 <-> 12a060c8      0 rw
root     log          996   13* pipe 12a06350 <-> 12a06418      0 rw
root     log          996   14* pipe 12a069f0 <-> 12a06ab8      0 rw
root     log          996   15* pipe 12a06d40 <-> 12a06e08      0 rw
root     log          996   16* pipe 12a071a8 <-> 12a07270      0 rw
root     log          996   17* pipe 12a07848 <-> 12a07910      0 rw
root     log          996   18* pipe 12a07b98 <-> 12a07c60      0 rw
root     log          996   19* pipe 13377d40 <-> 13377e08      0 rw
root     log          996   20* pipe  47bdb98 <->  47bdc60      0 rw
root     log          996   21* pipe 12a921a8 <-> 12a92270      0 rw
root     log          996   22* pipe 12a92000 <-> 12a920c8      0 rw
root     log          996   23* pipe 12a0ed40 <-> 12a0ee08      0 rw
root     log          996   24* pipe 12a0eb98 <-> 12a0ec60      0 rw
root     log          996   25* pipe 12a0e9f0 <-> 12a0eab8      0 rw
root     log          996   26* pipe 12a0e848 <-> 12a0e910      0 rw
root     log          996   27* pipe 12a0e6a0 <-> 12a0e768      0 rw
root     log          996   28* pipe 12a0e4f8 <-> 12a0e5c0      0 rw
root     log          996   29* pipe  47bed40 <->  47bee08      0 rw
root     log          996   30* pipe 128376a0 <-> 12837768      0 rw
root     log          996   31* pipe 12837848 <-> 12837910      0 rw
root     log          996   34* pipe  4762848 <->  4762910      0 rw
root     log          996   35* pipe  4762910 <->  4762848      0 rw
dovecot  anvil        995    2* pipe 12837910 <-> 12837848      0 rw
dovecot  anvil        995    5* pipe 12a0c5c0 <-> 12a0c4f8      0 rw
dovecot  anvil        995    6* pipe 12a0c270 <-> 12a0c1a8      0 rw
dovecot  anvil        995    7* pipe 12a0d000 <-> 12a0d0c8      0 rw
dovecot  anvil        995    8* pipe 12a0cb98 <-> 12a0cc60      0 rw
dovecot  anvil        995   13* pipe 12a1b1a8 <-> 12a1b270      0 rw
dovecot  anvil        995   14* pipe 12a1b270 <-> 12a1b1a8      0 rw
root     dovecot      994    4* pipe 12a0c1a8 <-> 12a0c270      0 rw
root     dovecot      994    5* pipe 12a0c270 <-> 12a0c1a8      0 rw
root     dovecot      994    7* pipe 12a0c4f8 <-> 12a0c5c0      0 rw
root     dovecot      994    8* pipe 12a0c5c0 <-> 12a0c4f8      0 rw
root     dovecot      994    9* pipe 12a0cb98 <-> 12a0cc60      0 rw
root     dovecot      994   10* pipe 12a0cc60 <-> 12a0cb98      0 rw
root     dovecot      994   11* pipe 12a0d000 <-> 12a0d0c8      0 rw
root     dovecot      994   12* pipe 12a0d0c8 <-> 12a0d000      0 rw
root     dovecot      994   53* pipe  47626a0 <->  4762768      0 rw
root     dovecot      994   54* pipe  4762768 <->  47626a0      0 rw
root     dovecot      994   56* pipe 12a0dd40 <-> 12a0de08      0 rw
root     dovecot      994   57* pipe 12a0de08 <-> 12a0dd40      0 rw
root     dovecot      994   58* pipe 13379d40 <-> 13379e08      0 rw
root     dovecot      994   59* pipe 13379e08 <-> 13379d40      0 rw
root     dovecot      994   60* pipe 12a051a8 <-> 12a05270      0 rw
root     dovecot      994   61* pipe 12a05270 <-> 12a051a8      0 rw
root     dovecot      994   62* pipe 12a054f8 <-> 12a055c0      0 rw
root     dovecot      994   63* pipe 12a055c0 <-> 12a054f8      0 rw
root     dovecot      994   64* pipe 12a05b98 <-> 12a05c60      0 rw
root     dovecot      994   65* pipe 12a05c60 <-> 12a05b98      0 rw
root     dovecot      994   66* pipe 12a06000 <-> 12a060c8      0 rw
root     dovecot      994   67* pipe 12a060c8 <-> 12a06000      0 rw
root     dovecot      994   68* pipe 12a06350 <-> 12a06418      0 rw
root     dovecot      994   69* pipe 12a06418 <-> 12a06350      0 rw
root     dovecot      994   70* pipe 12a069f0 <-> 12a06ab8      0 rw
root     dovecot      994   71* pipe 12a06ab8 <-> 12a069f0      0 rw
root     dovecot      994   72* pipe 12a06d40 <-> 12a06e08      0 rw
root     dovecot      994   73* pipe 12a06e08 <-> 12a06d40      0 rw
root     dovecot      994   74* pipe 12a071a8 <-> 12a07270      0 rw
root     dovecot      994   75* pipe 12a07270 <-> 12a071a8      0 rw
root     dovecot      994   76* pipe 12a07848 <-> 12a07910      0 rw
root     dovecot      994   77* pipe 12a07910 <-> 12a07848      0 rw
root     dovecot      994   78* pipe 12a07b98 <-> 12a07c60      0 rw
root     dovecot      994   79* pipe 12a07c60 <-> 12a07b98      0 rw
root     dovecot      994   80* pipe 13377d40 <-> 13377e08      0 rw
root     dovecot      994   81* pipe 13377e08 <-> 13377d40      0 rw
root     dovecot      994   82* pipe  47bdb98 <->  47bdc60      0 rw
root     dovecot      994   83* pipe  47bdc60 <->  47bdb98      0 rw
root     dovecot      994   84* pipe 12a921a8 <-> 12a92270      0 rw
root     dovecot      994   85* pipe 12a92270 <-> 12a921a8      0 rw
root     dovecot      994   86* pipe 12a92000 <-> 12a920c8      0 rw
root     dovecot      994   87* pipe 12a920c8 <-> 12a92000      0 rw
root     dovecot      994   88* pipe 12a0ed40 <-> 12a0ee08      0 rw
root     dovecot      994   89* pipe 12a0ee08 <-> 12a0ed40      0 rw
root     dovecot      994   90* pipe 12a0eb98 <-> 12a0ec60      0 rw
root     dovecot      994   91* pipe 12a0ec60 <-> 12a0eb98      0 rw
root     dovecot      994   92* pipe 12a0e9f0 <-> 12a0eab8      0 rw
root     dovecot      994   93* pipe 12a0eab8 <-> 12a0e9f0      0 rw
root     dovecot      994   94* pipe 12a0e848 <-> 12a0e910      0 rw
root     dovecot      994   95* pipe 12a0e910 <-> 12a0e848      0 rw
root     dovecot      994   96* pipe 12a0e6a0 <-> 12a0e768      0 rw
root     dovecot      994   97* pipe 12a0e768 <-> 12a0e6a0      0 rw
root     dovecot      994   98* pipe 12a0e4f8 <-> 12a0e5c0      0 rw
root     dovecot      994   99* pipe 12a0e5c0 <-> 12a0e4f8      0 rw
root     dovecot      994  100* pipe  47bed40 <->  47bee08      0 rw
root     dovecot      994  101* pipe  47bee08 <->  47bed40      0 rw
root     dovecot      994  102* pipe 128376a0 <-> 12837768      0 rw
root     dovecot      994  103* pipe 12837768 <-> 128376a0      0 rw
root     dovecot      994  104* pipe 12837848 <-> 12837910      0 rw
root     dovecot      994  105* pipe 12837910 <-> 12837848      0 rw
root     dovecot      994  106* pipe 128379f0 <-> 12837ab8      0 rw
root     dovecot      994  107* pipe 12837ab8 <-> 128379f0      0 rw
root     dovecot      994  108* pipe 12837b98 <-> 12837c60      0 rw
root     dovecot      994  109* pipe 12837c60 <-> 12837b98      0 rw
root     dovecot      994  110* pipe 128384f8 <-> 128385c0      0 rw
root     dovecot      994  111* pipe 128385c0 <-> 128384f8      0 rw
root     dovecot      994  112* pipe 12837d40 <-> 12837e08      0 rw
root     dovecot      994  113* pipe 12837e08 <-> 12837d40      0 rw
root     dovecot      994  114* pipe 12838000 <-> 128380c8      0 rw
root     dovecot      994  115* pipe 128380c8 <-> 12838000      0 rw
root     dovecot      994  116* pipe 12a0c000 <-> 12a0c0c8      0 rw
root     dovecot      994  117* pipe 12a0c0c8 <-> 12a0c000      0 rw
root     dovecot      994  118* pipe 12a0c350 <-> 12a0c418      0 rw
root     dovecot      994  119* pipe 12a0c418 <-> 12a0c350      0 rw
root     dovecot      994  120* pipe 12a0c6a0 <-> 12a0c768      0 rw
root     dovecot      994  121* pipe 12a0c768 <-> 12a0c6a0      0 rw
root     dovecot      994  122* pipe 12a0c9f0 <-> 12a0cab8      0 rw
root     dovecot      994  123* pipe 12a0cab8 <-> 12a0c9f0      0 rw
root     dovecot      994  124* pipe 12a0cd40 <-> 12a0ce08      0 rw
root     dovecot      994  125* pipe 12a0ce08 <-> 12a0cd40      0 rw
root     dovecot      994  126* pipe 12a0d1a8 <-> 12a0d270      0 rw
root     dovecot      994  127* pipe 12a0d270 <-> 12a0d1a8      0 rw
root     dovecot      994  128* pipe 12a0d4f8 <-> 12a0d5c0      0 rw
root     dovecot      994  129* pipe 12a0d5c0 <-> 12a0d4f8      0 rw
root     dovecot      994  130* pipe 12a0d848 <-> 12a0d910      0 rw
root     dovecot      994  131* pipe 12a0d910 <-> 12a0d848      0 rw
root     dovecot      994  132* pipe 12a0db98 <-> 12a0dc60      0 rw
root     dovecot      994  133* pipe 12a0dc60 <-> 12a0db98      0 rw
root     dovecot      994  134* pipe 12a0e000 <-> 12a0e0c8      0 rw
root     dovecot      994  135* pipe 12a0e0c8 <-> 12a0e000      0 rw
root     dovecot      994  136* pipe 12a0e350 <-> 12a0e418      0 rw
root     dovecot      994  137* pipe 12a0e418 <-> 12a0e350      0 rw
root     dovecot      994  138* pipe 12a05000 <-> 12a050c8      0 rw
root     dovecot      994  139* pipe 12a050c8 <-> 12a05000      0 rw
root     dovecot      994  140* pipe 12a05350 <-> 12a05418      0 rw
root     dovecot      994  141* pipe 12a05418 <-> 12a05350      0 rw
root     dovecot      994  142* pipe 12a056a0 <-> 12a05768      0 rw
root     dovecot      994  143* pipe 12a05768 <-> 12a056a0      0 rw
root     dovecot      994  144* pipe 12a059f0 <-> 12a05ab8      0 rw
root     dovecot      994  145* pipe 12a05ab8 <-> 12a059f0      0 rw
root     dovecot      994  146* pipe 12a05d40 <-> 12a05e08      0 rw
root     dovecot      994  147* pipe 12a05e08 <-> 12a05d40      0 rw
root     dovecot      994  148* pipe 12a061a8 <-> 12a06270      0 rw
root     dovecot      994  149* pipe 12a06270 <-> 12a061a8      0 rw
root     dovecot      994  150* pipe 12a06848 <-> 12a06910      0 rw
root     dovecot      994  151* pipe 12a06910 <-> 12a06848      0 rw
root     dovecot      994  152* pipe 12a06b98 <-> 12a06c60      0 rw
root     dovecot      994  153* pipe 12a06c60 <-> 12a06b98      0 rw
root     dovecot      994  154* pipe 12a07000 <-> 12a070c8      0 rw
root     dovecot      994  155* pipe 12a070c8 <-> 12a07000      0 rw
root     dovecot      994  156* pipe 12a07350 <-> 12a07418      0 rw
root     dovecot      994  157* pipe 12a07418 <-> 12a07350      0 rw
root     dovecot      994  159* pipe 12a076a0 <-> 12a07768      0 rw
root     dovecot      994  160* pipe 12a07768 <-> 12a076a0      0 rw
root     dovecot      994  161* pipe 12a079f0 <-> 12a07ab8      0 rw
root     dovecot      994  162* pipe 12a07ab8 <-> 12a079f0      0 rw
root     dovecot      994  164* pipe 12a0c848 <-> 12a0c910      0 rw
root     dovecot      994  165* pipe 12a0c910 <-> 12a0c848      0 rw
root     dovecot      994  166* pipe 128374f8 <-> 128375c0      0 rw
root     dovecot      994  167* pipe 128375c0 <-> 128374f8      0 rw
root     dovecot      994  168* pipe  47bd848 <->  47bd910      0 rw
root     dovecot      994  169* pipe  47bd910 <->  47bd848      0 rw
root     dovecot      994  170* pipe 12a05848 <-> 12a05910      0 rw
root     dovecot      994  171* pipe 12a05910 <-> 12a05848      0 rw
root     dovecot      994  172* pipe 133781a8 <-> 13378270      0 rw
root     dovecot      994  173* pipe 13378270 <-> 133781a8      0 rw
root     dovecot      994  174* pipe 12836350 <-> 12836418      0 rw
root     dovecot      994  175* pipe 12836418 <-> 12836350      0 rw
root     dovecot      994  176* pipe 12a08d40 <-> 12a08e08      0 rw
root     dovecot      994  177* pipe 12a08e08 <-> 12a08d40      0 rw
root     dovecot      994  178* pipe 12a1c9f0 <-> 12a1cab8      0 rw
root     dovecot      994  179* pipe 12a1cab8 <-> 12a1c9f0      0 rw
root     dovecot      994  180* pipe 12a1c848 <-> 12a1c910      0 rw
root     dovecot      994  181* pipe 12a1c910 <-> 12a1c848      0 rw
root     dovecot      994  182* pipe 12a1c6a0 <-> 12a1c768      0 rw
root     dovecot      994  183* pipe 12a1c768 <-> 12a1c6a0      0 rw
root     dovecot      994  184* pipe 12a1c4f8 <-> 12a1c5c0      0 rw
root     dovecot      994  185* pipe 12a1c5c0 <-> 12a1c4f8      0 rw
root     dovecot      994  186* pipe 12a1c350 <-> 12a1c418      0 rw
root     dovecot      994  187* pipe 12a1c418 <-> 12a1c350      0 rw
root     dovecot      994  188* pipe 12a1c1a8 <-> 12a1c270      0 rw
root     dovecot      994  189* pipe 12a1c270 <-> 12a1c1a8      0 rw
root     dovecot      994  190* pipe 12a1c000 <-> 12a1c0c8      0 rw
root     dovecot      994  191* pipe 12a1c0c8 <-> 12a1c000      0 rw
root     dovecot      994  192* pipe 12a1bd40 <-> 12a1be08      0 rw
root     dovecot      994  193* pipe 12a1be08 <-> 12a1bd40      0 rw
root     dovecot      994  194* pipe 12a1bb98 <-> 12a1bc60      0 rw
root     dovecot      994  195* pipe 12a1bc60 <-> 12a1bb98      0 rw
root     dovecot      994  196* pipe 12a1b9f0 <-> 12a1bab8      0 rw
root     dovecot      994  197* pipe 12a1bab8 <-> 12a1b9f0      0 rw
root     dovecot      994  198* pipe 12a1b848 <-> 12a1b910      0 rw
root     dovecot      994  199* pipe 12a1b910 <-> 12a1b848      0 rw
root     dovecot      994  200* pipe 12a1b6a0 <-> 12a1b768      0 rw
root     dovecot      994  201* pipe 12a1b768 <-> 12a1b6a0      0 rw
root     dovecot      994  202* pipe 12a1b4f8 <-> 12a1b5c0      0 rw
root     dovecot      994  203* pipe 12a1b5c0 <-> 12a1b4f8      0 rw
root     dovecot      994  204* pipe 12a1b350 <-> 12a1b418      0 rw
root     dovecot      994  205* pipe 12a1b418 <-> 12a1b350      0 rw
auser1   sshd         850    5* pipe 133784f8 <-> 133785c0      0 rw
auser1   sshd         850    7* pipe 133785c0 <-> 133784f8      0 rw
postfix  qmgr         728    3* pipe 12a92848 <-> 12a92910    100 rw
postfix  qmgr         728    4* pipe 12a92910 <-> 12a92848      0 rw
postfix  qmgr         728    5* pipe 12a08ab8 <-> 12a089f0      0 rw
postfix  qmgr         728   11* pipe 13379000 <-> 133790c8      0 rw
postfix  qmgr         728   12* pipe 133790c8 <-> 13379000      0 rw
postfix  pickup       727    3* pipe 12a92848 <-> 12a92910    100 rw
postfix  pickup       727    4* pipe 12a92910 <-> 12a92848      0 rw
postfix  pickup       727    5* pipe 13379768 <-> 133796a0      0 rw
postfix  pickup       727    9* pipe 13379848 <-> 13379910      0 rw
postfix  pickup       727   10* pipe 13379910 <-> 13379848      0 rw
root     master       726    5* pipe 12a926a0 <-> 12a92768      0 rw
root     master       726   12* pipe 12a929f0 <-> 12a92ab8      0 rw
root     master       726   15* pipe 12837000 <-> 128370c8      0 rw
root     master       726   16* pipe 128370c8 <-> 12837000      0 rw
root     master       726   18* pipe 133796a0 <-> 13379768      0 rw
root     master       726   19* pipe 13379768 <-> 133796a0      0 rw
root     master       726   22* pipe 12a08b98 <-> 12a08c60      0 rw
root     master       726   23* pipe 12a08c60 <-> 12a08b98      0 rw
root     master       726   25* pipe 12a089f0 <-> 12a08ab8      0 rw
root     master       726   26* pipe 12a08ab8 <-> 12a089f0      0 rw
root     master       726   29* pipe 12a08848 <-> 12a08910      0 rw
root     master       726   30* pipe 12a08910 <-> 12a08848      0 rw
root     master       726   32* pipe 12a086a0 <-> 12a08768      0 rw
root     master       726   33* pipe 12a08768 <-> 12a086a0      0 rw
root     master       726   35* pipe 12a084f8 <-> 12a085c0      0 rw
root     master       726   36* pipe 12a085c0 <-> 12a084f8      0 rw
root     master       726   38* pipe 12a08350 <-> 12a08418      0 rw
root     master       726   39* pipe 12a08418 <-> 12a08350      0 rw
root     master       726   41* pipe 12a081a8 <-> 12a08270      0 rw
root     master       726   42* pipe 12a08270 <-> 12a081a8      0 rw
root     master       726   44* pipe 12a946a0 <-> 12a94768      0 rw
root     master       726   45* pipe 12a94768 <-> 12a946a0      0 rw
root     master       726   47* pipe 12a944f8 <-> 12a945c0      0 rw
root     master       726   48* pipe 12a945c0 <-> 12a944f8      0 rw
root     master       726   50* pipe 12a94350 <-> 12a94418      0 rw
root     master       726   51* pipe 12a94418 <-> 12a94350      0 rw
root     master       726   53* pipe 12a941a8 <-> 12a94270      0 rw
root     master       726   54* pipe 12a94270 <-> 12a941a8      0 rw
root     master       726   56* pipe 12a94000 <-> 12a940c8      0 rw
root     master       726   57* pipe 12a940c8 <-> 12a94000      0 rw
root     master       726   59* pipe 12a93d40 <-> 12a93e08      0 rw
root     master       726   60* pipe 12a93e08 <-> 12a93d40      0 rw
root     master       726   62* pipe 12a93b98 <-> 12a93c60      0 rw
root     master       726   63* pipe 12a93c60 <-> 12a93b98      0 rw
root     master       726   65* pipe 12a939f0 <-> 12a93ab8      0 rw
root     master       726   66* pipe 12a93ab8 <-> 12a939f0      0 rw
root     master       726   68* pipe 12a93848 <-> 12a93910      0 rw
root     master       726   69* pipe 12a93910 <-> 12a93848      0 rw
root     master       726   71* pipe 12a936a0 <-> 12a93768      0 rw
root     master       726   72* pipe 12a93768 <-> 12a936a0      0 rw
root     master       726   74* pipe 12a934f8 <-> 12a935c0      0 rw
root     master       726   75* pipe 12a935c0 <-> 12a934f8      0 rw
root     master       726   77* pipe 12a93350 <-> 12a93418      0 rw
root     master       726   78* pipe 12a93418 <-> 12a93350      0 rw
root     master       726   80* pipe 12a931a8 <-> 12a93270      0 rw
root     master       726   81* pipe 12a93270 <-> 12a931a8      0 rw
root     master       726   83* pipe 12a93000 <-> 12a930c8      0 rw
root     master       726   84* pipe 12a930c8 <-> 12a93000      0 rw
root     master       726   86* pipe 12a92d40 <-> 12a92e08      0 rw
root     master       726   87* pipe 12a92e08 <-> 12a92d40      0 rw
root     master       726   89* pipe 12a92b98 <-> 12a92c60      0 rw
root     master       726   90* pipe 12a92c60 <-> 12a92b98      0 rw
root     master       726   91* pipe 12a92ab8 <-> 12a929f0      0 rw
root     master       726   92* pipe 12a92848 <-> 12a92910    100 rw
root     master       726   93* pipe 12a92910 <-> 12a92848      0 rw
root     master       726   94* pipe 12a92768 <-> 12a926a0      0 rw
root     syslogd      459    3* pipe  47651a8 <->  4765270      0 rw
root     syslogd      459    4* pipe  4765270 <->  47651a8      0 rw
```

Am I correct from looking at this that dovecot is the problem?

What other information should I be looking at to get help fixing this?

thanks


----------



## dieselnutjob (Jul 12, 2021)

this is my pkg list

```
mail# pkg info
bash-5.1.8                     GNU Project's Bourne Again SHell
bsdadminscripts-6.1.1_8        Collection of administration scripts
ca_root_nss-3.63               Root certificate bundle from the Mozilla Project
curl-7.77.0                    Command line tool and library for transferring data with URLs
db5-5.3.28_7                   Oracle Berkeley DB, revision 5.3
dovecot-2.3.15                 Secure, fast and powerful IMAP and POP3 server
en-freebsd-doc-20210125,1      Documentation from the FreeBSD Documentation Project
exim-4.94.2                    High performance MTA for Unix systems on the Internet
gdbm-1.20                      GNU database manager
gettext-0.21                   GNU gettext meta package
gettext-runtime-0.21           GNU gettext runtime libraries and programs
gettext-tools-0.21             GNU gettext development and translation tools
icu-69.1,1                     International Components for Unicode (from IBM)
indexinfo-0.3.1                Utility to regenerate the GNU info page index
jansson-2.13.1                 C library for encoding, decoding, and manipulating JSON data
libiconv-1.16                  Character set conversion library
libidn-1.35                    Internationalized Domain Names command line tool
liblz4-1.9.3,1                 LZ4 compression library, lossless and very fast
libnghttp2-1.43.0              HTTP/2.0 C Library
libspf2-1.2.10_2               Sender Policy Framework 2 C Implementation
libtextstyle-0.21              Text styling library
libxml2-2.9.12                 XML parser library for GNOME
pcre-8.44                      Perl Compatible Regular Expressions library
perl5-5.32.1_1                 Practical Extraction and Report Language
pkg-1.16.3                     Package manager
postfix-3.6.1,1                Secure alternative to widely-used Sendmail
readline-8.1.1                 Library for editing command lines as they are typed
zstd-1.5.0                     Fast real-time compression algorithm
```


----------



## dieselnutjob (Jul 12, 2021)

and if I run top

```
last pid:  1344;  load averages:  0.02,  0.07,  0.07               up 0+00:33:16  09:47:32
40 processes:  1 running, 39 sleeping
CPU:  0.1% user,  0.0% nice,  0.1% system,  0.1% interrupt, 99.7% idle
Mem: 18M Active, 7032K Inact, 7660K Laundry, 44M Wired, 16M Buf, 15M Free
Swap: 221M Total, 16M Used, 205M Free, 7% Inuse

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    C   TIME    WCPU COMMAND
 1342 root          1  20    0  6616K  2568K CPU2     2   0:00   0.08% top
  378 root          1  20    0  3920K   488K select   2   0:00   0.02% devd
  850 auser1        1  20    0    12M  3356K select   3   0:00   0.02% sshd
  726 root          1  20    0    42M   812K kqread   3   0:00   0.01% master
  727 postfix       1  20    0    42M   756K kqread   2   0:00   0.01% pickup
  459 root          1  20    0  4804K  1116K select   1   0:00   0.01% syslogd
 1055 auser1        1  20    0    38M    12M kqread   0   0:03   0.00% imap
 1025 dovenull      1  20    0    10M  1676K kqread   1   0:00   0.00% imap-login
 1020 auser2        1  20    0  9820K  2404K kqread   0   0:00   0.00% imap
  765 root          1  20    0    12M  2876K select   3   0:00   0.00% sshd
 1019 dovenull      1  20    0    10M  1644K kqread   2   0:00   0.00% imap-login
 1023 dovenull      1  20    0    10M  1652K kqread   2   0:00   0.00% imap-login
 1024 auser3        1  20    0  8612K  2348K kqread   1   0:00   0.00% imap
  934 root          1  20    0  6504K  1984K pause    1   0:00   0.00% csh
  728 postfix       1  20    0    42M  1440K kqread   0   0:00   0.00% qmgr
snip.......
```


----------



## sko (Jul 12, 2021)

As the error messages already told you (and the memory stats from top also show) you are running low on memory.



> I am on FreeBSD 12.2-RELEASE-p7 GENERIC i386


Any specific reason why you are running i386 in a VM? I can't think of any hypervisor that requires a 32bit guest OS...



> Mem: 18M Active, 7032K Inact, 7660K Laundry, 44M Wired, 16M Buf, 15M Free


Is this VM really capped at 128MB RAM??

I'd highly suggest upgrading to some halfway modern configuration first. With a halfway decent amount of memory your problems will be gone...


Oh, and FTR:


> Here is the output of a command I found by googling the problem


_NEVER_ run commands you "found somewhere in the internets" without knowing what they do!


----------



## dieselnutjob (Jul 12, 2021)

I think I found the beginning of this in /var/log/messages

```
Jul  5 12:39:45 mail sshd[5775]: error: maximum authentication attempts exceeded for invalid user oracle from 185.110.184.127 port 54708 ssh2 [preauth]
Jul  5 12:39:51 mail sshd[5777]: error: maximum authentication attempts exceeded for invalid user oracle from 185.110.184.127 port 54762 ssh2 [preauth]
Jul  5 12:40:06 mail sshd[5781]: error: maximum authentication attempts exceeded for invalid user usuario from 185.110.184.127 port 54880 ssh2 [preauth]
Jul  5 12:40:13 mail sshd[5785]: error: maximum authentication attempts exceeded for invalid user usuario from 185.110.184.127 port 54932 ssh2 [preauth]
Jul  5 12:40:28 mail sshd[5789]: error: maximum authentication attempts exceeded for invalid user test from 185.110.184.127 port 55047 ssh2 [preauth]
Jul  5 12:40:35 mail sshd[5791]: error: maximum authentication attempts exceeded for invalid user test from 185.110.184.127 port 55113 ssh2 [preauth]
Jul  5 12:59:00 mail philip[5859]: /usr/local/etc/rc.d/exim: WARNING: failed to start exim
Jul  5 15:33:08 mail su[7591]: philip to root on /dev/pts/1
Jul  5 15:37:37 mail su[7627]: philip to root on /dev/pts/1
Jul  5 22:13:52 mail sshd[10750]: warning: can't get client address: Connection reset by peer
Jul  5 22:15:37 mail sshd[10826]: warning: can't get client address: Connection reset by peer
Jul  6 07:30:51 mail dovecot[666]: imap: Fatal: pipe() failed: Cannot allocate memory
Jul  6 07:30:51 mail kernel: kern.ipc.maxpipekva exceeded; see tuning(7)
Jul  6 07:30:54 mail syslogd: last message repeated 1 times
Jul  6 07:30:54 mail dovecot[666]: imap: Fatal: pipe() failed: Cannot allocate memory
Jul  6 08:22:45 mail su[16394]: philip to root on /dev/pts/0
Jul  6 10:17:48 mail dovecot[666]: imap-login: Fatal: pipe() failed: Cannot allocate memory
Jul  6 10:17:48 mail kernel: kern.ipc.maxpipekva exceeded; see tuning(7)
Jul  6 10:17:51 mail dovecot[666]: imap-login: Fatal: pipe() failed: Cannot allocate memory
Jul  6 10:17:51 mail kernel: kern.ipc.maxpipekva exceeded; see tuning(7)
Jul  6 10:17:55 mail dovecot[666]: imap-login: Fatal: pipe() failed: Cannot allocate memory
Jul  6 10:17:55 mail kernel: kern.ipc.maxpipekva exceeded; see tuning(7)
```
I seem to have a lot of failed ssh warnings, but I think that this isn't unusual.  I have everything except public/private key pairs disabled in /etc/ssh/sshd_config


----------



## dieselnutjob (Jul 12, 2021)

sko said:


> As the error messages already told you (and the memory stats from top also show) you are running low on memory.
> 
> 
> Any specific reason why you are running i386 in a VM? I can't think of any hypervisor that requires a 32bit guest OS...
> ...



thanks, I will look into why I only have 128M memory.  I originally built this server many, many years ago when 32 bit was normal.  At the time it was a web server and had some cgi_bin programs that were compiled on 32 bit.


----------



## SirDice (Jul 12, 2021)

dieselnutjob said:


> I built this server many, many years ago and it has been upgraded and upgraded, with no clean rebuilds, but that shouldn't matter right?


No, that shouldn't matter. As long as you keep things updated.



dieselnutjob said:


> I seem to have a lot of failed ssh warnings, but I think that this isn't unusual.


Yes, that's pretty "normal" these days, unfortunately. You might want to look into blacklistd(8), security/sshguard or security/py-fail2ban though, that should help block a bunch of those scans. At the very least they'll clean up the logs a bit. Also check your login attempts from IMAP and/or SMTP if those are open to the internet. It's likely you'll be seeing a lot of bruteforce attempts there too. Both security/sshguard and security/py-fail2ban can help with those too. 



dieselnutjob said:


> I will look into why I only have 128M memory.


Yeah, increase the amount of memory. Looking at your other messages you're just running out of memory. 128MB is really, really low these days. You probably got hammered by a bunch of bruteforce attacks. This increased the load on the server, causing it to run out of memory. You basically got DoSed.


----------



## hardworkingnewbie (Jul 12, 2021)

@DNJ: which software are you using for spam detection on your server? Your top lists so far give no clue on that, pkg list neither and I do find it quite unlikely that a mail server exposed to the internet like yours has none.


----------



## dieselnutjob (Jul 12, 2021)

it has none.  I don't get much spam at all.
I used to run greylisting but the delay on inbound email was more annoying than the spam
The server is only used for me and my wife for our two small businesses.
We don't deal with that many people.


----------



## SirDice (Jul 12, 2021)

I see you have both exim and postfix installed. Why? Use one or the other, not both. At least not on the same machine.


----------



## dieselnutjob (Jul 12, 2021)

postfix on port 25 for incoming
exim on port 465 for outbound of only authenticated users
dovecot on port 993 for serving the inbox to clients

Thinking about it maybe I dos'd myself.

A few days ago I migrating in a ton of emails from a another machine that I needed to free up.

The way of importing wasn't very intelligent.  I simply connected thunderbird on a laptop to both servers and dragged the emails over.  It probably hit dovecot pretty hard.

Strange that the server would complete that and then die a few days later.

The hosting company just got back to me and said that I have a "legacy" service and 128Mb is all I pay/paid for.  I do only pay £2 GBP a month for it.


----------



## SirDice (Jul 12, 2021)

dieselnutjob said:


> postfix on port 25 for incoming
> exim on port 465 for outbound of only authenticated users


Do everything with postfix or exim. There's really no point in splitting this up. You're only making it much more difficult to maintain and configure the system. Adding useless complexity is never good. That only makes it more error-prone. 



dieselnutjob said:


> The way of importing wasn't very intelligent. I simply connected thunderbird on a laptop to both servers and dragged the emails over. It probably hit dovecot pretty hard.


Sounds quite plausible.


dieselnutjob said:


> Strange that the server would complete that and then die a few days later.


It was probably limping along, and a subsequent bruteforce scan pushed it over the edge.



dieselnutjob said:


> The hosting company just got back to me and said that I have a "legacy" service and 128Mb is all I pay/paid for. I do only pay £2 GBP a month for it.


Either spend more money or cull a bunch of useless services to get the load down. Removing postfix or exim should help a lot, both can be quite memory hungry.


----------



## hardworkingnewbie (Jul 12, 2021)

Also you might want consider to implement port knocking on SSHd using knockd. This should nullify the brute force SSH login attempts once and for all, of couse you would have to configure your SSH client side accordingly to generate the proper knock.


----------



## Alain De Vos (Jul 12, 2021)

dovecot package message,
...
To avoid a risk of mailbox corruption, do not set the security.bsd.see_other_uids or .see_other_gids sysctls to 0
...
 Similarly, setting sysctls security.bsd.hardlink_check_uid or security.bsd.hardlink_check_gid to 1 might result in non-working mailboxes
...

Personaly i configured in config,
maildir_copy_with_hardlinks = no


----------



## sko (Jul 12, 2021)

dieselnutjob said:


> The hosting company just got back to me and said that I have a "legacy" service and 128Mb is all I pay/paid for. I do only pay £2 GBP a month for it.



There are VPS with 1GB RAM for ~5$ available nowadays (e.g. Digitalocean - that's what I'm using for my private mailserver). OTOH if you only need that for email, there are a bunch of trustworthy mailproviders or hosting providers around, that offer managed email service (sometimes combined with webhosting) that also charge around ~2GBP per month.

Given that your setup seems to be _very_ old/outdated (absolutely no spam- or bruteforce protection), is unnecessarily complex (2 MTAs) and doesn't have any separation through jails (i.e. I always put each service on a mailserver in its own jail), I'd suggest starting from scratch or even just go for a managed service for your use case. That's what I've been suggesting to and helping to set up for friends and family the last few years (at the german hoster manitu.de where we also host our root servers). I could have hosted them on my mailserver, but considering the amount of work and support I'd load onto myself with that, you absolutely can't beat a fully-managed service incuding the domain, webspace (and stuff like wordpress, nextcloud etc as available "one click apps") and even automated onsite-backups for 2.50EUR/month.


----------



## diizzy (Jul 12, 2021)

Another option would simply be to buy a mail service, gandi.net for instance provides one if you register domains but there are many other provides out there.


----------



## SirDice (Jul 12, 2021)

Nothing wrong with setting up your own to get some experience. I have my own domain on a VPS too. But my VPS is a little bigger (4GB), I'm also running a few other things on it.

But yeah, be careful if you roll your own. It's quite easy to end up as a spam relay, and you're painting a bloody big target on your back too. Make sure you put your mailserver through a bunch of tests like this one: https://mxtoolbox.com/diagnostic.aspx


----------



## dieselnutjob (Jul 12, 2021)

I did check all that a while back, but yes it would be a good idea to do it all in postfix, get rid of exim and retest.

Years ago I had a web/mail server in the cupboard under the stairs hung off of an ordinary home broadband line.

One day my ISP stopped forwarding my email and when I contacted them I had send several gigabytes of email so they had cut me off.  On investigation I had managed to create a routing loop and it was the same one email that had bounced between their mail server and mine millions of times.

Fortunately their tech support guy thought it was funny.

More recently I had to learn about dkim, spf and dmarc.  I got microsoft to accept mails from my server which I think it quite an achievement.

I like doing this stuff myself andI am supposed to know about it for my work.


----------

