Cameron, I'm forwarding my reply to the dbmail list. Perhaps someone can
fill in the blanks regarding exim. I'm also providing some info that may
be of use to other newby dbmail users.

Cameron Turner wrote:

I've been searching through the dbmail archives trying to figure out how to configure dbmail on a Debian Woody install, using Exim as the MTA. I can use something else, but I have no experience with any other MTA (and only limited experience with Exim). Is this what your package uses by default, or does it require fetchmail or something else?

I know exim is the default debian MTA. I've also heard there are plans
to change that. I don't include MTA integration in the debian packages,
and I don't plan to. There is no best-practice yet when it comes to
dealing with that issue, afaik.

You can indeed use fetchmail by using dbmail-smtp as your mda, but I
haven't used that route myself.

Try:

poll oldschool.wecreate.com with protocol imap
  user remoteimapuser mda "/usr/sbin/dbmail-smtp -u someuser"
  password xxxxxx;

in your fetchmailrc. This would be a good route to take when first
testing dbmail by migrating just a single one account from a imap server
running uw-imap or cyrus to another running dbmail. There are far better
ways to migrate whole virtual mail-domains though.



I compiled and installed dbmail from source before I found your packages.. but I can undo that easily.

The woody packages should install without any problems, I hope. But
that's not your problem, I think.

I've read and re-read the install file in the dbmail 1.1 package in the MTA section, and it gives good directions on how to setup those MTAs but NOT what it's trying to accomplish. I don't even know what I'm trying to get Exim to do.

I hear you, level 101 :-)

The basic concept is:

-> MTA -(PIPE)-> dbmail-smtp

Your mta receives a mail for [EMAIL PROTECTED] and somehow pipes the
message into dbmail-smtp.

This pipe can be a mechanism provided by your mta. Such mechanisms are
defined as special mailers or agents inside your mta configuration. One
such mechanism is your mda (mail delivery agent). That's what you will
want to customize.

The actual cookbook-cookiecutter-explanation is highly dependant on your
actual mta. I have zero experience with exim. I've managed sendmail and
currently do postfix. But if you can get your exim installation to use
some customized mda you are set. I'll try to provide some examples, but
there are zillions of ways to open pipes.

The simplest case doesn't customize anything about your MTA. Dbmail's
'hello world' so to speak.

in /etc/aliases:

someuser: "|/usr/sbin/dbmail-smtp -u someuser"

The .forward version of this is runner-up hello-world nominee. However,
complex mail delivery is a well-known problem. More interesting
solutions exist.

Procmail is a commonly used optional mda. While using procmail as your
delivery agent, you may use a procmail filter to setup the pipe:

in /home/someuser/.procmailrc
------
# pipe all incoming mail into dbmail (look maw, I'm too smart to use
# aliases)
:0:
| /usr/sbin/dbmail-smtp -u someuser
-------

If this is all you are going to do with procmail, don't use it. Go for
the aliases approach instead, if I may suggest. Unless you don't have
root access, but than you wouldn't use the debian packages.

Most procmail users will need something better...

A more complex procmail filter (using the bogofilter spamkiller):


             # scan, mark and classify
:0fw
| bogofilter -u -e -p



# exit on temp failure
:0e
{ EXITCODE=75 HOST }



# I build spam archives to re-train bogofilter
:0
* ^X-Bogosity: Yes, tests=bogofilter
{
   # I move false-negatives to this folder and feed the messages to
   # bogofilter -- using fetchmail. This provides bogofilter's
   # algorithms with training feedback.
   :0c
   | /usr/sbin/dbmail-smtp -m Junk -u someuser

   #


   :0: junk.mbox
   Mail/junk
}

# dynamic folders for some lists (make sure the folder exists)
:0
* ^Sender: \/[EMAIL PROTECTED]
{
  LISTNAME=`echo $MATCH|sed 's/[EMAIL PROTECTED]//'`
  :0: list.$LISTNAME
  | /usr/sbin/dbmail-smtp -m list/$LISTNAME -u foobar
}


             # final catchall into INBOX
:0:
| /usr/sbin/dbmail-smtp -u foobar





              > I'll gladly read any FAQ or posting on this, or STFW
with search terms
other than "exim dbmail debain", but sofar no luck. Any ideas?

http://www.exim.org/exim-html-4.20/doc/html/spec.html

Look for delivery and pipe_transports I guess. As said though, me know
diddly 'bout exim.


--
  ________________________________________________________________
  Paul Stevens                                  mailto:[EMAIL PROTECTED]
  NET FACILITIES GROUP                     PGP: finger [EMAIL PROTECTED]
  The Netherlands________________________________http://www.nfg.nl


Reply via email to