Mailing List Archive

Qmail users in a DB (ie not on the system) + auto responses - tips to avoid gotchas?
People,

I have been using qmail and ezmlm for many years and am very happy with
them (despite the idiosyncrasies) - many thanks to all concerned for
these tools!

I now have a need for something slightly different from things I have
done before - but I would prefer to stick with qmail if I can. I need a
new server where the users exist in a DB instead of on the system - I
have looked at:

https://qmail.jms1.net/rules/postgresql.shtml

and all seems straight forward enough - however there are some potential
complications - I want to be able to have:

- mail received for users that exist ONLY in the DB

- some automatic processing done by a separate application according to
the contents of the body of the received mail

- an automatic reply to the sender of the original mail with the output
of the separate application

I was about to start trying to put this together but I thought I would
ask the brains trust here for advice about any potential gotchas before
I started . .

Regards,

Phil.
--
Philip Rhoades

GPO Box 3411
Sydney NSW 2001
Australia
E-mail: phil@pricom.com.au
Re: Qmail users in a DB (ie not on the system) + auto responses - tips to avoid gotchas? [ In reply to ]
Hi Phil,

I run qmail with vpopmail now for years without problems, it should do
the job at least regarding the "users not on system" task. For
mail-content agnostic action, I would go with the qmail-queue patch as
it is used with a usual SpamAssassin setup - it should not be that hard
to swap out SA against a crafted script that analyses your mail body and
takes actions.

Oliver

Am 21.11.2014 um 03:42 schrieb Philip Rhoades:
> People,
>
> I have been using qmail and ezmlm for many years and am very happy with
> them (despite the idiosyncrasies) - many thanks to all concerned for
> these tools!
>
> I now have a need for something slightly different from things I have
> done before - but I would prefer to stick with qmail if I can. I need a
> new server where the users exist in a DB instead of on the system - I
> have looked at:
>
> https://qmail.jms1.net/rules/postgresql.shtml
>
> and all seems straight forward enough - however there are some potential
> complications - I want to be able to have:
>
> - mail received for users that exist ONLY in the DB
>
> - some automatic processing done by a separate application according to
> the contents of the body of the received mail
>
> - an automatic reply to the sender of the original mail with the output
> of the separate application
>
> I was about to start trying to put this together but I thought I would
> ask the brains trust here for advice about any potential gotchas before
> I started . .
>
> Regards,
>
> Phil.


--
Protect your environment - close windows and adopt a penguin!
RE: Qmail users in a DB (ie not on the system) + auto responses - tips to avoid gotchas? [ In reply to ]
Hello,

Try vpopmail with MySQL support. Take a look at the sample on
http://qmailrocks.thibs.com/vpopmail.php

Best Regards

Thibault

-----Original Message-----
From: Philip Rhoades [mailto:phil@pricom.com.au]
Sent: Friday 21 November 2014 03:43
To: Qmail List
Subject: Qmail users in a DB (ie not on the system) + auto responses - tips
to avoid gotchas?

People,

I have been using qmail and ezmlm for many years and am very happy with them
(despite the idiosyncrasies) - many thanks to all concerned for these tools!

I now have a need for something slightly different from things I have done
before - but I would prefer to stick with qmail if I can. I need a new
server where the users exist in a DB instead of on the system - I have
looked at:

https://qmail.jms1.net/rules/postgresql.shtml

and all seems straight forward enough - however there are some potential
complications - I want to be able to have:

- mail received for users that exist ONLY in the DB

- some automatic processing done by a separate application according to the
contents of the body of the received mail

- an automatic reply to the sender of the original mail with the output of
the separate application

I was about to start trying to put this together but I thought I would ask
the brains trust here for advice about any potential gotchas before I
started . .

Regards,

Phil.
--
Philip Rhoades

GPO Box 3411
Sydney NSW 2001
Australia
E-mail: phil@pricom.com.au
RE: Qmail users in a DB (ie not on the system) + auto responses - tips to avoid gotchas? [ In reply to ]
Oliver and Thibault,


On 2014-11-21 18:39, Thibault Richard wrote:
> Hello,
>
> Try vpopmail with MySQL support. Take a look at the sample on
> http://qmailrocks.thibs.com/vpopmail.php


I had a look at vpopmail and it seems like overkill (and is not very
well supported anymore?) for me. I think what I want to do is simpler
than what people need vpopmail for. Also, vpopmail needs one real user
on the system anyway. So, in my case I think I should be able to do
what I want more simply with my own scripts ie:

- redirect all mail to *@domainname.com to
processmailbody@domainname.com (this should be possible in qmail
anyway?)

