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 [EMAIL PROTECTED]
>>>
>>> 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 [EMAIL PROTECTED]
maildrop: authlib: groupid=1010
maildrop: authlib: userid=2008
maildrop: authlib: [EMAIL PROTECTED],
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 [EMAIL PROTECTED]
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
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users