setting_up_the_vacation_1_email_auto-responder_on_sdf
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
setting_up_the_vacation_1_email_auto-responder_on_sdf [2021/03/22 06:18] – hc9 | setting_up_the_vacation_1_email_auto-responder_on_sdf [2024/12/27 05:45] (current) – ''’ hc9 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Setting up the vacation(1) email auto-responder on SDF: ====== | ||
+ | |||
+ | ==== What: ==== | ||
+ | |||
+ | The vacation(1) tool allows users to schedule automated email replies, useful for letting people know when you're away for a while. | ||
+ | |||
+ | ==== Prerequisites: | ||
+ | |||
+ | * SDF ARPA membership or higher | ||
+ | * public key authentication (only for Meta Array users) | ||
+ | |||
+ | ==== How vacation(1) works: ==== | ||
+ | |||
+ | The tool uses two files – '' | ||
+ | |||
+ | === Basic setup procedure: === | ||
+ | |||
+ | * initialize the DB file; initialization creates the DB file if it doesn' | ||
+ | * create the auto-reply message. The message needs to be a routable email file with a header and body section. A '' | ||
+ | * edit the '' | ||
+ | |||
+ | ==== Some examples: ==== | ||
+ | |||
+ | === ex.1) minimal setup using defaults: === | ||
+ | |||
+ | < | ||
+ | % vacation -I # initialize DB; defaults to 30 days | ||
+ | |||
+ | % cat > $HOME/ | ||
+ | From: sdf_user@sdf.org | ||
+ | Subject: Vacation notice | ||
+ | Precedence: bulk | ||
+ | |||
+ | I will be out of the office until next week. | ||
+ | ^D | ||
+ | |||
+ | % cat > $HOME/ | ||
+ | From frog@mud.bog | ||
+ | To: sdf_user@sdf.org | ||
+ | Subject: Hop on over here | ||
+ | |||
+ | Check out my new pad! | ||
+ | ^D | ||
+ | |||
+ | % vacation -d sdf_user < test.msg | ||
+ | => | ||
+ | To: frog@mud.bog | ||
+ | Auto-Submitted: | ||
+ | From: sdf_user@sdf.org | ||
+ | Subject: Vacation notice | ||
+ | Precedence: bulk | ||
+ | |||
+ | I will be out of the office until next week. | ||
+ | |||
+ | note: if executed as-is more than once there won't be any output; use | ||
+ | the ' | ||
+ | |||
+ | % cat > $HOME/ | ||
+ | \sdf_user, " | ||
+ | ^D | ||
+ | </ | ||
+ | |||
+ | === ex.2) customized auto-reply sent every 2 days: === | ||
+ | |||
+ | < | ||
+ | % vacation -I -t 2d # initialize DB; set timer to 2 days | ||
+ | % cat > $HOME/ | ||
+ | From: sdf_user@sdf.org | ||
+ | Subject: Out of the office | ||
+ | Delivered-By: | ||
+ | Precedence: bulk | ||
+ | |||
+ | I will be out of the office until next week; please contact | ||
+ | George about $SUBJECT if it's urgent. | ||
+ | ^D | ||
+ | |||
+ | % cat > $HOME/ | ||
+ | From frog@mud.bog | ||
+ | To: sdf_user@sdf.org | ||
+ | Subject: the penski account | ||
+ | |||
+ | Can you get this done this week? | ||
+ | ^D | ||
+ | |||
+ | % vacation -d sdf_user < test2.msg | ||
+ | => | ||
+ | To: frog@mud.bog | ||
+ | Auto-Submitted: | ||
+ | From: sdf_user@sdf.org | ||
+ | Subject: Out of the office | ||
+ | Delivered-By: | ||
+ | Precedence: bulk | ||
+ | |||
+ | I will be out of the office until next week; please contact | ||
+ | George about the penski account if it's urgent. | ||
+ | |||
+ | % cat > $HOME/ | ||
+ | \sdf_user, " | ||
+ | ^D | ||
+ | </ | ||
+ | |||
+ | === ex.3) SDF Meta Array setup: === | ||
+ | |||
+ | SDF users who have their mail sent to the Meta Array (host // | ||
+ | |||
+ | Basic setup: | ||
+ | |||
+ | - setup vacation(1) on the SDF cluster as previously shown | ||
+ | - setup ssh(1) [[http:// | ||
+ | - on // | ||
+ | sdf_user@ma: | ||
+ | => | ||
+ | To: frog@mud.bog | ||
+ | Auto-Submitted: | ||
+ | From: sdf_user@ma.sdf.org | ||
+ | Subject: Vacation notice | ||
+ | Precedence: bulk | ||
+ | ... | ||
+ | </ | ||
+ | - edit '' | ||
+ | # .forward | ||
+ | \sdf_user, "| ssh sdf_user@tty 'cat - | vacation sdf_user' | ||
+ | </ | ||
+ | |||
+ | === ex.4) using vacation(1) with procmail(1): | ||
+ | |||
+ | Users of the procmail(1) program probably won't want to disable it just to make use of vacation(1). The following illustrates how to integrate vacation(1) into a typical user's '' | ||
+ | |||
+ | < | ||
+ | # ~sdf_user/ | ||
+ | ... | ||
+ | ## selective vacation(1) auto-responder filter setup: | ||
+ | VACATION_SENDER=`formail -rx " | ||
+ | VACATION_LIST=$HOME/ | ||
+ | VACATION_MSG=$HOME/ | ||
+ | VACATION_DB=$HOME/ | ||
+ | |||
+ | ## Send vacation(1) notification if SENDER is in VACATION_LIST : | ||
+ | :0 c # " | ||
+ | ## uncomment next line to do selective notifications | ||
+ | #* ? egrep $VACATION_SENDER $VACATION_LIST | ||
+ | | / | ||
+ | </ | ||
+ | |||
+ | The '' | ||
+ | |||
+ | Note that '' | ||
+ | |||
+ | ==== Misc: ==== | ||
+ | |||
+ | * There is a "pure procmail" | ||
+ | * Passing the ‘'' | ||
+ | * The '' | ||
+ | % strings $HOME/ | ||
+ | frog@mud.bog | ||
+ | itchy@bed.bug | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | $Id: vacation_auto-responder.html, | ||