
vadud3 at gmail
Dec 3, 2008, 1:17 PM
Post #6 of 8
(19 views)
Permalink
|
|
Re: how to process an email based on domain name
[In reply to]
|
|
On Mon, Jul 7, 2008 at 1: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 I wrote this if [[ $(< /etc/domainlist) = *${SENDER##*@}* ]] then exit 0 else qmail-autoresponder -c -n 2 -t 60 /var/qmail/alias/AUTORESPONDS.DNS exit 99 fi It basically receives and checks domain name of the sender. If it matches to the list /etc/domainlist then exit with with 0 or it notifies the customer with necessary instructions of any changes and then exit out with 99. Now it works just fine. However, it won't scale well if the domainlist grows to say few thousands. Looking for suggestion in how to convert it to CDB and then lookup against that OR some rblsmtpd trick. Thanks > >> 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----- > -- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
|