m | 5 Jan 06:20 2005

Postfix + Cyrus (with web-cyradm) + TMDA

I was an avid user and supporter of TMDA for quite some time.

However, the demands of my organization required that we make a change and
switch to the Cyrus IMAP server using the web-cyradm program by Luc DeLeouw.

Has anyone successfully implemented TMDA into this sort of configuration,
where all users are virtual?  There are no "home" directories in my current
conriguration -- only the Cyrus IMAP delivery directories.

The goal is to implement TMDA + TMDA-CGI within the framework of the current
setup.

I'm willing to write up a how-to, including all changes necessary -- but it
seems that all the successful setups with similar setup are on Mac OSX --
which implements Cyrus a little bit differently (users are all system
users).

Any pointers would be helpful.  Specifically, I need to figure out how to
have TMDA work within its own space and pass the confirmed messages to Cyrus
for final delivery.

Mark Nernberg.

Craig Forbes | 5 Jan 07:15 2005

Re: Postfix + Cyrus (with web-cyradm) + TMDA

I have done this.  Actually someone was asking about this a few weeks ago 
and I sent email with some information about how I did it -- it should be 
in the list archives.

To summarize:
I added support in tmda for LMTP delivery
I added support for passing values into tmda via the command line instead 
of environment variables.
I created a "home" directory for each of my virtual users where tmda stores 
its per user files.
I configured tmda and tmda-cgi to use these directories.

In Postfix I used per user transport maps to use tmda for the transport for 
those users that wanted tmda -- turning on tmda is a manual process but my 
user base is quite small.  With that said I have no idea how well my system 
will scale.

I do not use web-cyradm.

 -Craig

--On Wednesday, January 05, 2005 12:20 AM -0500 m <m <at> telerama.com> wrote:

> I was an avid user and supporter of TMDA for quite some time.
>
> However, the demands of my organization required that we make a change and
> switch to the Cyrus IMAP server using the web-cyradm program by Luc
> DeLeouw.
>
> Has anyone successfully implemented TMDA into this sort of configuration,
(Continue reading)

David Hoffman | 5 Jan 19:10 2005
Picon

Re: Postfix + Cyrus (with web-cyradm) + TMDA

Good timing.

I am in the process of upgrading a server and switching from qmail to
postfix. I am also trying to do the Cyrus-imap, and web-cyradm and will
want it to work with TMDA.

Currently, I am using Luc's How-To ( and needing to make several
changes that are not correct ) to get it all set up before I even
introduce TMDA back into the picture. I am 'almost' there, but still
having some saslauth problems to work out.

Anyhow, Mark, I'm interested in knowing what your final results are.
With the small user base that I have, I don't necessarily need to
virtualize all my users, and could simply give each of them a unix
account. But I would prefer the other way if it works without having to
do too much to TMDA.

Then again, it is starting to look like TMDA is no longer being
maintained/developed, so I guess we work with what we have.

David

--- m <m <at> telerama.com> wrote:

> I was an avid user and supporter of TMDA for quite some time.
> 
> However, the demands of my organization required that we make a
> change and
> switch to the Cyrus IMAP server using the web-cyradm program by Luc
> DeLeouw.
(Continue reading)

Dave Cinege | 6 Jan 23:00 2005

ANNOUNCE: tmda_purgedups

Takes the output from tmda-pending, and creates a list of messages for 
deletion based on how many times the sender name or subject is duplicated 
according to a configurable threshold. Optionally calls tmda-pending to do 
the deletion itself.

I wrote this because I'm sick of getting spam bombs of dozens of messages, the
result of which is I delete the entire pending queue instead of reviewing it. 
(A better option would be for TMDA to intelligently handle this itself.)

Requires 'subprocess.py' included with Python 2.4. (Otherwise it works with 
Python 2.3, if you add that modules to site-packages)

I am cronning it daily. No extensive testing thus far. Seems to work. YMMV.

Dave
----
# tmda_purgedups.py --help
usage: Usage: tmda_purgedups.py [options] file|dir ...

options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -v, --verbose         Verbose output enabled.
  -s, --summary         Print summary at completion to stderr.
  -FFROM_MIN, --from-min=FROM_MIN
                        Minmum "From" duplicates required to count.
  -SSUBJECT_MIN, --subject-min=SUBJECT_MIN
                        Minmum "Subject" duplicates required to count.
  -T, --tmda-delete     Call tmda pending directly to delete messages instead 
of
(Continue reading)

Dave Cinege | 7 Jan 00:00 2005

Re: ANNOUNCE: tmda_purgedups

On Thursday 06 January 2005 17:51, Rick Mann wrote:
> On Jan 6, 2005, at 14:00, Dave Cinege wrote:
> > Takes the output from tmda-pending, and creates a list of messages for
> > deletion based on how many times the sender name or subject is
> > duplicated
> > according to a configurable threshold. Optionally calls tmda-pending
> > to do
> > the deletion itself.
>
> Does it ignore (not delete) duplicate messages from senders in the
> various whitelists?

It takes output from 'tmda-pending -b -T'. So it works with 'names' not the 
sender email addy. It could be made more robust by parsing non-terse output, 
or the messages themselves. (minor work)

That said, if it's already in pending, then the people aren't in a white list, 
correct?

