Re: mutt vacation-list issue
- From: Jeff Hyman <scolist@xxxxxxxxxx>
- Date: Tue, 27 Mar 2007 13:34:00 -0400
Jean-Pierre Radley typed (on Mon, Mar 26, 2007 at 07:33:48PM -0400):
| Jeff Hyman typed (on Mon, Mar 26, 2007 at 01:30:52PM -0400):
| |
| | SCO 5.0.6
| | mutt ver ??
| |
| | I have an employee 'dlawson' out on maturnity leave.
| | I added /usr/dlawson/.deliver (atached below)
| | '/usr/person/vacation-list' gets appended with any incoming email
| | so that sender receives a message from 'dlawson' that they are
| | out for vaca|maturnity|sick|etc. ONLY ONE TIME.
| |
| | Problem is that 'vacation-list' is creating incorrect outgoing
| | email address, so nobody outside 'cactus.com' receives email
| | notification that user 'dlawson' is out. Email address below
| | are examples only to protect the senders ID.
| |
| | Xmail2!myactv.net!wayscomm@xxxxxxxxxxx
| | Xjeff@xxxxxxxxxxx <=== This was OK
| | XMAILER-DAEMON@xxxxxxxxxxx
| | Xmail2!mirenvelope.com!pach@xxxxxxxxxxx
| | Xmail2!club.co.uk!eister@xxxxxxxxxxx
| | Xroot@xxxxxxxxxxx <=== This was OK
| | Xmail2!ds.localdomain!root@xxxxxxxxxxx
| | Xmail2!wanadoo.fr!johnnyl@xxxxxxxxxxx
| | Xmail2!domain.com!do-not-reply@xxxxxxxxxxx
| | Xmail2!saka.com!Jimmy.Bath@xxxxxxxxxxx
| | Xmail2!ecux.net!eman@xxxxxxxxxxx
| | Xmail2!northrupp.com!debrap@xxxxxxxxxxx
| | ----------------- clipped -------------
| |
| | Where would I start looking to track down this problem to fix it?
| | Solution is that the sender receives ONE email that dlawson is out on vaca.
|
| Nothing whatsoever to do with mutt. The script I wrote is tripping over uucp
| bang!addresses.
|
| Try replacing your /usr/local/lib/deliver.vacation with the following,
| after editing the LOCALDOM and the PLACE:
|
|
| ##### cut here --- file below stored as /usr/local/lib/deliver.vacation #####
| #!/bin/ksh
| # .vacation
| # 1.6 JPRadley 27mar07
| #
| # A user delivery file for when you're away.
| PATH=/usr/local/bin:/bin:/usr/bin
| LOCALDOM=jpr.com
| PLACE="JP Radley, Inc"
| SP=`header -f X-Spam-Flag $HEADER`
|
| echo "$1" # First of all, keep the mail!
|
| case "$SP" in
| YES) exit ;; # replying to what is probably SPAM is a waste of time.
| esac
|
| # Do nothing more unless the message was directly addressed to you.
| header -n -f To -f Cc -f Apparently-To $HEADER |
| fgrep -iq $1@$LOCALDOM || exit 0
|
| # Don't waste any energy on daemons
| case $SENDER in
| uucp@$LOCALDOM|cron@$LOCALDOM|*daemon@$LOCALDOM|MAILER-D*) exit 0 ;;
| esac
|
| typeset -l FROM=`header -f From $HEADER`
|
| # The ALREADY file remembers to whom you've already mailed vacation messages.
| ALREADY=vacation-list
|
| if fgrep X${FROM}X $ALREADY >/dev/null 2>/dev/null
| then
| exit 0 # We already notified this person; do nothing more
| fi
|
| # Remember this person
| echo X${FROM}X >>$ALREADY
|
| # Send the vacation message
| SUBJECT=`header -f subject $HEADER`
| mutt -s "I'm away from $PLACE" $FROM <<!EOF!
| Your message to me on the subject
|
| "$SUBJECT"
|
| has been delivered. I have not yet read your message,
| since I am away from $PLACE.
|
| I expect to return BEBACK.
|
| This is the only such notice you will receive.
|
| Thank you.
|
| !EOF!
|
| exit 0
| ######### cut here #######
|
| --
| JP
| ==> http://www.frappr.com/cusm <==
Seems to work much better.
One noticable error is that a message sent FROM (ie) jeff@xxxxxxxxxx
will reply to the SENDER as follows:
jeffrey@xxxxxxxxxx
hyman@xxxxxxxxxx
jeff@xxxxxxxxxx
# grep jeff /etc/passwd
jeff:zzzzzzzz:Jeffrey Hyman:/usr/jeff:/xxx/xxx
It has also been tested outside domain 'cactus.com' with same results.
I will BOUNCE you a copy of this email.
- Jeff H
.
- Follow-Ups:
- Re: mutt vacation-list issue
- From: Jean-Pierre Radley
- Re: mutt vacation-list issue
- References:
- mutt vacation-list issue
- From: Jeff Hyman
- Re: mutt vacation-list issue
- From: Jean-Pierre Radley
- mutt vacation-list issue
- Prev by Date: Re: mutt vacation-list issue
- Next by Date: Re: mutt vacation-list issue
- Previous by thread: Re: mutt vacation-list issue
- Next by thread: Re: mutt vacation-list issue
- Index(es):
Relevant Pages
|
|