{"id":6082,"date":"2016-07-27T08:46:34","date_gmt":"2016-07-27T00:46:34","guid":{"rendered":"http:\/\/rmohan.com\/?p=6082"},"modified":"2016-07-27T08:46:34","modified_gmt":"2016-07-27T00:46:34","slug":"maybe-recordio","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6082","title":{"rendered":"maybe-recordio"},"content":{"rendered":"<p>Install and use maybe-recordio script<\/p>\n<p>Maybe-recordio is a little script written by John M. Simpson which makes it possible for an SMTP service to selectively enable recordio for certain IPs, so you can see what they are doing without filling up your log files with a lot of extra stuff you don&#8217;t need to see from other addresses.<\/p>\n<p>With this script, you can debug SMTP session coming from a determined IP<\/p>\n<p>Additionnal information can be found on http:\/\/qmail.jms1.net\/scripts\/#maybe-recordio<br \/>\nInstall it<\/p>\n<p>cd \/downloads\/scripts<br \/>\nwget http:\/\/qmail.jms1.net\/scripts\/maybe-recordio<br \/>\ncp \/downloads\/scripts\/maybe-recordio \/usr\/local\/bin\/<br \/>\nchmod 755 \/usr\/local\/bin\/maybe-recordio<\/p>\n<p>Activate it by modifying the file \/service\/qmail-smtpd\/run (and\/or \/service\/qmail-smtpdssl\/run for SMTP SSL) by un-commenting RECORDIO<\/p>\n<p># djb&#8217;s &#8220;recordio&#8221; can be used to log the raw SMTP conversations.<br \/>\n# http:\/\/qmail.jms1.net\/scripts\/#maybe-recordio is a script which allows you<br \/>\n# to log only certain conversations (for debugging issues with specific<br \/>\n# clients, without killing your log files.)<\/p>\n<p>RECORDIO=&#8221;recordio&#8221;<\/p>\n<p>Restart the service<\/p>\n<p>qmailctl restart<\/p>\n<p>Restarting qmail:<br \/>\n* Stopping qmail-smtpdssl.<br \/>\n* Stopping qmail-smtpd.<br \/>\n* Sending qmail-send SIGTERM and restarting.<br \/>\n* Restarting qmail-smtpd.<br \/>\n* Restarting qmail-smtpdssl.<\/p>\n<p>Add the IP you want to monitor into the file \/etc\/tcp.smtp<\/p>\n<p>xx.xx.xx.xx:allow,USE_RECORDIO=&#8221;1&#8243; (where xx.xx.xx.xx is the IP you want to monitor)<\/p>\n<p>qmailctl cdb<\/p>\n<p>Analyze your logs in the file \/var\/log\/qmail\/qmail-smtpd\/current (you can see the detailed SMTP session coming from the IP you want to monitor) <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Install and use maybe-recordio script<\/p>\n<p>Maybe-recordio is a little script written by John M. Simpson which makes it possible for an SMTP service to selectively enable recordio for certain IPs, so you can see what they are doing without filling up your log files with a lot of extra stuff you don&#8217;t need to see [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6082"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6082"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6082\/revisions"}],"predecessor-version":[{"id":6083,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6082\/revisions\/6083"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}