Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Qmail: users

how to process an email based on domain name

 

 

Qmail users RSS feed   Index | Next | Previous | View Threaded


vadud3 at gmail

Jul 5, 2008, 9:18 AM

Post #1 of 5 (401 views)
Permalink
how to process an email based on domain name

Hi

I am looking for a way to do the following.

Pseudo code:

if domain name of the sender is domain.com then process it through the
following block of lines and exit

|822field x-spam-status | egrep -iw yes >/dev/null && exit 100 || exit 0
|822field from | egrep -i "MAILER-DAEMON|POSTMASTER|ABUSE" >/dev/null &&
exit 100 || exit 0
|822field to | egrep -i "MAILER-DAEMON|POSTMASTER|ABUSE" >/dev/null &&
exit 100 || exit 0
|822field cc | egrep -i "MAILER-DAEMON|POSTMASTER|ABUSE" >/dev/null &&
exit 100 || exit 0
|822field return-path | egrep -i "MAILER-DAEMON|POSTMASTER|ABUSE"
>/dev/null && exit 100 || exit 0
|/opt/rt3/bin/rt-mailgate --queue help --action correspond --url
https://help.domain.net 2>/dev/null || exit 111

otherwise reply to the sender with the following autoresponder

|/var/qmail/local/bin/autorespond 600 10 autoresponder/sorry
autoresponder/log


So we are going to accept RT ticket request *only* from `domain.com'. Any
request
that comes from any other domains will get a auto respond to send their
request to some other address


--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu


jms1 at jms1

Jul 7, 2008, 11:44 AM

Post #2 of 5 (360 views)
Permalink
Re: how to process an email based on domain name [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2008-07-05, at 1218, Asif Iqbal wrote:
>
> I am looking for a way to do the following.
>
> ...

write a script which does that, and make the appropriate .qmail-* file
point to that script.

> So we are going to accept RT ticket request *only* from
> `domain.com'. Any request that comes from any other domains will get
> a auto respond to send their request to some other address

i'm sure any number of people, myself included, would be able to write
you a simple script like this, in exchange for an appropriate fee.

otherwise, the information you need in order to build such a script
can be found in qmail's documentation, along with any beginner-level
book on shell or perl scripting.

- --------------------------------------------------------
| John M. Simpson -- KG4ZOW -- Programmer At Large |
| http://www.jms1.net/ <jms1[at]jms1.net> |
- --------------------------------------------------------
| Hope for America -- http://www.ronpaul2008.com/ |
- --------------------------------------------------------





-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkhyY/4ACgkQEB9RczMG/PujTQCg9XXWpUvA3zdQRQt4Tl6U4rPc
eBgAoOU2YSQw6Ch+vdaR8fW7Wwv7sIkN
=awX5
-----END PGP SIGNATURE-----


vadud3 at gmail

Jul 8, 2008, 10:27 AM

Post #3 of 5 (347 views)
Permalink
Re: how to process an email based on domain name [In reply to]

On Mon, Jul 7, 2008 at 2:44 PM, John Simpson <jms1[at]jms1.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 2008-07-05, at 1218, Asif Iqbal wrote:
>
>>
>> I am looking for a way to do the following.
>>
>> ...
>>
>
> write a script which does that, and make the appropriate .qmail-* file
> point to that script.
>
> So we are going to accept RT ticket request *only* from `domain.com'.
>> Any request that comes from any other domains will get a auto respond to
>> send their request to some other address
>>
>
> i'm sure any number of people, myself included, would be able to write you
> a simple script like this, in exchange for an appropriate fee.
>

Absolutely no doubt. You are right on money ;-)

Thanks for being soo helpful



>
> otherwise, the information you need in order to build such a script can be
> found in qmail's documentation, along with any beginner-level book on shell
> or perl scripting.


> - --------------------------------------------------------
> | John M. Simpson -- KG4ZOW -- Programmer At Large |
> | http://www.jms1.net/ <jms1[at]jms1.net> |
> - --------------------------------------------------------
> | Hope for America -- http://www.ronpaul2008.com/ |
> - --------------------------------------------------------
>
>
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.8 (Darwin)
>
> iEYEARECAAYFAkhyY/4ACgkQEB9RczMG/PujTQCg9XXWpUvA3zdQRQt4Tl6U4rPc
> eBgAoOU2YSQw6Ch+vdaR8fW7Wwv7sIkN
> =awX5
> -----END PGP SIGNATURE-----
>



--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu


vadud3 at gmail

Jul 9, 2008, 5:39 PM

Post #4 of 5 (336 views)
Permalink
Re: how to process an email based on domain name [In reply to]

On Sat, Jul 5, 2008 at 12:18 PM, Asif Iqbal <vadud3[at]gmail.com> wrote:

> Hi
>
> I am looking for a way to do the following.
>
> Pseudo code:
>
> if domain name of the sender is domain.com then process it through the
> following block of lines and exit
>
> |822field x-spam-status | egrep -iw yes >/dev/null && exit 100 || exit 0
> |822field from | egrep -i "MAILER-DAEMON|POSTMASTER|ABUSE" >/dev/null &&
> exit 100 || exit 0
> |822field to | egrep -i "MAILER-DAEMON|POSTMASTER|ABUSE" >/dev/null &&
> exit 100 || exit 0
> |822field cc | egrep -i "MAILER-DAEMON|POSTMASTER|ABUSE" >/dev/null &&
> exit 100 || exit 0
> |822field return-path | egrep -i "MAILER-DAEMON|POSTMASTER|ABUSE"
> >/dev/null && exit 100 || exit 0
> |/opt/rt3/bin/rt-mailgate --queue help --action correspond --url
> https://help.domain.net 2>/dev/null || exit 111
>
> otherwise reply to the sender with the following autoresponder
>
> |/var/qmail/local/bin/autorespond 600 10 autoresponder/sorry
> autoresponder/log
>
>
> So we are going to accept RT ticket request *only* from `domain.com'. Any
> request
> that comes from any other domains will get a auto respond to send their
> request to some other address
>
>
I am still looking for some other suggestions.

Thanks



>
> --
> Asif Iqbal
> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
>
>
>


--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu


search-web-for-address at pyropus

Jul 9, 2008, 9:40 PM

Post #5 of 5 (326 views)
Permalink
Re: how to process an email based on domain name [In reply to]

Asif Iqbal <vadud3[at]gmail.com> wrote:
> >
> I am still looking for some other suggestions.

Why? You already received the correct answer. If you think it won't work,
you need to explain why. Otherwise you're just wasting everyone's time here.

Charles
--
--------------------------------------------------------------------------
Charles Cazabon
GPL'ed software available at: http://pyropus.ca/software/
Read http://pyropus.ca/personal/writings/12-steps-to-qmail-list-bliss.html
--------------------------------------------------------------------------

Qmail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.