2 messages in net.sourceforge.lists.courier-users[courier-users] Maildroprc & virtual ...
FromSent OnAttachments
Toby HeywoodSep 19, 2006 2:45 am 
Sam VarshavchikSep 19, 2006 4:00 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[courier-users] Maildroprc & virtual accountsActions...
From:Toby Heywood (they@alaric.co.uk)
Date:Sep 19, 2006 2:45:44 am
List:net.sourceforge.lists.courier-users

Hi,

I'm running the latest version of Courier-MTA, with user information stored in a MySQL database and have implemented a basic out of office responder using the maildrop filtering engine and mailbot.

Using the following in maildroprc almost produces the exact results we require, with one exception. $LOGNAME is equal to cour@my.companys.domain.name, when I believe that $LOGNAME should contain the email address of the intended recipient of the mail who is out of the office.

Does $LOGNAME only work with system accounts as opposed to MySQL or LDAP backends? Is there a variable which would contain the intended recipients email address which can then be used for the from address in the out of office reply?

/etc/courier/maildroprc

# ## MAILDROPRC #

# test for vacation file, if it exists, send autoresponse # `test -f vacation.txt` if ($RETURNCODE==0) { # test for vacation message subject, use it if found # `test -f vacation_subject.txt` if ($RETURNCODE==0) {

SUBJECT=`cat vacation_subject.txt` cc "| /usr/lib/courier/bin/mailbot -t vacation.txt -A 'From: $LOGNAME' -A 'Subject: $SUBJECT' /usr/lib/courier/b

# otherwise, regular "Re:" syntax for subject is automatic # } else {

cc "| /usr/lib/courier/bin/mailbot -t vacation.txt -A 'From: $LOGNAME' /usr/lib/courier/bin/sendmail -f ''"

}

# test for any cc addresses, forward to those addresses if present # `test -f vacation_cc_addresses.txt` if ($RETURNCODE==0) {

# grab cc addresses # CCADDRESSES=`cat vacation_cc_addresses.txt`

# do we need to keep a copy of messages in this account or not? # `test -f vacation_keep_messages.txt` if ($RETURNCODE==0) { cc "! -f \"$FROM\" $CCADDRESSES" } else { to "! -f \"$FROM\" $CCADDRESSES" } } }

Thank you in advance.

Regards