- put the required email body processing script name in
~processmailbody/.qmail

- the script then does the email body processing

- the script then sends the outgoing mail back to the original sender by
using qmail-inject

- mv the original incoming mail into ~processmailbody/Maildir/cur (or
wherever else is appropriate)

This seems like it should be all I need?

Thanks,

Phil.



> Best Regards
>
> Thibault
>
> -----Original Message-----
> From: Philip Rhoades [mailto:phil@pricom.com.au]
> Sent: Friday 21 November 2014 03:43
> To: Qmail List
> Subject: Qmail users in a DB (ie not on the system) + auto responses -
> tips
> to avoid gotchas?
>
> People,
>
> I have been using qmail and ezmlm for many years and am very happy with
> them
> (despite the idiosyncrasies) - many thanks to all concerned for these
> tools!
>
> I now have a need for something slightly different from things I have
> done
> before - but I would prefer to stick with qmail if I can. I need a new
> server where the users exist in a DB instead of on the system - I have
> looked at:
>
> https://qmail.jms1.net/rules/postgresql.shtml
>
> and all seems straight forward enough - however there are some
> potential
> complications - I want to be able to have:
>
> - mail received for users that exist ONLY in the DB
>
> - some automatic processing done by a separate application according to
> the
> contents of the body of the received mail
>
> - an automatic reply to the sender of the original mail with the output
> of
> the separate application
>
> I was about to start trying to put this together but I thought I would
> ask
> the brains trust here for advice about any potential gotchas before I
> started . .
>
> Regards,
>
> Phil.
> --
> Philip Rhoades
>
> GPO Box 3411
> Sydney NSW 2001
> Australia
> E-mail: phil@pricom.com.au

--
Philip Rhoades

GPO Box 3411
Sydney NSW 2001
Australia
E-mail: phil@pricom.com.au
RE: Qmail users in a DB (ie not on the system) + auto responses - tips to avoid gotchas? [ In reply to ]
Hi,

concerning my own enhancements for qmail (ie. spamcontrol + QMVC) I suggest
the following:

--On 21. November 2014 19:12:32 +1100 Philip Rhoades <phil@pricom.com.au>
wrote:

> Oliver and Thibault,
>
>
> On 2014-11-21 18:39, Thibault Richard wrote:
>> Hello,
>>
>> Try vpopmail with MySQL support. Take a look at the sample on
>> http://qmailrocks.thibs.com/vpopmail.php
>
>
> I had a look at vpopmail and it seems like overkill (and is not very well
> supported anymore?) for me. I think what I want to do is simpler than
> what people need vpopmail for. Also, vpopmail needs one real user on the
> system anyway. So, in my case I think I should be able to do what I want
> more simply with my own scripts ie:
>
> - redirect all mail to *@domainname.com to processmailbody@domainname.com
> (this should be possible in qmail anyway?)

With spamcontrol comes a script qmail-queue.sh which allows these kind of
rewriting. Though within Spamcontrol, I use more qmail-queue return codes,
it needs some adjustments, in case you will fall back to vanilla qmail (or
something else).

The script's actions are customizable per domain.

>
> - put the required email body processing script name in
> ~processmailbody/.qmail
>
> - the script then does the email body processing
>
> - the script then sends the outgoing mail back to the original sender by
> using qmail-inject
>
> - mv the original incoming mail into ~processmailbody/Maildir/cur (or
> wherever else is appropriate)

This is an action of a Mail Delivery Agent (MDA). For this purpose QMVC is
appropriate. It is a shell script with is certainly some overkill for you,
but it provides this kind of flexibility. It supports VERP and a
virtual-user support as well (I need to publish QMVC 1.8 though).

Maybe you succeed as well with other tools.

Best regards.
--eh.

