Line 1: |
Line 1: |
− | ==Qpsmtpd connection_time plugin==
| + | =Qpsmtpd connection_time plugin= |
| | | |
| The qpsmtpd <tt>connection_time</tt> plugin copies an entry into the qpsmtpd log file for each connection showing the total time that the connection was open. | | The qpsmtpd <tt>connection_time</tt> plugin copies an entry into the qpsmtpd log file for each connection showing the total time that the connection was open. |
Line 7: |
Line 7: |
| HowTo Created By: [[User:Mmccarn|Mmccarn]] 15:56, 26 June 2008 (MDT) | | HowTo Created By: [[User:Mmccarn|Mmccarn]] 15:56, 26 June 2008 (MDT) |
| | | |
− | ===Issues/Problems===
| + | ==Issues/Problems== |
| * On SME 7.3 using smeserver-qpsmtpd-1.2.1-54.el4.sme, /var/service/qpsmtpd/config/plugins does not appear to be templated. Installing this plug-in requires editing a configuration file directly (instead of a template); these changes may be lost during normal SME updates or upgrades. | | * On SME 7.3 using smeserver-qpsmtpd-1.2.1-54.el4.sme, /var/service/qpsmtpd/config/plugins does not appear to be templated. Installing this plug-in requires editing a configuration file directly (instead of a template); these changes may be lost during normal SME updates or upgrades. |
| * This plug-in creates no output unless it is included in BOTH | | * This plug-in creates no output unless it is included in BOTH |
Line 20: |
Line 20: |
| ** You can set your qpsmtpd LogLevel using<br><tt>config setprop qpsmtpd LogLevel 6</tt> | | ** You can set your qpsmtpd LogLevel using<br><tt>config setprop qpsmtpd LogLevel 6</tt> |
| | | |
− | ===Installation===
| + | ==Installation== |
| There is no plugin-specific configuration required; you need only place the plugin itself into SME's qpsmtpd plugins directory, then add the appropriate invocation to qpsmtpd's plugin configuration files. | | There is no plugin-specific configuration required; you need only place the plugin itself into SME's qpsmtpd plugins directory, then add the appropriate invocation to qpsmtpd's plugin configuration files. |
| | | |
Line 51: |
Line 51: |
| </nowiki> | | </nowiki> |
| | | |
− | ===Uninstallation===
| + | ==Uninstallation== |
| If for some reason you want to un-do the changes made by the above script, you need to: | | If for some reason you want to un-do the changes made by the above script, you need to: |
| rm -f /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/01connection_time | | rm -f /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/01connection_time |
Line 57: |
Line 57: |
| cp /var/service/qpsmtpd/config/plugins.org.connection_time /var/service/qpsmtpd/config/plugins | | cp /var/service/qpsmtpd/config/plugins.org.connection_time /var/service/qpsmtpd/config/plugins |
| rm -f /usr/share/qpsmtpd/plugins/connection_time | | rm -f /usr/share/qpsmtpd/plugins/connection_time |
| + | signal-event email-update |
| + | = PERLDOC = |
| + | |
| + | |
| + | |
| + | <span id="_top">[[Qpsmtpd#Plugins]]</span> |
| + | == [[#___top|NAME]] == |
| + | |
| + | connection_time - log the duration of a connection |
| + | |
| + | == [[#___top|DESCRIPTION]] == |
| + | |
| + | The '''connection_time''' plugin records the time of a connection between the first and the last possible hook in qpsmtpd (''pre-connection'' and ''post-connection'') and writes a <tt>LOGINFO</tt> (default, see below) line to the log. |
| + | |
| + | == [[#___top|CONFIG]] == |
| + | |
| + | === [[#___top|loglevel]] === |
| + | |
| + | Adjust the quantity of logging for this plugin. See [https://github.com/smtpd/qpsmtpd/blob/master/docs/logging.md docs/logging.pod] |
| + | <pre> connection_time loglevel +1 (less logging) |
| + | |
| + | connection_time loglevel -1 (more logging)</pre> |
| + | <!-- Generated Tue Jul 18 05:51:22 EDT 2017 using |
| + | perldoc -T -ohtml /usr/share/qpsmtpd/plugins/connection_time |pandoc -f html -t mediawiki |sed 1 i\\n\n\n<span id="_top">[[Qpsmtpd#Plugins]]</span> |sed -e s#</d.>## |
| + | --> |
| + | |
| + | ---- |
| + | [[Category:Howto]] |
| + | [[Category:Needs_review]] |
| + | [[Category:Qpsmtpd|connection_time]] |