Mailing List Archive

prepending a word in subject line
Hi,
We have a requirement to prepend a word "secure" to every e-mail that is
going out of a few servers.
I am wondering if there is a way to do this with mini-qmail installed on
those servers or have to install the full version of qmail, or even at all
possible.
Thank you for any help.
Re: prepending a word in subject line [ In reply to ]
On Wednesday 19 Nov 2014 22:44:28 Vahid Moghaddasi wrote:
> Hi,
> We have a requirement to prepend a word "secure" to every e-mail that is
> going out of a few servers.
> I am wondering if there is a way to do this with mini-qmail installed on
> those servers or have to install the full version of qmail, or even at all
> possible.
> Thank you for any help.

Well it's certainly possible (plenty of mailing lists do this, as does
SpamAssassin), but it's not out-of-the-box functionality provided by qmail /
mini-qmail. Instead, you'd need to modify qmail to alter the message; you
mention that you want to do this for outgoing emails, so qmail-remote.c is
probably the most appropriate place to start - either modify this, or provide
a wrapper to it. Modifying it is likely to be easier (esp. consider blast()
function). I'd be happy to quote you for that if desired.

There are various 'error' type scenarios though: This could break message
signing - GPG / DKIM, also the risk of adding 'secure' repeatedly if a message
Subject: is seen repeatedly (e.g. replying to a message that already has the
'secure' prepend). So consider carefully based on your specific use case.

Best regards,

Andrew.
--
====================================================================
* Custom email solutions * Systems Administration * Networking
http://www.acrconsulting.co.uk/email/qmail.html
====================================================================
Re: prepending a word in subject line [ In reply to ]
Geachte heer, mevrouw,



Hartelijk dank voor uw e-mail. Binnen 2 werkdagen ontvangt u van ons een reactie op uw vraag of klacht. Wist u dat u bij de ING ook veel zaken online kunt regelen? Bijvoorbeeld het beheren van uw geldzaken, het aanvragen van nieuwe producten, tot aan het wijzigen van uw gegevens. Meer weten? Klik hier: http://www.ing.nl/particulier/internetbankieren/index.aspx"]www.ing.nl/particulier/internetbankieren/index.aspx



Dit is een automatische ontvangstbevestiging.



Met vriendelijke groet,



ING Bank N.V.



-----------------------------------------------------------------
ATTENTION:
The information in this electronic mail message is private and
confidential, and only intended for the addressee. Should you
receive this message by mistake, you are hereby notified that
any disclosure, reproduction, distribution or use of this
message is strictly prohibited. Please inform the sender by
reply transmission and delete the message without copying or
opening it.

Messages and attachments are scanned for all viruses known.
If this message contains password-protected attachments, the
files have NOT been scanned for viruses by the ING mail domain.
Always scan attachments before opening them.
-----------------------------------------------------------------
Re: prepending a word in subject line [ In reply to ]
There is no qmail-remote in mini-qmail. I tried writing a wrapper for
qmail-inject but can't capture all the environment variables such as
'Subject:' to modify it before sending to qmail-queue which in mini-qmail
is qmail-qmqpc.



On Thu, Nov 20, 2014 at 6:11 AM, Andrew Richards <
ar-djblists@acrconsulting.co.uk> wrote:

> On Wednesday 19 Nov 2014 22:44:28 Vahid Moghaddasi wrote:
> > Hi,
> > We have a requirement to prepend a word "secure" to every e-mail that is
> > going out of a few servers.
> > I am wondering if there is a way to do this with mini-qmail installed on
> > those servers or have to install the full version of qmail, or even at
> all
> > possible.
> > Thank you for any help.
>
> Well it's certainly possible (plenty of mailing lists do this, as does
> SpamAssassin), but it's not out-of-the-box functionality provided by qmail
> /
> mini-qmail. Instead, you'd need to modify qmail to alter the message; you
> mention that you want to do this for outgoing emails, so qmail-remote.c is
> probably the most appropriate place to start - either modify this, or
> provide
> a wrapper to it. Modifying it is likely to be easier (esp. consider blast()
> function). I'd be happy to quote you for that if desired.
>
> There are various 'error' type scenarios though: This could break message
> signing - GPG / DKIM, also the risk of adding 'secure' repeatedly if a
> message
> Subject: is seen repeatedly (e.g. replying to a message that already has
> the
> 'secure' prepend). So consider carefully based on your specific use case.
>
> Best regards,
>
> Andrew.
> --
> ====================================================================
> * Custom email solutions * Systems Administration * Networking
> http://www.acrconsulting.co.uk/email/qmail.html
> ====================================================================
>