>
> This seems like it should be all I need?
>
> Thanks,
>
> Phil.
>
>
>
>> Best Regards
>>
>> Thibault
>>
>> -----Original Message-----
>> From: Philip Rhoades [mailto:phil@pricom.com.au]
>> Sent: Friday 21 November 2014 03:43
>> To: Qmail List
>> Subject: Qmail users in a DB (ie not on the system) + auto responses -
>> tips
>> to avoid gotchas?
>>
>> People,
>>
>> I have been using qmail and ezmlm for many years and am very happy with
>> them
>> (despite the idiosyncrasies) - many thanks to all concerned for these
>> tools!
>>
>> I now have a need for something slightly different from things I have
>> done
>> before - but I would prefer to stick with qmail if I can. I need a new
>> server where the users exist in a DB instead of on the system - I have
>> looked at:
>>
>> https://qmail.jms1.net/rules/postgresql.shtml
>>
>> and all seems straight forward enough - however there are some
>> potential
>> complications - I want to be able to have:
>>
>> - mail received for users that exist ONLY in the DB
>>
>> - some automatic processing done by a separate application according to
>> the
>> contents of the body of the received mail
>>
>> - an automatic reply to the sender of the original mail with the output
>> of
>> the separate application
>>
>> I was about to start trying to put this together but I thought I would
>> ask
>> the brains trust here for advice about any potential gotchas before I
>> started . .
>>
>> Regards,
>>
>> Phil.
>> --
>> Philip Rhoades
>>
>> GPO Box 3411
>> Sydney NSW 2001
>> Australia
>> E-mail: phil@pricom.com.au
>
> --
> Philip Rhoades
>
> GPO Box 3411
> Sydney NSW 2001
> Australia
> E-mail: phil@pricom.com.au
>



--
Dr. Erwin Hoffmann | FEHCom | http://www.fehcom.de/ | PGP-Key-Id: 7E4034BE
RE: Qmail users in a DB (ie not on the system) + auto responses - tips to avoid gotchas? [ In reply to ]
Erwin,


On 2014-11-21 20:45, Erwin Hoffmann wrote:
> Hi,
>
> concerning my own enhancements for qmail (ie. spamcontrol + QMVC) I
> suggest the following:
>
> --On 21. November 2014 19:12:32 +1100 Philip Rhoades
> <phil@pricom.com.au> wrote:
>
>> Oliver and Thibault,
>>
>>
>> On 2014-11-21 18:39, Thibault Richard wrote:
>>> Hello,
>>>
>>> Try vpopmail with MySQL support. Take a look at the sample on
>>> http://qmailrocks.thibs.com/vpopmail.php
>>
>>
>> I had a look at vpopmail and it seems like overkill (and is not very
>> well
>> supported anymore?) for me. I think what I want to do is simpler than
>> what people need vpopmail for. Also, vpopmail needs one real user on
>> the
>> system anyway. So, in my case I think I should be able to do what I
>> want
>> more simply with my own scripts ie:
>>
>> - redirect all mail to *@domainname.com to
>> processmailbody@domainname.com
>> (this should be possible in qmail anyway?)
>
> With spamcontrol comes a script qmail-queue.sh which allows these kind
> of rewriting. Though within Spamcontrol, I use more qmail-queue return
> codes, it needs some adjustments, in case you will fall back to
> vanilla qmail (or something else).
>
> The script's actions are customizable per domain.


I downloaded spamcontrol-2732.tgz but that script was not in it?

Thanks,

Phil.


>> - put the required email body processing script name in
>> ~processmailbody/.qmail
>>
>> - the script then does the email body processing
>>
>> - the script then sends the outgoing mail back to the original sender
>> by
>> using qmail-inject
>>
>> - mv the original incoming mail into ~processmailbody/Maildir/cur (or
>> wherever else is appropriate)
>
> This is an action of a Mail Delivery Agent (MDA). For this purpose
> QMVC is appropriate. It is a shell script with is certainly some
> overkill for you, but it provides this kind of flexibility. It
> supports VERP and a virtual-user support as well (I need to publish
> QMVC 1.8 though).
>
> Maybe you succeed as well with other tools.
>
> Best regards.
> --eh.
>
>>
>> This seems like it should be all I need?
>>
>> Thanks,
>>
>> Phil.
>>
>>
>>
>>> Best Regards
>>>
>>> Thibault
>>>
>>> -----Original Message-----
>>> From: Philip Rhoades [mailto:phil@pricom.com.au]
>>> Sent: Friday 21 November 2014 03:43
>>> To: Qmail List
>>> Subject: Qmail users in a DB (ie not on the system) + auto responses
>>> -
>>> tips
>>> to avoid gotchas?
>>>
>>> People,
>>>
>>> I have been using qmail and ezmlm for many years and am very happy
>>> with
>>> them
>>> (despite the idiosyncrasies) - many thanks to all concerned for these
>>> tools!
>>>
>>> I now have a need for something slightly different from things I have
>>> done
>>> before - but I would prefer to stick with qmail if I can. I need a
>>> new
>>> server where the users exist in a DB instead of on the system - I
>>> have
>>> looked at:
>>>
>>> https://qmail.jms1.net/rules/postgresql.shtml
>>>
>>> and all seems straight forward enough - however there are some
>>> potential
>>> complications - I want to be able to have:
>>>
>>> - mail received for users that exist ONLY in the DB
>>>
>>> - some automatic processing done by a separate application according
>>> to
>>> the
>>> contents of the body of the received mail
>>>
>>> - an automatic reply to the sender of the original mail with the
>>> output
>>> of
>>> the separate application
>>>
>>> I was about to start trying to put this together but I thought I
>>> would
>>> ask
>>> the brains trust here for advice about any potential gotchas before I
>>> started . .
>>>
>>> Regards,
>>>
>>> Phil.
>>> --
>>> Philip Rhoades
>>>
>>> GPO Box 3411
>>> Sydney NSW 2001
>>> Australia
>>> E-mail: phil@pricom.com.au
>>
>> --
>> Philip Rhoades
>>
>> GPO Box 3411
>> Sydney NSW 2001
>> Australia
>> E-mail: phil@pricom.com.au
>>
>
>
>
> --
> Dr. Erwin Hoffmann | FEHCom | http://www.fehcom.de/ | PGP-Key-Id:
> 7E4034BE

