Fred Ho writes:
Hi all, I am running Courier 0.52.1 and Courier-Authlib 0.58 on Redhat RHEL4.The user authentication is through the userdb for all virtual users. The home directories for all the users are under the directory /home/mailusers/fredhonet/<[EMAIL PROTECTED]>. The directories are owned by user "mailusers". I created the /etc/courier/maildroprc for handling of vacation autoresponds by using the Courier's mailbot command as follows: MAILHOME=$HOME `test -f "$MAILHOME/away.msg"` if ( $RETURNCODE==0 ) { # Send Out-of-office notice auto-respond exception {cc "| /usr/lib/courier/bin/mailbot -d \"$MAILHOME/away\" -D 1 -t "$MAILHOME/away.msg\" -s 'Subject: Out of Office Notice' -A $LOGNAME /usr/sbin/sendmail -t -f ''"} } The autoresponds mail works but the sender is "[EMAIL PROTECTED]", not the virtual user "[EMAIL PROTECTED]" as expected. Apparently, the variable LOGNAME does not evaulated to the virtual userid in maildrop.
No, it's not.
So, how do I get the actual user-id to pass to mailbot from inside the maildrop script?
Use the import statement to import the environment variables described in the dot-courier man page.
You will also need pass the -f option to mailbot, because it's mailbot that generates the mail headers. The -f option to sendmail only sets the envelope return address.
Also, if you are using any kind of a "catchall" setup of any kind, forget the whole thing unless you have knowledge and experience in system security; because unless you understand VERY well how maildrop and shell expansion works, you're going to be running an exploitable script with gaping security holes.
pgpge38WxHruO.pgp
Description: PGP signature
