Kyle Johnson wrote:
> Bowie Bailey wrote:
> > Kyle Johnson wrote:
> > 
> > > This is a followup.
> > > 
> > > My .mailfilter file looks like:
> > > import HOME
> > > 
> > > if (/^X-DSPAM-Result: Spam/)
> > > {
> > >         to ".Spam/"
> > > }
> > > 
> > > cc "| /usr/local/bin/mailbot -s 'Out-Of-Office Reply' -A 'From:
> > > [EMAIL PROTECTED]' -m
> > > '/usr/local/virtual/hanoveruniform.com/sodoherty/message.txt'
> > > /usr/sbin/sendmail -f '' [EMAIL PROTECTED]"
> > > 
> > > I have found that, with the above rule, when email is sent to
> > > this user from a non-local domain, the autoreply does work - it
> > > sends to the message to [EMAIL PROTECTED]  There are a few
> > > questions: 1:  I'd like the mail to go to the sender, not to a
> > > static address ([EMAIL PROTECTED]) - how can I do this?
> > > 2:  The original email does not end up in the users inbox.  How
> > > can I do this? 3:  Why does #2 happen?
> > > 
> > 
> > Don't know why it doesn't go to the inbox.  If all you have is a CC,
> > the normal delivery should still happen unless the mailbot program
> > is throwing an error (and in that case, the messages should stay in
> > the queue).
> > 
> > I use this for my vacation messages:
> > ------------------------------------------------------
> > import RECIPIENT
> > if (! (/^X-Spam-Flag: YES/ || /^List-id:/) )
> > {
> > `/usr/lib/courier/bin/mailbot -A "From: $RECIPIENT" -d
> > "./autoreplydb" -m "./autoreply" /usr/lib/courier/bin/sendmail -f
> > "$RECIPIENT"` }
> > ------------------------------------------------------ 
> > 
> > Note that the mailbot command is one long line.
> > 
> > This will send one reply per day per recipient.  It only sends
> > replies to messages that do not look like mailing lists and are not
> > marked as spam. 
> > 
> > 
> 
> I've just tried your example:
> `/usr/local/bin/mailbot -A "From: [EMAIL PROTECTED]" -t
> "./message.txt" /usr/sbin/sendmail -f "$RECIPIENT"`
> and it doesn't work.  In your example, how does mailbot know who to
> send 
> the email to - shouldn't it be going to $SENDER?  (How can I import
> that, with import SENDER ?)

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.

-- 
Bowie

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

Reply via email to