--
Philip Rhoades

GPO Box 3411
Sydney NSW 2001
Australia
E-mail: phil@pricom.com.au
RE: Qmail users in a DB (ie not on the system) + auto responses - tips to avoid gotchas? [ In reply to ]
Hi,

check for qmail-queue.scan.

This is the name used for calling it via the qmail-queue extra mechanism.

More information can be found here:

<http://www.fehcom.de/qmail/spamcontrol/README_spamcontrol.html#Message>

regards.
--eh.


regards.
--eh.

:q!--On 21. November 2014 21:45:56 +1100 Philip Rhoades
<phil@pricom.com.au> wrote:

> Erwin,
>
>
> On 2014-11-21 20:45, Erwin Hoffmann wrote:
>> Hi,
>>
>> concerning my own enhancements for qmail (ie. spamcontrol + QMVC) I
>> suggest the following:
>>
>> --On 21. November 2014 19:12:32 +1100 Philip Rhoades
>> <phil@pricom.com.au> wrote:
>>
>>> Oliver and Thibault,
>>>
>>>
>>> On 2014-11-21 18:39, Thibault Richard wrote:
>>>> Hello,
>>>>
>>>> Try vpopmail with MySQL support. Take a look at the sample on
>>>> http://qmailrocks.thibs.com/vpopmail.php
>>>
>>>
>>> I had a look at vpopmail and it seems like overkill (and is not very
>>> well
>>> supported anymore?) for me. I think what I want to do is simpler than
>>> what people need vpopmail for. Also, vpopmail needs one real user on
>>> the
>>> system anyway. So, in my case I think I should be able to do what I
>>> want
>>> more simply with my own scripts ie:
>>>
>>> - redirect all mail to *@domainname.com to
>>> processmailbody@domainname.com
>>> (this should be possible in qmail anyway?)
>>
>> With spamcontrol comes a script qmail-queue.sh which allows these kind
>> of rewriting. Though within Spamcontrol, I use more qmail-queue return
>> codes, it needs some adjustments, in case you will fall back to
>> vanilla qmail (or something else).
>>
>> The script's actions are customizable per domain.
>
>
> I downloaded spamcontrol-2732.tgz but that script was not in it?
>
> Thanks,
>
> Phil.
>
>
>>> - put the required email body processing script name in
>>> ~processmailbody/.qmail
>>>
>>> - the script then does the email body processing
>>>
>>> - the script then sends the outgoing mail back to the original sender
>>> by
>>> using qmail-inject
>>>
>>> - mv the original incoming mail into ~processmailbody/Maildir/cur (or
>>> wherever else is appropriate)
>>
>> This is an action of a Mail Delivery Agent (MDA). For this purpose
>> QMVC is appropriate. It is a shell script with is certainly some
>> overkill for you, but it provides this kind of flexibility. It
>> supports VERP and a virtual-user support as well (I need to publish
>> QMVC 1.8 though).
>>
>> Maybe you succeed as well with other tools.
>>
>> Best regards.
>> --eh.
>>
>>>
>>> This seems like it should be all I need?
>>>
>>> Thanks,
>>>
>>> Phil.
>>>
>>>
>>>
>>>> Best Regards
>>>>
>>>> Thibault
>>>>
>>>> -----Original Message-----
>>>> From: Philip Rhoades [mailto:phil@pricom.com.au]
>>>> Sent: Friday 21 November 2014 03:43
>>>> To: Qmail List
>>>> Subject: Qmail users in a DB (ie not on the system) + auto responses
>>>> -
>>>> tips
>>>> to avoid gotchas?
>>>>
>>>> People,
>>>>
>>>> I have been using qmail and ezmlm for many years and am very happy
>>>> with
>>>> them
>>>> (despite the idiosyncrasies) - many thanks to all concerned for these
>>>> tools!
>>>>
>>>> I now have a need for something slightly different from things I have
>>>> done
>>>> before - but I would prefer to stick with qmail if I can. I need a
>>>> new
>>>> server where the users exist in a DB instead of on the system - I
>>>> have
>>>> looked at:
>>>>
>>>> https://qmail.jms1.net/rules/postgresql.shtml
>>>>
>>>> and all seems straight forward enough - however there are some
>>>> potential
>>>> complications - I want to be able to have:
>>>>
>>>> - mail received for users that exist ONLY in the DB
>>>>
>>>> - some automatic processing done by a separate application according
>>>> to
>>>> the
>>>> contents of the body of the received mail
>>>>
>>>> - an automatic reply to the sender of the original mail with the
>>>> output
>>>> of
>>>> the separate application
>>>>
>>>> I was about to start trying to put this together but I thought I
>>>> would
>>>> ask
>>>> the brains trust here for advice about any potential gotchas before I
>>>> started . .
>>>>
>>>> Regards,
>>>>
>>>> Phil.
>>>> --
>>>> Philip Rhoades
>>>>
>>>> GPO Box 3411
>>>> Sydney NSW 2001
>>>> Australia
>>>> E-mail: phil@pricom.com.au
>>>
>>> --
>>> Philip Rhoades
>>>
>>> GPO Box 3411
>>> Sydney NSW 2001
>>> Australia
>>> E-mail: phil@pricom.com.au
>>>
>>
>>
>>
>> --
>> Dr. Erwin Hoffmann | FEHCom | http://www.fehcom.de/ | PGP-Key-Id:
>> 7E4034BE
>
> --
> Philip Rhoades
>
> GPO Box 3411
> Sydney NSW 2001
> Australia
> E-mail: phil@pricom.com.au
>



