11 messages in net.sourceforge.lists.courier-usersRe: [courier-users] mailbot useage
FromSent OnAttachments
Kyle JohnsonJun 27, 2006 6:04 pm 
Kyle JohnsonJun 28, 2006 11:39 am 
Bowie BaileyJun 28, 2006 12:11 pm 
Bowie BaileyJun 28, 2006 12:31 pm 
Kyle JohnsonJun 28, 2006 12:49 pm 
Bowie BaileyJun 28, 2006 1:31 pm 
Kyle JohnsonJun 28, 2006 5:22 pm 
Kyle JohnsonJun 29, 2006 6:01 am 
Bowie BaileyJun 29, 2006 6:14 am 
Kyle JohnsonJun 29, 2006 6:22 am 
Bowie BaileyJun 29, 2006 7:49 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:Re: [courier-users] mailbot useageActions...
From:Kyle Johnson (kjoh@fixertec.net)
Date:Jun 29, 2006 6:01:34 am
List:net.sourceforge.lists.courier-users

Bowie Bailey wrote:

Kyle Johnson wrote:

Bowie Bailey wrote:

You don't need to specify the reply address. Mailbot automatically gets it from the original message.

From the man page:

By default mailbot takes the autoresponse address from the From: (or the Reply-To:) header in the original message.

If you want to use SENDER, I think it is imported automatically. If not, you can get it with "import SENDER".

I don't know why it's not working for you. It works fine for me.

The man page shows it being used as a CC. I'm not sure where I got my script. I set it up as a TO on a test account and it works fine that way too.

Send a message to test@buc.com.

The .mailfilter for this account looks like this:

import RECIPIENT to "| /usr/lib/courier/bin/mailbot -A \"From: $RECIPIENT\" -m \"./autoreply\" /usr/lib/courier/bin/sendmail -f \"$RECIPIENT\""

Actually, the "import RECIPIENT" part is in /etc/courier/maildroprc, but it shouldn't matter.

I'll leave this account around for a day or two unless it starts getting hammered.

It worked just fine - thanks for the example; I'm going to try it when I get into the office tomorrow.

Great!

Did the message also make it to the users inbox?

No. In this case, I used the TO directive to tell Maildrop to consider delivery ended with the autoreply. If you use CC instead of TO, delivery will continue to the user's inbox.

I hate to say it, but it's still not working. I think the problem is with how maildrop is being called as the LDA.

Again, my .mailfilter file contains: import HOME import RECIPIENT

if (/^X-DSPAM-Result: Spam/) { to ".Spam/" }

cc "| /usr/local/bin/mailbot -A \"From: $RECIPIENT\" -t \"/usr/local/virtual/hanoveruniform.com/sodoherty/message.txt\" /usr/sbin/sendmail -f \"$RECIPIENT\""

Running a little test: mail:/usr/local/virtual/hanoveruniform.com/sodoherty # cat message.txt | /usr/local/bin/maildrop -V 10 -d sodo@hanoveruniform.com maildrop: authlib: groupid=1010 maildrop: authlib: userid=2008 maildrop: authlib: logname=sodo@hanoveruniform.com, home=/usr/local/virtual/hanoveruniform.com/sodoherty/, mail=/usr/local/virtual/hanoveruniform.com/sodoherty/ maildrop: Changing to /usr/local/virtual/hanoveruniform.com/sodoherty/ Message start at 0 bytes, envelope sender=sodo@hanoveruniform.com maildrop: Attempting .mailfilter Tokenized import Tokenized string: "HOME" Tokenized ; Tokenized import Tokenized string: "RECIPIENT" Tokenized ; Tokenized ; Tokenized if Tokenized ( Tokenized regexp: /^X-DSPAM-Result: Spam/ Tokenized ) Tokenized ; Tokenized { Tokenized ; Tokenized to Tokenized string: ".Spam/" Tokenized ; Tokenized } Tokenized ; Tokenized ; Tokenized cc Tokenized string: "| /usr/local/bin/mailbot -A "From: $RECIPIENT" -t "/usr/local/virtual/hanoveruniform.com/sodoherty/message.txt" /usr/sbin/sendmail -f "$RECIPIENT"" Tokenized ; Tokenized eof .mailfilter(1): import "HOME" .mailfilter(2): import "RECIPIENT" .mailfilter(4): Evaluating IF condition. Matching /^X-DSPAM-Result: Spam/ against Steve O'Doherty will be on vacation starting Wed. 6/28 - returning Friday July 14th. Not matched. Matching /^X-DSPAM-Result: Spam/ against He will respond to your message at that time - If a Customer Service Rep can Not matched. Matching /^X-DSPAM-Result: Spam/ against be of assistance, please call 1-800-541-9709 Not matched. .mailfilter(4): Search of ^X-DSPAM-Result: Spam = 0 .mailfilter(4): IF evaluated, result=0 maildrop: Delivering to | /usr/local/bin/mailbot -A "From: " -t "/usr/local/virtual/hanoveruniform.com/sodoherty/message.txt" /usr/sbin/sendmail -f "" maildrop: Delivery complete. maildrop: Delivery complete. mail:/usr/local/virtual/hanoveruniform.com/sodoherty #

Look towards the bottom, at: maildrop: Delivering to | /usr/local/bin/mailbot -A "From: " -t "/usr/local/virtual/hanoveruniform.com/sodoherty/message.txt" /usr/sbin/sendmail -f "" -t is empty, as is the $RECIPIENT variable, it seems.

My mailflow is like this: Internet -> Postfix (virtual_transport = lmtp:unix:/tmp/dspam.sock) -> dspam (TrustedDeliveryAgent "/usr/local/bin/maildrop -d %u") -> maildir Could the problem be that dspam isn't passing the variables that are needed? This makes sense since they weren't filled in when I used them in my script.

--Kyle