Bluehost.com Web Hosting $6.95

Re: [courier-users] maildrop variable for virtual user recipient

This is a discussion on Re: [courier-users] maildrop variable for virtual user recipient within the Courier-Imap forums, part of the Mail Servers and Related category; This is a MIME GnuPG-signed message. If you see this text, it means that your E-mail or Usenet ...


Go Back   Usenet Forums > Mail Servers and Related > Courier-Imap

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-07-2006
Sam Varshavchik
 
Posts: n/a
Default Re: [courier-users] maildrop variable for virtual user recipient

This is a MIME GnuPG-signed message. If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.

--=_mimegpg-commodore.email-scan.com-12793-1136589483-0001
Content-Type: text/plain; format=flowed; charset="US-ASCII"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

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/<userid@fredho.net>. 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 "mailusers@fredho.net",
> not the virtual user "fkho@fredho.net" 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.



--=_mimegpg-commodore.email-scan.com-12793-1136589483-0001
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)

iD8DBQBDvvqrx9p3GYHlUOIRAiVAAJ4qLctCZp1a5pfJIA7un3 Ckk+OoAgCeIa0O
uEAhP9XCTvVsYSIIrQUg3F0=
=/Apy
-----END PGP SIGNATURE-----

--=_mimegpg-commodore.email-scan.com-12793-1136589483-0001--


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/.../courier-users
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 03:18 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0