--
Dr. Erwin Hoffmann | FEHCom | http://www.fehcom.de/ | PGP-Key-Id: 7E4034BE
RE: Qmail users in a DB (ie not on the system) + auto responses - tips to avoid gotchas? [ In reply to ]
Erwin,


On 2014-11-21 22:55, Erwin Hoffmann wrote:
> Hi,
>
> check for qmail-queue.scan.


OK, I think I can see what you are doing but this still seems like too
much overhead - I thought there would be a one-line addition to
smtproutes or something that would redirect all *@domainname.com to
processmailbody@domainname.com . .

Thanks,

Phil.


> This is the name used for calling it via the qmail-queue extra
> mechanism.
>
> More information can be found here:
>
> <http://www.fehcom.de/qmail/spamcontrol/README_spamcontrol.html#Message>
>
> regards.
> --eh.
>
>
> regards.
> --eh.
>
> :q!--On 21. November 2014 21:45:56 +1100 Philip Rhoades
> <phil@pricom.com.au> wrote:
>
>> Erwin,
>>
>>
>> On 2014-11-21 20:45, Erwin Hoffmann wrote:
>>> Hi,
>>>
>>> concerning my own enhancements for qmail (ie. spamcontrol + QMVC) I
>>> suggest the following:
>>>
>>> --On 21. November 2014 19:12:32 +1100 Philip Rhoades
>>> <phil@pricom.com.au> wrote:
>>>
>>>> Oliver and Thibault,
>>>>
>>>>
>>>> On 2014-11-21 18:39, Thibault Richard wrote:
>>>>> Hello,
>>>>>
>>>>> Try vpopmail with MySQL support. Take a look at the sample on
>>>>> http://qmailrocks.thibs.com/vpopmail.php
>>>>
>>>>
>>>> I had a look at vpopmail and it seems like overkill (and is not very
>>>> well
>>>> supported anymore?) for me. I think what I want to do is simpler
>>>> than
>>>> what people need vpopmail for. Also, vpopmail needs one real user
>>>> on
>>>> the
>>>> system anyway. So, in my case I think I should be able to do what I
>>>> want
>>>> more simply with my own scripts ie:
>>>>
>>>> - redirect all mail to *@domainname.com to
>>>> processmailbody@domainname.com
>>>> (this should be possible in qmail anyway?)
>>>
>>> With spamcontrol comes a script qmail-queue.sh which allows these
>>> kind
>>> of rewriting. Though within Spamcontrol, I use more qmail-queue
>>> return
>>> codes, it needs some adjustments, in case you will fall back to
>>> vanilla qmail (or something else).
>>>
>>> The script's actions are customizable per domain.
>>
>>
>> I downloaded spamcontrol-2732.tgz but that script was not in it?
>>
>> Thanks,
>>
>> Phil.
>>
>>
>>>> - put the required email body processing script name in
>>>> ~processmailbody/.qmail
>>>>
>>>> - the script then does the email body processing
>>>>
>>>> - the script then sends the outgoing mail back to the original
>>>> sender
>>>> by
>>>> using qmail-inject
>>>>
>>>> - mv the original incoming mail into ~processmailbody/Maildir/cur
>>>> (or
>>>> wherever else is appropriate)
>>>
>>> This is an action of a Mail Delivery Agent (MDA). For this purpose
>>> QMVC is appropriate. It is a shell script with is certainly some
>>> overkill for you, but it provides this kind of flexibility. It
>>> supports VERP and a virtual-user support as well (I need to publish
>>> QMVC 1.8 though).
>>>
>>> Maybe you succeed as well with other tools.
>>>
>>> Best regards.
>>> --eh.
>>>
>>>>
>>>> This seems like it should be all I need?
>>>>
>>>> Thanks,
>>>>
>>>> Phil.
>>>>
>>>>
>>>>
>>>>> Best Regards
>>>>>
>>>>> Thibault
>>>>>
>>>>> -----Original Message-----
>>>>> From: Philip Rhoades [mailto:phil@pricom.com.au]
>>>>> Sent: Friday 21 November 2014 03:43
>>>>> To: Qmail List
>>>>> Subject: Qmail users in a DB (ie not on the system) + auto
>>>>> responses
>>>>> -
>>>>> tips
>>>>> to avoid gotchas?
>>>>>
>>>>> People,
>>>>>
>>>>> I have been using qmail and ezmlm for many years and am very happy
>>>>> with
>>>>> them
>>>>> (despite the idiosyncrasies) - many thanks to all concerned for
>>>>> these
>>>>> tools!
>>>>>
>>>>> I now have a need for something slightly different from things I
>>>>> have
>>>>> done
>>>>> before - but I would prefer to stick with qmail if I can. I need a
>>>>> new
>>>>> server where the users exist in a DB instead of on the system - I
>>>>> have
>>>>> looked at:
>>>>>
>>>>> https://qmail.jms1.net/rules/postgresql.shtml
>>>>>
>>>>> and all seems straight forward enough - however there are some
>>>>> potential
>>>>> complications - I want to be able to have:
>>>>>
>>>>> - mail received for users that exist ONLY in the DB
>>>>>
>>>>> - some automatic processing done by a separate application
>>>>> according
>>>>> to
>>>>> the
>>>>> contents of the body of the received mail
>>>>>
>>>>> - an automatic reply to the sender of the original mail with the
>>>>> output
>>>>> of
>>>>> the separate application
>>>>>
>>>>> I was about to start trying to put this together but I thought I
>>>>> would
>>>>> ask
>>>>> the brains trust here for advice about any potential gotchas before
>>>>> I
>>>>> started . .
>>>>>
>>>>> Regards,
>>>>>
>>>>> Phil.
>>>>> --
>>>>> Philip Rhoades
>>>>>
>>>>> GPO Box 3411
>>>>> Sydney NSW 2001
>>>>> Australia
>>>>> E-mail: phil@pricom.com.au
>>>>
>>>> --
>>>> Philip Rhoades
>>>>
>>>> GPO Box 3411
>>>> Sydney NSW 2001
>>>> Australia
>>>> E-mail: phil@pricom.com.au
>>>>
>>>
>>>
>>>
>>> --
>>> Dr. Erwin Hoffmann | FEHCom | http://www.fehcom.de/ | PGP-Key-Id:
>>> 7E4034BE
>>
>> --
>> Philip Rhoades
>>
>> GPO Box 3411
>> Sydney NSW 2001
>> Australia
>> E-mail: phil@pricom.com.au
>>
>
>
>
> --
> Dr. Erwin Hoffmann | FEHCom | http://www.fehcom.de/ | PGP-Key-Id:
> 7E4034BE

