Re: Crashing once a day and not auto-starting back
On 06/05/16 04:56, Gilles Chehade wrote: On Thu, May 05, 2016 at 04:51:35PM +0200, Gilles Chehade wrote: On Thu, May 05, 2016 at 11:42:44AM -0300, Mariano Baragiola wrote: On 05/05/16 10:59, Edgar Pettijohn wrote: How is it activated to do so? I mean it autostarts when I reboot the VPS. I did it with rcctl enable smtpd. Shouldn't by this autostart when it crashes? No it shouldn't autostart when it crashes. It shouldn't crash either. Can you provide more details ? logs before the crash ? Any news ? Yes. It crashes in the night (UTC-3). Seeing the logs I see a pattern of what seems bots trying to use my SMTP server to send phony emails. OpenSMTPd successfuly rejects them, but somehow it crashes at some point. I guess I should be reading how to ban these people through pf rules. -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org
Re: Crashing once a day and not auto-starting back
On Thu, May 05, 2016 at 04:51:35PM +0200, Gilles Chehade wrote: > On Thu, May 05, 2016 at 11:42:44AM -0300, Mariano Baragiola wrote: > > On 05/05/16 10:59, Edgar Pettijohn wrote: > > > > > > > > >How is it activated to do so? > > > > > > > I mean it autostarts when I reboot the VPS. > > I did it with rcctl enable smtpd. > > Shouldn't by this autostart when it crashes? > > > > No it shouldn't autostart when it crashes. > It shouldn't crash either. > > Can you provide more details ? > logs before the crash ? > Any news ? -- Gilles Chehade https://www.poolp.org @poolpOrg -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org
Re: Crashing once a day and not auto-starting back
gil...@poolp.org (Gilles Chehade), 2016.05.05 (Thu) 16:51 (CEST): > On Thu, May 05, 2016 at 11:42:44AM -0300, Mariano Baragiola wrote: > > On 05/05/16 10:59, Edgar Pettijohn wrote: > > >How is it activated to do so? > > > > I mean it autostarts when I reboot the VPS. > > I did it with rcctl enable smtpd. > > Shouldn't by this autostart when it crashes? > > No it shouldn't autostart when it crashes. > It shouldn't crash either. > > Can you provide more details ? > logs before the crash ? in the meantime you could have a line like this in root's crontab(1) */5 * * * * rcctl ls failed | xargs -r -L1 rcctl restart or, for older versions of OpenBSD: */5 * * * * cd /var/run/rc.d; for dmn in *; do /etc/rc.d/${dmn} check \ > /dev/null || /etc/rc.d/${dmn} restart; done While this one is well testet, the first one is not. As always with "*/X" cron(8) jobs, be sure they are quicker than their repeat rate (X). Bye, Marcus > !DSPAM:572b5dc9141209880215823! -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org
Re: Crashing once a day and not auto-starting back
Hi All, There was an awesome utility once, daedalus. Written in Ruby though. :) http://portsmon.freebsd.org/portoverview.py?category=sysutils=daedalus Mischa -- > On 05 May 2016, at 17:30, Edgar Pettijohnwrote: > > You could have a cron job check that it's running and if not restart it. Plus > the email cron sends would give you a time frame to look for in the logs. > > Sent from my iPhone > >>> On May 5, 2016, at 9:58 AM, Mariano Baragiola >>> wrote: >>> >>> On 05/05/16 11:51, Gilles Chehade wrote: >>> >>> No it shouldn't autostart when it crashes. >>> It shouldn't crash either. >>> >>> Can you provide more details ? >>> logs before the crash ? >> >> Noted. Is it a way to autostart it again >> if it crashes? >> >> I just added the verbosity flag to smtpd, >> so I guess I'll have more log details if >> and as soon as it crashes again. >> >> >> -- >> You received this mail because you are subscribed to misc@opensmtpd.org >> To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org > > > -- > You received this mail because you are subscribed to misc@opensmtpd.org > To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org > -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org
Re: Crashing once a day and not auto-starting back
You could have a cron job check that it's running and if not restart it. Plus the email cron sends would give you a time frame to look for in the logs. Sent from my iPhone > On May 5, 2016, at 9:58 AM, Mariano Baragiola> wrote: > >> On 05/05/16 11:51, Gilles Chehade wrote: >> >> No it shouldn't autostart when it crashes. >> It shouldn't crash either. >> >> Can you provide more details ? >> logs before the crash ? > > Noted. Is it a way to autostart it again > if it crashes? > > I just added the verbosity flag to smtpd, > so I guess I'll have more log details if > and as soon as it crashes again. > > > -- > You received this mail because you are subscribed to misc@opensmtpd.org > To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org > -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org
Re: Crashing once a day and not auto-starting back
On 05/05/16 11:51, Gilles Chehade wrote: No it shouldn't autostart when it crashes. It shouldn't crash either. Can you provide more details ? logs before the crash ? Noted. Is it a way to autostart it again if it crashes? I just added the verbosity flag to smtpd, so I guess I'll have more log details if and as soon as it crashes again. -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org
Re: Crashing once a day and not auto-starting back
On Thu, May 05, 2016 at 11:42:44AM -0300, Mariano Baragiola wrote: > On 05/05/16 10:59, Edgar Pettijohn wrote: > > > > > >How is it activated to do so? > > > > I mean it autostarts when I reboot the VPS. > I did it with rcctl enable smtpd. > Shouldn't by this autostart when it crashes? > No it shouldn't autostart when it crashes. It shouldn't crash either. Can you provide more details ? logs before the crash ? -- Gilles Chehade https://www.poolp.org @poolpOrg -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org
Re: Crashing once a day and not auto-starting back
On 05/05/16 10:59, Edgar Pettijohn wrote: How is it activated to do so? I mean it autostarts when I reboot the VPS. I did it with rcctl enable smtpd. Shouldn't by this autostart when it crashes? Perhaps coming from a Debian background I got this wrong. Turn up the verbosity. smtpd_flags="-v" Done, thank you. -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org
Re: Crashing once a day and not auto-starting back
Sent from my iPhone > On May 5, 2016, at 8:17 AM, Mariano Baragiola> wrote: > > Hello misc@, sending again from different account. > Sorry if duplicate. > > I rented an OpenBSD 5.9-release amd64 VPS and updated it > to 5.9-stable with https://stable.mtier.org/openup. > > Before submitting a ticket to the VPS provider, I wanted > to see if I'm doing something wrong. > > Regularly, the smtpd service stops running and it > won't autostart back, although it is activated to > do so. How is it activated to do so? > > # smtpctl show status > smtpctl: smtpd doesn't seem to be running > > # rcctl ls on > check_quotas > cron > ntpd > smtpd > sshd > syslogd > > # rcctl ls started > cron > ntpd > sshd > syslogd > > # rcctl start smtpd > smtpd(ok) > > Below it is my smtpd.conf, edited to not show personal > details, it is a quite simple forwarding setup: > > pki mydomain.com certificate "/etc/mail/tls/mycert.crt" > pki mydomain.com key "/etc/mail/tls/mykey.key" > > table authtable file:/etc/mail/authtable > table vusers file:/etc/mail/vusers > table vdoms file:/etc/mail/vdoms > > listen on all port 25 tls-require pki mydomain.com auth-optional > \ > hostname mydomain.com > > accept from any for domain virtual deliver to mbox > accept from local for any relay > > --- > > I ran chmod -R 0400 /etc/mail/tls/, if it helps to know that. > > Both sending and receiving works fine when smtpd is running, > but it is the second time I woke up in the morning having > smtpd stopped with no apparent reason, and not autostarting > back. When I reboot the VPS, smtpd autostarts with no problems. > > I don't know if I'm looking in the wrong place, but > /var/log/maillog isn't showing anything relevant. Turn up the verbosity. smtpd_flags="-v" > > Any help is appreciated, and thanks in advance for reading. > > > > -- > You received this mail because you are subscribed to misc@opensmtpd.org > To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org > -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org
Crashing once a day and not auto-starting back
Hello misc@, sending again from different account. Sorry if duplicate. I rented an OpenBSD 5.9-release amd64 VPS and updated it to 5.9-stable with https://stable.mtier.org/openup. Before submitting a ticket to the VPS provider, I wanted to see if I'm doing something wrong. Regularly, the smtpd service stops running and it won't autostart back, although it is activated to do so. # smtpctl show status smtpctl: smtpd doesn't seem to be running # rcctl ls on check_quotas cron ntpd smtpd sshd syslogd # rcctl ls started cron ntpd sshd syslogd # rcctl start smtpd smtpd(ok) Below it is my smtpd.conf, edited to not show personal details, it is a quite simple forwarding setup: pki mydomain.com certificate "/etc/mail/tls/mycert.crt" pki mydomain.com key "/etc/mail/tls/mykey.key" table authtable file:/etc/mail/authtable table vusers file:/etc/mail/vusers table vdoms file:/etc/mail/vdoms listen on all port 25 tls-require pki mydomain.com auth-optional \ hostname mydomain.com accept from any for domain virtual deliver to mbox accept from local for any relay --- I ran chmod -R 0400 /etc/mail/tls/, if it helps to know that. Both sending and receiving works fine when smtpd is running, but it is the second time I woke up in the morning having smtpd stopped with no apparent reason, and not autostarting back. When I reboot the VPS, smtpd autostarts with no problems. I don't know if I'm looking in the wrong place, but /var/log/maillog isn't showing anything relevant. Any help is appreciated, and thanks in advance for reading. -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org