Default Delivery Question

2000-07-25 Thread Derek Watson


Hello all -- I would like a few opinions on the "defaultdelivery"
method. . 

. . .for instance, this is standard:

qmail-start ./Maildir/ splogger qmail

. . . I want to try something like this, to achieve a global incoming
mail filter without using any qmail-queue wrappers or modifications:

qmail-start "|/var/qmail/bin/myfilter |tomaildir $HOME/Maildir" splogger
qmail

Where myfilter is a program I write and tomaildir is from the "qtools"
package, and does a reliable job of delivering messages to a maildir. 
Will this work?  Do I need the quotes?  I guess what I really want to
know is: "Can I make this line as robust as a line from a .qmail file?"

I know this gets passed to qmail-lspawn, but lspawn's man page isn't too
detailed about what it can and can't have in it's params.

Has anybody else tried something like this before?  Is there a way
easier way to achieve this that I'm not seeing because I'm an idiot? 
All very possible.

Thanks in advance,

Derek



Opinions on filtering

2000-06-06 Thread Derek Watson


Hello all.

I was just looking for a little insight, maybe from someone who has
tried this before.  I plan to write a wrapper (for qmail-local?), which will
intercept every local mail delivery (from local to local, or remote to
local).  I need to filter the content, strip attachments and postpend a
tagline to the message.  I figure Perl is suitable for the task, and have no
problems writing that element, but I am unsure of how to implament it.

Is qmail-local the program I should emulate?  Is there any piping
trickery I can use when starting qmail-smtpd instead?  I have seen people
pipe messages through other programs before delivering them to ./Maildir. .
. is that the way I should go about this?

I appretiate any input you might have.


Derek Watson
Systems Administrator, Programmer
Elyrium Corp.





Re: Opinions on filtering

2000-06-06 Thread Derek Watson


   Just a follow up to my last message, which might not have been very
clear.  I think I want to do something from within the rc script so that
qmail runs like this:

qmail-start "|/var/qmail/myscripts/filter.pl ./Maildir/" splogger qmail

Where filter.pl would read STDIN, filter out words, and print to STDOUT,
in the hopes that qmail-local would pick up the rest and deliver to Maildir.
But this doesn't seem to work out. .. I just get filter.pl printing the
contents of the message to syslog.

Can anybody help me along?


- Original Message -----
From: "Derek Watson" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 06, 2000 10:48 AM
Subject: Opinions on filtering



 Hello all.

 I was just looking for a little insight, maybe from someone who has
 tried this before.  I plan to write a wrapper (for qmail-local?), which
will
 intercept every local mail delivery (from local to local, or remote to
 local).  I need to filter the content, strip attachments and postpend a
 tagline to the message.  I figure Perl is suitable for the task, and have
no
 problems writing that element, but I am unsure of how to implament it.

 Is qmail-local the program I should emulate?  Is there any piping
 trickery I can use when starting qmail-smtpd instead?  I have seen people
 pipe messages through other programs before delivering them to ./Maildir.
.
 . is that the way I should go about this?

 I appretiate any input you might have.


 Derek Watson
 Systems Administrator, Programmer
 Elyrium Corp.







Easy question

2000-05-02 Thread Derek Watson


I have been running a by-the-book installation of qmail 1.03 for a small
office of 40 people for about a year now.  Here's my question:

In a simple, one-domain environment, is it necessary to have anything
more than (in my case) "elyrium.com" in my control/rcpthosts and
control/locals file?

The reason I ask for advice is -- every once in a while I run into
problems, for instance, when a user has their email program inproperly
configured, and their return address goes out as [EMAIL PROTECTED] or
[EMAIL PROTECTED]  (lucid is the name of the qmail box, pop3 is
obviously a cname for the service).

Also, when piping to programs like /var/qmail/bin/sendmail, the default
address added is my system account -- usually [EMAIL PROTECTED] or
[EMAIL PROTECTED]

Just wondering the *proper* way to handle this, of if I should just
stick lucid and pop3.elyrium.com in my rcpthosts and locals file.

Derek.

PS, i have read the docs.  Don't flame me if you think this is basic
stuff.  I know it's basic.




Rewriting subject line

2000-03-06 Thread Derek Watson

Here's what I'm trying to achieve -

When an email gets sent to [EMAIL PROTECTED], the message gets processed
by it's .qmail file, and gets forwarded to a short list of addresses within
that file.  That works fine, and it was really easy to do.  What I would
like is to rewrite the subject line of the message before delivery to
prepend a [maillist] tag before the message.. . so that a message coming in
like
---
From: [EMAIL PROTECTED]
Subject: test message
---
gets delivered like

---
From: [EMAIL PROTECTED]
Subject: [maillist] test message
---

I'm sure you all know what I mean.  I have experimented with "preline". ..
but I think I'm on the wrong track.  My current .qmail file looks like this:

|preline /usr/bin/mailfilter [maillist]
[EMAIL PROTECTED]

"Mailfilter" is a simple perl program I wrote to take standard-in and add
argument 1 to the subject line.  But preline only passes the email OUT, it
doesn't take it back IN for further processing.  So, short of letting my
lame mailfilter program do the rest of the delivery, I'm SOL.

Am I going about this all wrong?  Someone please help, I know I sound new,
but I couldn't find any good docs on this anywhere. . .

Derek