--
Philip Rhoades

GPO Box 3411
Sydney NSW 2001
Australia
E-mail: phil@pricom.com.au
RE: Qmail users in a DB (ie not on the system) + auto responses - tips to avoid gotchas? [ In reply to ]
Hi



--On 21. November 2014 23:34:51 +1100 Philip Rhoades <phil@pricom.com.au>
wrote:

>> check for qmail-queue.scan.
>
>
> OK, I think I can see what you are doing but this still seems like too
> much overhead - I thought there would be a one-line addition to
> smtproutes or something that would redirect all *@domainname.com to
> processmailbody@domainname.com . .

The script was used in another context (combined virus and spam scanning
...).

Anyway, probably you can survive with the following main ingredients:

ID="${RANDOM}$$"
MESSAGE="${QMAIL}/tmp/msg.${ID}"
export DTLINE="spam-queue" # the name is irrelevant
DELIVERTO="processmailbody@domainname.com"

#
[[ ! -d ${QMAIL}/tmp ]] && exit 53
cat > ${MESSAGE} || exit 53


${QMAIL}/bin/forward ${MAILFROM} "${DELIVERTO}" < ${MESSAGE}

This is most of it.

regards.
--eh.


> Thanks,
>
> Phil.
>
>
>> This is the name used for calling it via the qmail-queue extra
>> mechanism.
>>
>> More information can be found here:
>>
>> <http://www.fehcom.de/qmail/spamcontrol/README_spamcontrol.html#Message>
>>
>> regards.
>> --eh.
>>
>>
>> regards.
>> --eh.
>>
>> :q!--On 21. November 2014 21:45:56 +1100 Philip Rhoades
>> <phil@pricom.com.au> wrote:
>>
>>> Erwin,
>>>
>>>
>>> On 2014-11-21 20:45, Erwin Hoffmann wrote:
>>>> Hi,
>>>>
>>>> concerning my own enhancements for qmail (ie. spamcontrol + QMVC) I
>>>> suggest the following:
>>>>
>>>> --On 21. November 2014 19:12:32 +1100 Philip Rhoades
>>>> <phil@pricom.com.au> wrote:
>>>>
>>>>> Oliver and Thibault,
>>>>>
>>>>>
>>>>> On 2014-11-21 18:39, Thibault Richard wrote:
>>>>>> Hello,
>>>>>>
>>>>>> Try vpopmail with MySQL support. Take a look at the sample on
>>>>>> http://qmailrocks.thibs.com/vpopmail.php
>>>>>
>>>>>
>>>>> I had a look at vpopmail and it seems like overkill (and is not very
>>>>> well
>>>>> supported anymore?) for me. I think what I want to do is simpler
>>>>> than
>>>>> what people need vpopmail for. Also, vpopmail needs one real user
>>>>> on
>>>>> the
>>>>> system anyway. So, in my case I think I should be able to do what I
>>>>> want
>>>>> more simply with my own scripts ie:
>>>>>
>>>>> - redirect all mail to *@domainname.com to
>>>>> processmailbody@domainname.com
>>>>> (this should be possible in qmail anyway?)
>>>>
>>>> With spamcontrol comes a script qmail-queue.sh which allows these
>>>> kind
>>>> of rewriting. Though within Spamcontrol, I use more qmail-queue
>>>> return
>>>> codes, it needs some adjustments, in case you will fall back to
>>>> vanilla qmail (or something else).
>>>>
>>>> The script's actions are customizable per domain.
>>>
>>>
>>> I downloaded spamcontrol-2732.tgz but that script was not in it?
>>>
>>> Thanks,
>>>
>>> Phil.
>>>
>>>
>>>>> - put the required email body processing script name in
>>>>> ~processmailbody/.qmail
>>>>>
>>>>> - the script then does the email body processing
>>>>>
>>>>> - the script then sends the outgoing mail back to the original
>>>>> sender
>>>>> by
>>>>> using qmail-inject
>>>>>
>>>>> - mv the original incoming mail into ~processmailbody/Maildir/cur
>>>>> (or
>>>>> wherever else is appropriate)
>>>>
>>>> This is an action of a Mail Delivery Agent (MDA). For this purpose
>>>> QMVC is appropriate. It is a shell script with is certainly some
>>>> overkill for you, but it provides this kind of flexibility. It
>>>> supports VERP and a virtual-user support as well (I need to publish
>>>> QMVC 1.8 though).
>>>>
>>>> Maybe you succeed as well with other tools.
>>>>
>>>> Best regards.
>>>> --eh.
>>>>
>>>>>
>>>>> This seems like it should be all I need?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Phil.
>>>>>
>>>>>
>>>>>
>>>>>> Best Regards
>>>>>>
>>>>>> Thibault
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Philip Rhoades [mailto:phil@pricom.com.au]
>>>>>> Sent: Friday 21 November 2014 03:43
>>>>>> To: Qmail List
>>>>>> Subject: Qmail users in a DB (ie not on the system) + auto
>>>>>> responses
>>>>>> -
>>>>>> tips
>>>>>> to avoid gotchas?
>>>>>>
>>>>>> People,
>>>>>>
>>>>>> I have been using qmail and ezmlm for many years and am very happy
>>>>>> with
>>>>>> them
>>>>>> (despite the idiosyncrasies) - many thanks to all concerned for
>>>>>> these
>>>>>> tools!
>>>>>>
>>>>>> I now have a need for something slightly different from things I
>>>>>> have
>>>>>> done
>>>>>> before - but I would prefer to stick with qmail if I can. I need a
>>>>>> new
>>>>>> server where the users exist in a DB instead of on the system - I
>>>>>> have
>>>>>> looked at:
>>>>>>
>>>>>> https://qmail.jms1.net/rules/postgresql.shtml
>>>>>>
>>>>>> and all seems straight forward enough - however there are some
>>>>>> potential
>>>>>> complications - I want to be able to have:
>>>>>>
>>>>>> - mail received for users that exist ONLY in the DB
>>>>>>
>>>>>> - some automatic processing done by a separate application
>>>>>> according
>>>>>> to
>>>>>> the
>>>>>> contents of the body of the received mail
>>>>>>
>>>>>> - an automatic reply to the sender of the original mail with the
>>>>>> output
>>>>>> of
>>>>>> the separate application
>>>>>>
>>>>>> I was about to start trying to put this together but I thought I
>>>>>> would
>>>>>> ask
>>>>>> the brains trust here for advice about any potential gotchas before
>>>>>> I
>>>>>> started . .
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Phil.
>>>>>> --
>>>>>> Philip Rhoades
>>>>>>
>>>>>> GPO Box 3411
>>>>>> Sydney NSW 2001
>>>>>> Australia
>>>>>> E-mail: phil@pricom.com.au
>>>>>
>>>>> --
>>>>> Philip Rhoades
>>>>>
>>>>> GPO Box 3411
>>>>> Sydney NSW 2001
>>>>> Australia
>>>>> E-mail: phil@pricom.com.au
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Dr. Erwin Hoffmann | FEHCom | http://www.fehcom.de/ | PGP-Key-Id:
>>>> 7E4034BE
>>>
>>> --
>>> Philip Rhoades
>>>
>>> GPO Box 3411
>>> Sydney NSW 2001
>>> Australia
>>> E-mail: phil@pricom.com.au
>>>
>>
>>
>>
>> --
>> Dr. Erwin Hoffmann | FEHCom | http://www.fehcom.de/ | PGP-Key-Id:
>> 7E4034BE
>
> --
> Philip Rhoades
>
> GPO Box 3411
> Sydney NSW 2001
> Australia
> E-mail: phil@pricom.com.au
>