--
This e-mail address is not monitored so please do not send me anything
important here. Thanks.
Re: prepending a word in subject line [ In reply to ]
> On Thu, Nov 20, 2014 at 6:11 AM, Andrew Richards
> <ar-djblists@acrconsulting.co.uk> wrote:
> > On Wednesday 19 Nov 2014 22:44:28 Vahid Moghaddasi wrote:
> > > Hi,
> > > We have a requirement to prepend a word "secure" to every e-mail that is
> > > going out of a few servers.
> > > I am wondering if there is a way to do this with mini-qmail installed on
> > > those servers or have to install the full version of qmail, or even at
> > > all possible.
> > > Thank you for any help.
> >
> > Well it's certainly possible (plenty of mailing lists do this, as does
> > SpamAssassin), but it's not out-of-the-box functionality provided by
> > qmail / mini-qmail. Instead, you'd need to modify qmail to alter
> > the message; you mention that you want to do this for outgoing
> > emails, so qmail-remote.c is probably the most appropriate place to
> > start - either modify this, or provide a wrapper to it. Modifying
> > it is likely to be easier (esp. consider blast() function). I'd be
> > happy to quote you for that if desired.
> >
> > There are various 'error' type scenarios though: This could break message
> > signing - GPG / DKIM, also the risk of adding 'secure' repeatedly if a
> > message Subject: is seen repeatedly (e.g. replying to a message
> > that already has the 'secure' prepend). So consider carefully based
> > on your specific use case.

On Thursday 20 Nov 2014 10:40:08 Vahid Moghaddasi wrote:
> There is no qmail-remote in mini-qmail. I tried writing a wrapper for
> qmail-inject but can't capture all the environment variables such as
> 'Subject:' to modify it before sending to qmail-queue which in mini-qmail
> is qmail-qmqpc.

mini-qmail looks like a difficult approach to this particular problem, although
that may just reflect an unfamiliarity with working with its source code on my
part. In your original message you inferred that 'full' qmail was an option
for you; I suggest that may be the easier approach.

Best regards,

Andrew.
--
====================================================================
* Custom email solutions * Systems Administration * Networking
http://www.acrconsulting.co.uk/email/qmail.html
====================================================================
Re: prepending a word in subject line [ In reply to ]
Geachte heer, mevrouw,



Hartelijk dank voor uw e-mail. Binnen 2 werkdagen ontvangt u van ons een reactie op uw vraag of klacht. Wist u dat u bij de ING ook veel zaken online kunt regelen? Bijvoorbeeld het beheren van uw geldzaken, het aanvragen van nieuwe producten, tot aan het wijzigen van uw gegevens. Meer weten? Klik hier: http://www.ing.nl/particulier/internetbankieren/index.aspx"]www.ing.nl/particulier/internetbankieren/index.aspx



Dit is een automatische ontvangstbevestiging.



Met vriendelijke groet,



ING Bank N.V.



-----------------------------------------------------------------
ATTENTION:
The information in this electronic mail message is private and
confidential, and only intended for the addressee. Should you
receive this message by mistake, you are hereby notified that
any disclosure, reproduction, distribution or use of this
message is strictly prohibited. Please inform the sender by
reply transmission and delete the message without copying or
opening it.

