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:22:48 am
List:net.sourceforge.lists.courier-users

Bowie Bailey wrote:

Kyle Johnson wrote:

Running a little test: mail:/usr/local/virtual/hanoveruniform.com/sodoherty # cat message.txt | /usr/local/bin/maildrop -V 10 -d sodo@hanoveruniform.com

[snip]

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.

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.

No, -t contains the path to your message.txt file, but I do see that the RECIPIENT variable expanded to null in the two places where it was used.

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.

That is quite possible. I had assumed you were using the Courier MTA. Postfix is an entirely different animal. You will have to check which environment variables are being set. Try this:

Put this line in your .mailfilter:

`env > env.txt`

(including the back-ticks)

This will drop a copy of the environment into the user's home directory. You can take a look at this file to see which variables are set and then modify your mailbot line to use those variables.

Sorry - I should have clarified that earlier on. The env.txt file looks like this: HOSTNAME=mail RECIPIENT= SHELL=/bin/sh UMASK=077 MAILDIRQUOTA= SIZE=208 LOCKEXT=.lock DEFAULT=/usr/local/virtual/hanoveruniform.com/sodoherty/ MAILFILTER=.mailfilter PATH=/bin:/usr/bin:/usr/local/bin LOCKTIMEOUT=60 PWD=/usr/local/virtual/hanoveruniform.com/sodoherty LINES=3 SHLVL=1 HOME=/root LOCKSLEEP=5 LOCKREFRESH=15 FROM=sodo@hanoveruniform.com LOGNAME=sodo@hanoveruniform.com SENDMAIL=/usr/sbin/sendmail -oi _=/usr/bin/env

No RECIPIENT, as we though, and what's with HOME=/root? Anyway, I'm going to send a mail to the dspam-users list and see if they know how to pass the variables.