Re: SMTP injection

"Todd A. Jacobs" <[email protected]> Thu, 22 Jan 2009 08:53:39 -0800
Newsgroups gmane.mail.spam.tmda.user
Message-ID <[email protected]>
On Thu, Jan 22, 2009 at 01:26:18AM -0700, Jason R. Mastaler wrote:

> http://tmda.sourceforge.net/cgi-bin/moin.cgi/ConfigurationVariables#MAIL_TRANSPORT

Yes and no. I had overlooked that option, so thanks for pointing it out.
However, there seems to be two problems with it when set, and I'm not
sure if they are unavoidable side effects of using SMTP instead of
tmda-sendmail.

Here's the error:

    Traceback (most recent call last):
      File "/usr/local/bin/tmda-inject", line 461, in ?
	main()
      File "/usr/local/bin/tmda-inject", line 452, in main
	log_msg)
      File "/usr/local/bin/tmda-inject", line 285, in inject_message
	Util.sendmail(Util.msg_as_string(msg, 78), to_address, envelope_sender)
      File "./TMDA/Util.py", line 598, in sendmail
      File "./TMDA/SMTP.py", line 61, in sendmail
      File "/usr/lib/python2.4/smtplib.py", line 695, in sendmail
	raise SMTPRecipientsRefused(senderrs)
    smtplib.SMTPRecipientsRefused: {'[email protected]': (554, '5.7.1 <[email protected]>: Relay access denied')}

The SMTP error itself appears to be correct. The reason I need the SMTP
injection is that I want postfix to bounce outbound messages to
everything handled by certain MX records, so TMDA *should* be getting
the 554 error for messages addressed to secureserver.net. However, this
doesn't result in a bounce message, just a TMDA exception.

So, a couple of thoughts. First, is there a more graceful way for TMDA
to handle this rather than a stack trace? Second, is it even possible
for TMDA to generate a local bounce message (say, by falling back to
tmda-sendmail) if SMTP fails?

The problem I'm trying to solve in the larger sense is that I get a lot
of bounces, both because of TMDA sending challenges to non-existent
accounts as well as broken MTAs like those at secureserver.net. I'd
prefer to have some sort of MX blacklist (not per-domain, but per-MX so
that it also blocks virtual domains) to which TMDA will never send
outbound mail, but that doesn't currently seem to be an option unless
I've overlooked something else.

For example, while I believe that I could put something like:

    from *@=secureserver.net	bounce

into my incoming filter, it won't prevent outbound mail to that domain
at all, nor will it automagically bounce mail from all virtual domains
handled by smtp.secureserver.net, which is part of what I'm trying to
do.

Is there already support for this? If not, is it something you would
consider adding?

-- 
"Oh, look: rocks!"
	-- Doctor Who, "Destiny of the Daleks"


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
tmda-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmda-users