|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: Vacation reply, procmail and postfix
Subject: Re: Vacation reply, procmail and postfix
From: Wietse Venema (wietse
porcupine.org)
Date: Fri Jan 07 2000 - 09:17:31 CST
- Next message: Rafi Sadowsky: "Re: stoppping empty To: <>"
- Previous message: Andreas Siegert: "Re: sample-*.cf installation"
- In reply to: Christoffer Hall-Frederiksen: "Vacation reply, procmail and postfix"
- Next in thread: Christoffer Hall-Frederiksen: "Re: Vacation reply, procmail and postfix"
- Reply: Wietse Venema: "Re: Vacation reply, procmail and postfix"
- Reply: Christoffer Hall-Frederiksen: "Re: Vacation reply, procmail and postfix"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Create an alias for root that points to a real user. When delivering
mail via procmail, postfix will not deliver as root.
http://www.postfix.org/faq.html
Wietse
Christoffer Hall-Frederiksen:
> Hi, I am currenly moving our mail-system and I've pretty much
> decided to use postfix, but I've run into some trouble.
> In our old sendmail setup delivery was made by procmail, which I
> want to keep because a lot of users already have mail-filters. But
> procmail also keept a vacation system, which was setup as
> follows. Sendmail read a coulpe of alias-map. The first map to
> be read is the vacation map and then the normal alias map.
> Entries in the vacation map look as follows
>
> ---------------------------------------------------------------
> testuser: \testuser, "|/usr/local/bin/procmail -m \
> /etc/procmailrcs/vacation.procmailrc testuser 'testuser'"
> ---------------------------------------------------------------
>
> this runs the procmail script vacation.procmailrc with root-permisions
> (I think). vacation.procmailrc looks as follows.
>
> ---------------------------------------------------------------
> SHELL=/bin/sh
> VACATIONSPOOL=/var/spool/vacation
> VAC_USER=$1
> FOR_ME=$2
>
> :0 Whc: $VACATIONSPOOL/$VAC_USER.lock
> # Perform a quick check to see if the mail was addressed to us
> * $^To:.*($FOR_ME)
> # Don't reply to daemons and mailinglists
> * !^FROM_DAEMON
> * !^Precedence: (bulk|junk)
> # Mail loops are evil
> * !^X-Loop: $VAC_USER
diku.dk
> | formail -rD 8192 $VACATIONSPOOL/$VAC_USER.cache
>
> :0 ehc # if the name was not in the cache
> | (formail -rA"Precedence: junk" \
> -A"X-Loop: $VAC_USER
diku.dk" \
> -I"From: $VAC_USER
diku.dk"; \
> cat $VACATIONSPOOL/$VAC_USER \
> || (echo "Vacation message file mysteriously gone for $VAC_USER" \
> | mail -s "Vacation procmailrc error" postmaster) \
> ) | $SENDMAIL -oi -t
>
> :0
> /dev/null
> ---------------------------------------------------------------
>
> This sends fitting replys (the content of VACATIONSPOOL/$VAC_USER).
>
> Now I am trying to move this to postfix, but the procmail process
> gets started with the rights of nobody (it simply fails because
> setgid gets -2 which off course is an illegal argument). I should
> mention that the users exist in a nis-map, but do not have a valid
> shell on the mail-host.
>
> Can anybody explain to first off all why it doesn't work and secondly
> how I possibly can get it to work?
>
> --
> Christoffer
>
> George: What should we do if we step on a land-mine?
> Blackadder: Well George, standard procedure is to jump 200 ft. up
> in the air and scatter yourself over a large area!
>
>
>
- Next message: Rafi Sadowsky: "Re: stoppping empty To: <>"
- Previous message: Andreas Siegert: "Re: sample-*.cf installation"
- In reply to: Christoffer Hall-Frederiksen: "Vacation reply, procmail and postfix"
- Next in thread: Christoffer Hall-Frederiksen: "Re: Vacation reply, procmail and postfix"
- Reply: Wietse Venema: "Re: Vacation reply, procmail and postfix"
- Reply: Christoffer Hall-Frederiksen: "Re: Vacation reply, procmail and postfix"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
This archive was generated by hypermail 2b27 : Fri Jan 07 2000 - 09:22:29 CST