5 messages in net.sourceforge.lists.courier-maildropRE: [maildropl] Mailbot/Autoreply Que...
FromSent OnAttachments
Scott RendaMay 13, 2003 9:41 am 
Sam VarshavchikMay 13, 2003 10:28 am 
Devin RubiaMay 13, 2003 10:32 am 
p dont thinkMay 13, 2003 2:56 pm 
p dont thinkMay 13, 2003 4:27 pm 
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:RE: [maildropl] Mailbot/Autoreply QuestionActions...
From:p dont think (pdon@angrynerds.com)
Date:May 13, 2003 4:27:49 pm
List:net.sourceforge.lists.courier-maildrop

Would you care to share the contents of your maildroprc file?

sure, it's not much, only has stuff for autoresponder functionality at this point. it does four things:

- checks for the presence of a vacation.txt file, in which case it knows a autoresponse needs to be sent - checks for the presence of a vacation_subject.txt file, in which case it uses the contents of that file as the subject of the autoresponse - checks for the presence of a vacation_cc_addresses.txt file, in which case, the contents of that file are used as cc addresses for the incoming email - (if we have any cc addresses) checks for the presence of a vacation_keep_messages.txt file, in which case it keeps a copy of the mail locally, otherwise, it will not deliver to the original recipient.

Cheers,

paul

# 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 "| mailbot -t vacation.txt -A 'From: $LOGNAME' -A 'Subject: $SUBJECT' /usr/sbin/sendmail -f ''"

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

cc "| mailbot -t vacation.txt -A 'From: $LOGNAME' /usr/sbin/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" }

-----Original Message----- From: Scott Renda [mailto:sre@htshq.com] Sent: Tuesday, May 13, 2003 3:08 PM To: p dont think Subject: RE: [maildropl] Mailbot/Autoreply Question

I got it working by shoving a shell variable just in the .mailfilter file. Would you care to share the contents of your maildroprc file?

SR

-----Original Message----- From: p dont think [mailto:pdon@angrynerds.com] Sent: Tuesday, May 13, 2003 2:56 PM To: sre@htshq.com; cour@lists.sourceforge.net Subject: RE: [maildropl] Mailbot/Autoreply Question

I'm no expert, but wanted to make it clear that you *do not* need the recipient to have a valid shell login. I run a virtual system with all my users in MySQL, and it works fine. The way I do autoresponding is with the maildroprc file (instead of .mailfilter for each user), which checks for the existence of a vacation.txt file in the user's home dir (I have a set of "home" directories for my virtual users that are ONLY used to place vacation messages in)... if maildroprc finds the vacation.txt file, it sends an autoresponse...

if maildrop is running fine from the command line, perhaps there is a problem with how you are invoking it from postfix (and the user error message might be referring to the user that is trying to run the maildrop command?)?

-----Original Message----- From: cour@lists.sourceforge.net [mailto:courier- mail@lists.sourceforge.net] On Behalf Of Scott Renda Sent: Tuesday, May 13, 2003 9:47 AM To: cour@lists.sourceforge.net Subject: [maildropl] Mailbot/Autoreply Question

I have searched the archives, and think I have an idea regarding my problem, but I may be off. Using Postifx/Courier IMAP/Maildrop as MDA. Also using Anomy Sanitizer/Spamassassin. Incoming mail runs through a user who calls Anomy and Spamassassin, then hands off to maildrop for local

delivery.

My

users, mostly of them squirrelmail have system accounts with shadow passwords, but no valid login shell, i.e., /sbin/nologin.

It seems when I try to run mailbot to send an autoreply with a .mailfilter file, it just queues the mail. Eventually postifx delivers a bounce saying "/usr/local/bin/maildrop". Command output: This account is currently not available." By account, it is referring to the intended recpipient. Running maildrop manually works. So I know my mailfilter syntax is okay. If I remove the .mailfilter file, mail delivery resumes normally.

I found this posting in the archive:

Andy Bradford writes: It appears that maildrop requires that a user have a valid shell in > /etc/passwd to be able to send out autoreplies

using

the

mailbot command > (and possibly any other command run from .mailfilter), is this correct?

Sam replied: Anything that runs an external command (xfilter, backticks) runs $SHELL to invoke the command, and $SHELL is initialized from the password file.

My questions: *How is the maildrop daemon run, with what privileges or as what user? *When executing the cc command to copy the mail, does maildrop pass this another user? Perhaps it runs in the context of the intended mail recipient, in this case, a local user?

If I missed something obvious here, my apologies. Also, thanks to

for

the hard work.

Regards, Scott

************************************ Scott Renda High Technology Solutions, Inc. Phone: 858-495-0508 Fax: 858-571-5423 sre@htshq.com

------------------------------------------------------- Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara The only event dedicated to issues related to Linux enterprise solutions www.enterpriselinuxforum.com