My situation is, I've never seen a valid sender email me several times without
either guessing I got the email in the first place, or being confirmed. If 
they are confirmed they don't hit pending. 

Those people that are warry, can set the count way up...to 10 or more. I'm 
using 4 for from and subject....I'm tempted to drop it down to 2.   : )

m | 7 Jan 02:33 2005

postfix+cyrus+tmda (redux)

I posted to the list the other day, and received a whopping ZERO responses.

Its probably my fault for not having provided quality information.

I'm using Postfix+Cyrus with a MySQL back-end to handle the usernames/etc.

I need to figure out how to pass data from Postfix to TMDA.

What seems to make the most sense is to use TWO smtp instances, with TMDA as
an in-between filter, such that an incoming message is passed from Postfix
to TMDA, and, upon successful confirmation, passed back from TMDA to Postfix
via smtp for final delivery via Cyrus.

I.E:

incoming message comes in via SMTP, which passes it to tmda-filter.

after confirmation, tmda-filter passes the message back to Postfix via an
smtp instance listening on another port (i.e. 127.0.0.1:10026).

The part I haven't figured out is how to pass the "correct" data to TMDA, in
the sense of the proper "username".

I do not have a large number of users, so I will create the TMDA storage
space manually in its own directory, such that we have:

/usr/tmda/virt0001 as the directory containing all TMDA information for user
"virt0001".

Since all users on the system are virtual, this leads to some confusion.
(Continue reading)

m | 7 Jan 06:38 2005

postfix+cyrus+tmda (more)

My apologies for continuing to post to the list -- I'm just trying to finish
a project.

Craig Forbes wrote to the list some time ago and stated:

> I have done this. Actually someone was asking about this a few weeks ago and I
> sent email with some information about how I did it -- it should be in the
> list archives.
> 
> To summarize:
> I added support in tmda for LMTP delivery
> I added support for passing values into tmda via the command line instead of
> environment variables.
> I created a "home" directory for each of my virtual users where tmda stores
> its per user files.
> I configured tmda and tmda-cgi to use these directories.

What I need to find is the documentation for passing values into tmda via
the command line.  I haven't found it in the list archives, and it does not
APPEAR to be in the lmtp patch he provided.  Not being a Python programmer,
I'm not quite sure what the patch does.

So ... does anybody know how to pass the values for
sender/recipient/extension via the command line to tmda?

M.

Craig Forbes | 7 Jan 07:43 2005

Re: postfix+cyrus+tmda (more)

--On Friday, January 07, 2005 12:38 AM -0500 m <m <at> telerama.com> wrote:

> My apologies for continuing to post to the list -- I'm just trying to
> finish a project.
>
> Craig Forbes wrote to the list some time ago and stated:
>
>> I have done this. Actually someone was asking about this a few weeks ago
>> and I sent email with some information about how I did it -- it should
>> be in the list archives.
>>
>> To summarize:
>> I added support in tmda for LMTP delivery
>> I added support for passing values into tmda via the command line
>> instead of environment variables.
>> I created a "home" directory for each of my virtual users where tmda
>> stores its per user files.
>> I configured tmda and tmda-cgi to use these directories.
>
> What I need to find is the documentation for passing values into tmda via
> the command line.  I haven't found it in the list archives, and it does
> not APPEAR to be in the lmtp patch he provided.  Not being a Python
> programmer, I'm not quite sure what the patch does.

I had to modify TMDA to take parameters via the command line.  Unless I 
missed something TMDA expects the parameters to be passed via the command 
line.

Here is what I wrote to the list on December 21:

(Continue reading)

Craig Forbes | 7 Jan 07:46 2005

Re: postfix+cyrus+tmda (more)

--On Friday, January 07, 2005 1:43 AM -0500 Craig Forbes 
<cpforbes <at> starlake.org> wrote:
> I had to modify TMDA to take parameters via the command line.  Unless I
> missed something TMDA expects the parameters to be passed via the command
> line.

I must proof my email better.  That should say "TMDA expects the parameters 
to be passed via enviroment variables and not the command line"

  -Craig

David Grimberg | 7 Jan 16:46 2005

RE: ANNOUNCE: tmda_purgedups

Dave,

Are you getting like 50+ copies of the exact same email?  If so it may not
be the spammer that is doing that to you, but a minor glitch in TMDA that
doesn't handle some forms of malformed email messages.  Here's a diff of the
changes made to the Generator.py module to fix this:

----[Snip Here]--- 
--- Generator.v1.0.2.py 2004-08-25 11:55:25.000000000 -0700
+++ Generator.py        2004-08-25 11:50:54.000000000 -0700
 <at>  <at>  -197,7 +197,15  <at>  <at> 
         if cset is not None:
             payload = cset.body_encode(payload)
         if not _isstring(payload):
-            raise TypeError, 'string payload expected: %s' % type(payload)
+            #raise TypeError, 'string payload expected: %s' % type(payload)
+            # AGW start
+            # Changed to handle malformed messages with a text base
+            # type and a multipart content
+            if type(payload) == type([]) and msg.is_multipart():
+                return self._handle_multipart(msg)
+            else:
+                raise TypeError, 'string payload expected: %s' %
type(payload)
+            # AGW end
         if self._mangle_from_:
             payload = fcre.sub('>From ', payload)
         self._fp.write(payload)
----[Snip Here]--- 

(Continue reading)


Gmane