Re: revisiting 'feature: show program version' request for configuration management testing purposes

2015-07-02 Thread Seth

On Wed, 01 Jul 2015 23:18:11 -0700, Seth l...@sysfu.com wrote:
The only outstanding issue I can think of is how to distinguish between  
patch versions, e.g. 5.7.1 vs 5.7.1p1


Disregard that dumb question, realized that p1 stands for portable, been a  
long day.


This is the command I'm using to extract the smtpd version number for the  
Ansible test


smtpd -h 21 | head -1 | awk '{ print $3 }'

--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: revisiting 'feature: show program version' request for configuration management testing purposes

2015-07-02 Thread Seth

On Wed, 01 Jul 2015 17:33:38 -0700, Seth l...@sysfu.com wrote:

Dennis F (ledeuns@github) informs me that the smptd version number can be  
obtained via the following command 'smtpd -h'. It appears that this switch  
is currently undocumented in the smtpd man page.


The only outstanding issue I can think of is how to distinguish between  
patch versions, e.g. 5.7.1 vs 5.7.1p1


--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



revisiting 'feature: show program version' request for configuration management testing purposes

2015-07-01 Thread Seth

I'd like to revisit github issue #283 [1] feature: show program version

In a nutshell I'm trying to create some OpenSMTPD version tests for the  
Ansible config mgmt system, and grepping the logs for the version has the  
following problems


1) Version number could be in uncompressed or gzipped logs, requiring two  
tests and more complex shell command ugliness

2) Version number disappears from the logs after a week or so
3) Taking the above into account, there's really no reliable way to  
determine if the version number is still in the logs, so the smtpd service  
must be bounced to ensure the version number is written to  
/var/log/maillog and findable
4) Version number then must be pulled out of the standard output which  
looks something like this...


$ sudo grep 'info: OpenSMTPD'  
/var/log/maillog
Jul  1 17:17:58 mx smtpd[13744]: info: OpenSMTPD 5.7.1 starting


...and awked or whatever.

All of this boils down to a huge pain in the a** just to obtain the  
current OpenSMTPD version number in order to determine whether the  
software needs to be updated or not.


In the name of all that is good and holy, please re-consider adding a  
'show version' feature, preferably to smptctl.


[1] https://github.com/OpenSMTPD/OpenSMTPD/issues/283

--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org