Messages and attachments are scanned for all viruses known.
If this message contains password-protected attachments, the
files have NOT been scanned for viruses by the ING mail domain.
Always scan attachments before opening them.
-----------------------------------------------------------------
Re: prepending a word in subject line [ In reply to ]
Yes, I can install the full qmail on all of the 12 servers but was
wondering if anyone can suggest a way to modify the subject before
injecting into the queue. How would I do it in the full version of qmail?
Do I need a wrapper for qmail-remote or qmail-queue?
Thanks for any help.

On Thu, Nov 20, 2014 at 5:30 PM, Andrew Richards <
ar-djblists@acrconsulting.co.uk> wrote:

> > On Thu, Nov 20, 2014 at 6:11 AM, Andrew Richards
>
> > <ar-djblists@acrconsulting.co.uk> wrote:
>
> > > On Wednesday 19 Nov 2014 22:44:28 Vahid Moghaddasi wrote:
>
> > > > Hi,
>
> > > > We have a requirement to prepend a word "secure" to every e-mail
> that is
>
> > > > going out of a few servers.
>
> > > > I am wondering if there is a way to do this with mini-qmail
> installed on
>
> > > > those servers or have to install the full version of qmail, or even
> at
>
> > > > all possible.
>
> > > > Thank you for any help.
>
> > >
>
> > > Well it's certainly possible (plenty of mailing lists do this, as does
>
> > > SpamAssassin), but it's not out-of-the-box functionality provided by
>
> > > qmail / mini-qmail. Instead, you'd need to modify qmail to alter
>
> > > the message; you mention that you want to do this for outgoing
>
> > > emails, so qmail-remote.c is probably the most appropriate place to
>
> > > start - either modify this, or provide a wrapper to it. Modifying
>
> > > it is likely to be easier (esp. consider blast() function). I'd be
>
> > > happy to quote you for that if desired.
>
> > >
>
> > > There are various 'error' type scenarios though: This could break
> message
>
> > > signing - GPG / DKIM, also the risk of adding 'secure' repeatedly if a
>
> > > message Subject: is seen repeatedly (e.g. replying to a message
>
> > > that already has the 'secure' prepend). So consider carefully based
>
> > > on your specific use case.
>
>
>
> On Thursday 20 Nov 2014 10:40:08 Vahid Moghaddasi wrote:
>
> > There is no qmail-remote in mini-qmail. I tried writing a wrapper for
>
> > qmail-inject but can't capture all the environment variables such as
>
> > 'Subject:' to modify it before sending to qmail-queue which in mini-qmail
>
> > is qmail-qmqpc.
>
>
>
> mini-qmail looks like a difficult approach to this particular problem,
> although that may just reflect an unfamiliarity with working with its
> source code on my part. In your original message you inferred that 'full'
> qmail was an option for you; I suggest that may be the easier approach.
>
>
>
> Best regards,
>
>
>
> Andrew.
>
> --
>
> ====================================================================
>
> * Custom email solutions * Systems Administration * Networking
>
> http://www.acrconsulting.co.uk/email/qmail.html
>
> ====================================================================
>



--
This e-mail address is not monitored so please do not send me anything
important here. Thanks.
Re: prepending a word in subject line [ In reply to ]
Hello Vahid,

Friday, November 21, 2014, 6:45:47 PM, you wrote:

VM> if anyone can suggest a way to modify the subject before injecting into the queue.

http://untroubled.org/qmail-qfilter/

--
Best regards,
Niamh mailto:niamh@fullbore.co.uk
Re: prepending a word in subject line [ In reply to ]
On Fri, Nov 21, 2014 at 2:12 PM, Niamh Holding <niamh@fullbore.co.uk> wrote:

> Hello Vahid,
>
> Friday, November 21, 2014, 6:45:47 PM, you wrote:
>
> VM> if anyone can suggest a way to modify the subject before injecting
> into the queue.
>
> http://untroubled.org/qmail-qfilter/
>
> --
> Best regards,
> Niamh mailto:niamh@fullbore.co.uk


Thanks. I guess there is no easy way doing that with a simple wrapper then.
I was able to modify bin/mailsubj to do what I need but applications do not
call that script to send mail out.