--
Dr. Erwin Hoffmann | FEHCom | http://www.fehcom.de/ | PGP-Key-Id: 7E4034BE
RE: Qmail users in a DB (ie not on the system) + auto responses - tips to avoid gotchas? [ In reply to ]
Erwin,


On 2014-11-21 23:54, Erwin Hoffmann wrote:
> Hi
>
> --On 21. November 2014 23:34:51 +1100 Philip Rhoades
> <phil@pricom.com.au> wrote:
>
>>> check for qmail-queue.scan.
>>
>>
>> OK, I think I can see what you are doing but this still seems like too
>> much overhead - I thought there would be a one-line addition to
>> smtproutes or something that would redirect all *@domainname.com to
>> processmailbody@domainname.com . .
>
> The script was used in another context (combined virus and spam
> scanning ...).
>
> Anyway, probably you can survive with the following main ingredients:
>
> ID="${RANDOM}$$"
> MESSAGE="${QMAIL}/tmp/msg.${ID}"
> export DTLINE="spam-queue" # the name is irrelevant
> DELIVERTO="processmailbody@domainname.com"
>
> #
> [[ ! -d ${QMAIL}/tmp ]] && exit 53
> cat > ${MESSAGE} || exit 53
>
>
> ${QMAIL}/bin/forward ${MAILFROM} "${DELIVERTO}" < ${MESSAGE}
>
> This is most of it.


OK, I need to get some sleep now but I will give it a shot tomorrow.

Thanks!

Phil.
--
Philip Rhoades

GPO Box 3411
Sydney NSW 2001
Australia
E-mail: phil@pricom.com.au
Re: Qmail users in a DB (ie not on the system) + auto responses - tips to avoid gotchas? [ In reply to ]
Thus said Philip Rhoades on Fri, 21 Nov 2014 23:34:51 +1100:

> OK, I think I can see what you are doing but this still seems like too
> much overhead - I thought there would be a one-line addition to
> smtproutes or something that would redirect all *@domainname.com to
> processmailbody@domainname.com . .

Are you perhaps thinking of virtualdomains?

man qmail-send

Andy
--
TAI64 timestamp: 40000000546f807a