Ok I've created three files .courier .mailfilter and autoreply I've set permissions of all three files to 700 and the owner is the same user:group that owns the $HOME. I am also using mail drop due to my spamassassin requirements though the autoreply doesn't seem to reply?
.courier file contents: | /usr/lib/courier/bin/maildrop .mailflter file contents: FROM='[EMAIL PROTECTED]' import SENDER if ($SENDER eq "") { SENDER=$FROM } cc "./Maildir" AUTOREPLYFROM=$FROM `/usr/lib/courier/bin/mailbot -A "X-Sender: $FROM" -A "From: $AUTOREPLYFROM" -m "./autoreply" $SENDMAIL -t -f ""` EXITCODE = 0 exit Autoreply just contains a text message: n/a Does anyone notice what I'm missing here? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bowie Bailey Sent: Friday, June 20, 2003 11:50 AM To: Thomas von Hassel Cc: [EMAIL PROTECTED] Subject: RE: [courier-users] Vacation Notices From: Thomas von Hassel [mailto:[EMAIL PROTECTED] > > Now that summer holidays are comming up i need a quick and dirty > solution to make auto reply/vacation notice. Courier MTA with mysql > auth and default delivery. I'm not using the webmail feature. Quick and dirty...Ok, here ya go! This is the setup that I use for my accounts that need an autoreply. For this to work, you need to be using maildrop. You can set it as the DEFAULTDELIVERY for everyone in '/etc/courier/courierd', or just run it from '$HOME/.courier' for a particular user. Keep in mind that if you set DEFAULTDELIVERY to maildrop, it will still be overridden by anything in '$HOME/.courier'. In the user's home directory, create a .mailfilter file. Mine looks like this: FROM='[EMAIL PROTECTED]' import SENDER if ($SENDER eq "") { SENDER=$FROM } cc "[EMAIL PROTECTED]" AUTOREPLYFROM=$FROM `/usr/lib/courier/bin/mailbot -A "X-Sender: $FROM" -A "From: $AUTOREPLYFROM" -m "./autoreply" $SENDMAIL -t -f ""` EXITCODE = 0 exit Note that the mailbot command should be all one line. Create a file called 'autoreply' in the home directory with the text of the autoreply message. This file can even be an html message if you include the proper headers at the top. If I'm doing something fancy, I'll generally create the email in my mail client and send it to my mailbox. Then I can grab the message file and cut out the message and necessary headers for the autoreply. FROM is the address you want the autoreply to be sent from. It does not necessarily need to be the same as your email address. To save a copy of the original email to your mailbox or forward it somewhere else, use the 'cc' line. Note that the original email will be discarded unless you specifically send it somewhere. You can use "[EMAIL PROTECTED]" as above to forward the email or "./Maildir" to save it to your mailbox. If you want to discard the original email, just delete the 'cc' line. SENDMAIL is set in my '/etc/courier/maildroprc' file: SENDMAIL="/usr/lib/courier/bin/sendmail -f \"$FROM\"" Hmmm... This seems to conflict with the '-f ""' definition in the .mailfilter file. Hadn't noticed that before. In any case, it seems to be working fine. There may be better, cleaner, or even easier ways to do this, but this is one quick and dirty method and it works well for me. Bowie ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users