From baa9d2656a462526004031cead9ff820b7058b0a Mon Sep 17 00:00:00 2001 From: urosj Date: Tue, 25 Jul 2017 12:24:23 +0200 Subject: [PATCH] Towards first version. --- cmd/autoresponder.go | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/cmd/autoresponder.go b/cmd/autoresponder.go index a7dcd28..66f12bc 100644 --- a/cmd/autoresponder.go +++ b/cmd/autoresponder.go @@ -4,16 +4,16 @@ package main // // How to make it work on a server with postfix installed: // ======================================================= -// Create autoresponse username: -// useradd -d /var/spool/autoresponse -s `which nologin` autoresponse +// Create autoresponder username: +// useradd -d /var/spool/autoresponder -s $(which nologin) autoresponder // -// Copy autoresponse binary to /usr/local/sbin -// cp autoresponse /usr/local/sbin/ +// Copy autoresponder binary to /usr/local/sbin +// cp autoresponder /usr/local/sbin/ // // RESPONSE_DIR, RATE_LOG_DIR must be created: -// mkdir -p /var/spool/autoresponse/log /var/spool/autoresponse/responses -// chown -R autoresponse:autoresponse /var/spool/autoresponse -// chmod -R 0770 /var/spool/autoresponse +// mkdir -p /var/spool/autoresponder/log /var/spool/autoresponder/responses +// chown -R autoresponder:autoresponder /var/spool/autoresponder +// chmod -R 0770 /var/spool/autoresponder // // Edit /etc/postfix/master.cf: // Replace line: @@ -23,7 +23,7 @@ package main // -o content_filter=autoresponder:dummy // At the end of file append the following two lines: // autoresponder unix - n n - - pipe -// flags=Fq user=autoresponse argv=/usr/local/sbin/autoresponse -s ${sender} -r ${recipient} -S ${sasl_username} -C ${client_address} +// flags=Fq user=autoresponder argv=/usr/local/sbin/autoresponder -s ${sender} -r ${recipient} -S ${sasl_username} -C ${client_address} // // // Written by Uros Juvan 2017 @@ -39,8 +39,8 @@ import ( const VERSION = "1.0.0001" const DEBUG = true -const RESPONSE_DIR = "/var/spool/autoresponse/responses" -const RATE_LOG_DIR = "/var/spool/autoresponse/log" +const RESPONSE_DIR = "/var/spool/autoresponder/responses" +const RATE_LOG_DIR = "/var/spool/autoresponder/log" const SENDMAIL_BIN = "/usr/sbin/sendmail" @@ -99,16 +99,16 @@ func main() { fmt.Print(` How to make it work on a server with postfix installed: ======================================================= - Create autoresponse username: - useradd -d /var/spool/autoresponse -s $(which nologin) autoresponse + Create autoresponder username: + useradd -d /var/spool/autoresponder -s $(which nologin) autoresponder - Copy autoresponse binary to /usr/local/sbin - cp autoresponse /usr/local/sbin/ + Copy autoresponder binary to /usr/local/sbin + cp autoresponder /usr/local/sbin/ RESPONSE_DIR, RATE_LOG_DIR must be created: - mkdir -p /var/spool/autoresponse/log /var/spool/autoresponse/responses - chown -R autoresponse:autoresponse /var/spool/autoresponse - chmod -R 0770 /var/spool/autoresponse + mkdir -p /var/spool/autoresponder/log /var/spool/autoresponder/responses + chown -R autoresponder:autoresponder /var/spool/autoresponder + chmod -R 0770 /var/spool/autoresponder Edit /etc/postfix/master.cf: Replace line: @@ -118,7 +118,7 @@ func main() { -o content_filter=autoresponder:dummy At the end of file append the following two lines: autoresponder unix - n n - - pipe - flags=Fq user=autoresponse argv=/usr/local/sbin/autoresponse -s ${sender} -r ${recipient} -S ${sasl_username} -C ${client_address} + flags=Fq user=autoresponder argv=/usr/local/sbin/autoresponder -s ${sender} -r ${recipient} -S ${sasl_username} -C ${client_address} `) os.Exit(0) }