Hi.
I have been extremely buisy at work and didn't have time to respond with an proper
debug report.
This one may look as an overkill but I wanted not to overlook anything and to make
TMDA work.
I just want to say before anyone digs in my report that this is a story with an happy
ending and should propably
get attention from people having similar problems and the developers of TMDA.
My software:
FreeBSD 4.7-RELEASE #0: Mon Oct 21 18:15:46 CEST 2002
procmail-3.22
postfix-1.1.11,1
courier-imap-1.5.3
The users are authenticated directly from my password file (no SQL, LDAP etc)
I have two users to test my setup.
One of them, called test is used for testing of the TMDA filter and the other yazzy is
my regular email account.
I did what Jason told me to, i have replaced the .procmailrc of the test user with
:0
|/usr/bin/env > env
and sent email to [EMAIL PROTECTED]
This results in following messages in my maillog:
Oct 30 09:03:15 titan postfix/pickup[75276]: 5009FA74C: uid=1001
from=<[EMAIL PROTECTED]>
Oct 30 09:03:15 titan postfix/cleanup[75408]: 5009FA74C:
message-id=<[EMAIL PROTECTED]>
Oct 30 09:03:15 titan postfix/qmgr[75277]: 5009FA74C: from=<[EMAIL PROTECTED]>,
size=1872, nrcpt=1 (queue active)
Oct 30 09:03:15 titan postfix/local[75410]: 5009FA74C: to=<[EMAIL PROTECTED]>,
relay=local, delay=0, status=sent ("|/usr/local/bin/tmda-filter")
There is no info/output in the debug.log
I have also changed my main.cf file including mailbox_command =
/usr/local/bin/procmail -p in it.
This is suppose to set procmail to be the default delivery agent if I understand it
correctly excluding use of the .forward file.
I have set up .procmailrc of the yazzy user with following values in it:
UMASK=022
HOME="/home/users/yazzy"
MAILDIR=$HOME/Maildir
DEFAULT=$HOME/Maildir/
TODAY="`/bin/date +%Y-%m-%d`"
LOGFILE="$HOME/.procmail/procmail.log.$TODAY"
This works fine. The emails are delivered to my Maildir.
Example of my maillog:
Oct 30 09:33:00 titan postfix/smtpd[75710]: connect from mail.netbsd.org[155.53.1.253]
Oct 30 09:33:01 titan postfix/smtpd[75710]: 2F1D2A698:
client=mail.netbsd.org[155.53.1.253]
Oct 30 09:33:02 titan postfix/cleanup[75711]: 2F1D2A698:
message-id=<Pine.LNX.4.33.0210300927350.28908-100000@ace>
Oct 30 09:33:02 titan postfix/qmgr[75507]: 2F1D2A698:
from=<[EMAIL PROTECTED]>, size=2103, nrcpt=1 (queue
active)
Oct 30 09:33:02 titan postfix/local[75713]: 2F1D2A698: to=<[EMAIL PROTECTED]>,
relay=local, delay=1, status=sent ("|/usr/local/bin/procmail -p")
Oct 30 09:33:02 titan postfix/smtpd[75710]: disconnect from
mail.netbsd.org[155.53.1.253]
This seems to work fine.
Now. I have changed the value of the .procmailrc of the test user again.
Mark that I do not have any .forward by now as it seems to work fine for the yazzy
account.
UMASK=022
HOME="/home/users/test"
MAILDIR=$HOME/Maildir
DEFAULT=$HOME/Maildir/
TODAY="`/bin/date +%Y-%m-%d`"
LOGFILE="$HOME/.procmail/procmail.log.$TODAY"
:0 w
| /usr/local/bin/tmda-filter
# Take the exit code from TMDA.
EXITCODE=$?
# TMDA takes care of final delivery
DEFAULT=/dev/null
This resulted in following entry in the /var/log/maillog file:
Oct 30 09:48:45 titan postfix/pickup[75506]: C2303A73D: uid=1001
from=<[EMAIL PROTECTED]>
Oct 30 09:48:45 titan postfix/cleanup[75846]: C2303A73D:
message-id=<[EMAIL PROTECTED]>
Oct 30 09:48:45 titan postfix/qmgr[75507]: C2303A73D: from=<[EMAIL PROTECTED]>,
size=1877, nrcpt=1 (queue active)
Oct 30 09:48:46 titan postfix/local[75847]: C2303A73D: to=<[EMAIL PROTECTED]>,
relay=local, delay=1, status=deferred (temporary failure)
Now lets cat the /home/users/test/.tmda/debug.log:
Uncaught Python 2.2.2 Exception (Wed Oct 30 09:48:46 2002):
-----------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/bin/tmda-filter", line 50, in ?
execfile(os.path.join(execdir, 'tmda-rfilter'))
File "/usr/local/bin/tmda-rfilter", line 160, in ?
raise Errors.MissingEnvironmentVariable('SENDER')
MissingEnvironmentVariable
Uncaught Python 2.2.2 Exception (Wed Oct 30 09:48:46 2002):
-----------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/bin/tmda-filter", line 50, in ?
execfile(os.path.join(execdir, 'tmda-rfilter'))
File "/usr/local/bin/tmda-rfilter", line 780, in ?
main()
File "/usr/local/bin/tmda-rfilter", line 749, in main
mta.deliver(message_headers, message_body)
File "/usr/local/lib/python2.2/site-packages/TMDA/MTA.py", line 57, in deliver
msg.deliver()
File "/usr/local/lib/python2.2/site-packages/TMDA/Deliver.py", line 116, in deliver
self.__deliver_program(self.message, dest)
File "/usr/local/lib/python2.2/site-packages/TMDA/Deliver.py", line 141, in
__deliver_program
Util.pipecmd(program, message)
File "/usr/local/lib/python2.2/site-packages/TMDA/Util.py", line 360, in pipecmd
raise IOError, \
IOError: failure delivering message to command "/usr/local/bin/procmail -f $SENDER"
(command "/usr/local/bin/procmail -f $SENDER" exited 75 ())
And the procmail log:
procmail: Program failure (75) of "/usr/local/bin/tmda-filter"
>From [EMAIL PROTECTED] Wed Oct 30 09:46:00 2002
Subject: test
Folder: /dev/null 1941
Let's set .forward to include | /usr/local/bin/procmail -p now.
Not changes as expected, the log files look exactly the same as before.
Let's change .forward to | /usr/bin/tmda-filter
One again, exactly the same error message.
I had the DELIVERY = "|/usr/local/bin/procmail -f $SENDER" line in my TMSA config file.
I will try to comment it and see what happens.
The same error file, unfortunatelly.
Now I have again removed .forward and my maillog gave me following report:
ct 30 10:06:09 titan postfix/pickup[75506]: 8A74EA7E4: uid=1001 from=<[EMAIL PROTECTED]>
Oct 30 10:06:09 titan postfix/cleanup[76007]: 8A74EA7E4:
message-id=<[EMAIL PROTECTED]>
Oct 30 10:06:09 titan postfix/qmgr[75507]: 8A74EA7E4: from=<[EMAIL PROTECTED]>,
size=1877, nrcpt=1 (queue active)
Oct 30 10:06:09 titan postfix/local[76009]: 8A74EA7E4: to=<[EMAIL PROTECTED]>,
relay=local, delay=0, status=deferred (temporary failure)
debug.log seemed to give an obvious answer:
Uncaught Python 2.2.2 Exception (Wed Oct 30 10:06:09 2002):
-----------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/bin/tmda-filter", line 50, in ?
execfile(os.path.join(execdir, 'tmda-rfilter'))
File "/usr/local/bin/tmda-rfilter", line 115, in ?
from TMDA import Defaults
File "/usr/local/lib/python2.2/site-packages/TMDA/Defaults.py", line 160, in ?
raise Errors.ConfigError, \
ConfigError: non-qmail users must define DELIVERY in /home/users/test/.tmda/config
So I commented out DELIVERY = "|/usr/local/bin/procmail -f $SENDER" again
This caused TMDA to give the same error message as it did previously.
I will try no to set DELIVERY = "~/Maildir/"
This is what maillog had to say about it:
Oct 30 10:10:57 titan postfix/pickup[75506]: 779D6A7F4: uid=1001
from=<[EMAIL PROTECTED]>
Oct 30 10:10:57 titan postfix/cleanup[76126]: 779D6A7F4:
message-id=<[EMAIL PROTECTED]>
Oct 30 10:10:57 titan postfix/qmgr[75507]: 779D6A7F4: from=<[EMAIL PROTECTED]>,
size=1877, nrcpt=1 (queue active)
Oct 30 10:10:57 titan postfix/local[76127]: 779D6A7F4: to=<[EMAIL PROTECTED]>,
relay=local, delay=0, status=sent ("|/usr/local/bin/procmail -p")
Nothing appeared in the debug.log and ....... What??????
This worked!
The email actually came through!
Let's try to send an email from an account that isnt included in my whitelist
The maillog file shows following:
Oct 30 10:16:55 titan postfix/smtpd[76171]: connect from
smtp1.powertech.no[195.159.0.145]
Oct 30 10:16:55 titan postfix/smtpd[76171]: 739A1A698:
client=smtp1.powertech.no[195.159.0.145]
Oct 30 10:16:55 titan postfix/cleanup[76172]: 739A1A698:
message-id=<[EMAIL PROTECTED]>
Oct 30 10:16:55 titan postfix/qmgr[75507]: 739A1A698: from=<[EMAIL PROTECTED]>, size=977,
nrcpt=1 (queue active)
Oct 30 10:16:55 titan postfix/smtpd[76171]: disconnect from
smtp1.powertech.no[195.159.0.145]
Oct 30 10:16:55 titan postfix/smtpd[76171]: connect from localhost.yazzy.org[127.0.0.1]
Oct 30 10:16:55 titan postfix/smtpd[76171]: DF6E8A7FF:
client=localhost.yazzy.org[127.0.0.1]
Oct 30 10:16:55 titan postfix/cleanup[76172]: DF6E8A7FF:
message-id=<[EMAIL PROTECTED]>
Oct 30 10:16:55 titan postfix/qmgr[75507]: DF6E8A7FF: from=<>, size=2208, nrcpt=1
(queue active)
Oct 30 10:16:55 titan postfix/smtpd[76171]: disconnect from
localhost.yazzy.org[127.0.0.1]
Oct 30 10:16:55 titan postfix/local[76147]: 739A1A698: to=<[EMAIL PROTECTED]>,
relay=local, delay=0, status=sent ("|/usr/local/bin/procmail -p")
Oct 30 10:17:07 titan postfix/smtp[76181]: DF6E8A7FF: to=<[EMAIL PROTECTED]>,
relay=mail.powertech.no[195.159.0.214], delay=12, status=sent (250 2.0.0 g9U9F5o26727
Message accepted for delivery)
The procmail logfile:
>From [EMAIL PROTECTED] Wed Oct 30 10:16:55 2002
Subject: test
Folder: /usr/local/bin/tmda-filter 1061
The in.log:
Date: Wed Oct 30 10:16:55 CET 2002
From: Marcin Michal Jessa <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subj: test
Actn: CONFIRM pending 1035969415.76177.msg (129)
Message is stored in the ~/.tmda/pending/1035969415.76177.msg
But no respons is sent back to my account.
I have sent a message from another account too and I got a response back.
I've sent a confirmation and the email was smoothly accepted.
So it looks like everything works fine now.
One question though.
Why some accounts accept responses sent by TMDA and some don't?
Here are my compressed config files:
http://www.yazzy.net/files/TMDA-configfiles.tar.bzip2
YazzY
On (28/10/02 11:02), Jason R. Mastaler wrote:
> To: [EMAIL PROTECTED]
> Subject: Re: Errors.MissingEnvironmentVariable('SENDER')
> Date: Mon, 28 Oct 2002 11:02:50 -0700
> From: "Jason R. Mastaler" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
>
> "Marcin M. Jessa" <[EMAIL PROTECTED]> writes:
>
> > Hopefully this is the right place for asking this question.
>
> Yup.
>
> > raise Errors.MissingEnvironmentVariable('SENDER')
> > I run my email server on FreeBSD 4.7 with postfix and courier.
>
> This problem has been reported in the past (only with Postfix), but it
> seems hard to reproduce. I've never been able to reproduce it with my
> Postfix account.
>
> What this is saying is that there is no SENDER variable in the
> environment once the message gets to TMDA. TMDA needs SENDER to be
> there so that it knows the envelope sender address of the message.
>
> Does this error get raised every time, or do some messages get through
> TMDA fine, while others do not?
>
> > my .forward :
> > | /usr/local/bin/procmail -p
>
> If you change your .procmailrc to just:
>
> :0
> |/usr/bin/env > env
>
> and send yourself a message, does SENDER appear in the env file?
>
> > my .tmdarc
> > http://yazzy.net/files/tmdarc
>
> BTW, LOCAL_DELIVERY_AGENT is no longer used, so you can remove it.
>
> DELIVERY has replaced it.
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users