I think badmailfrom would be the simplest solution for you. badmailfrom uses regex's to match from addresses. So, given your description (using patterns, which are different from regexes), you would need to add the following to your /var/qmail/control/badmailfrom file:
^asd...@.*\.hinet\.net$

If that doesn't match properly, let us know and we'll go into details about the regex string.

--
-Eric 'shubes'

Amit Dalia wrote:
Thanks Dhaval,

Actually my server is QMT box is used as a filtering and relaying server for my client exchange server. Now problem is their exchange server is compromised and its relaying 1000s of spam mails to my QMT server. I don't have access to exchange server but client wants my QMT server to block all incoming as well as outgoing spam mails.Right now I have 5000 spam mails in my queue because of which delivery to genuine mail is getting delayed. How can I prevent and optimize my server.
All from address is someting like mentioned below:

asd...@*.hinet.net

where * is any subdomain name.

So how do I restrict *.hinet.net to enter my server.

Regards,

Amit

At Tuesday, 21-09-2010 on 11:39 dhaval thakar wrote:



    On Tue, Sep 21, 2010 at 10:37 AM, Amit Dalia <a...@ikf.co.in
    <mailto:a...@ikf.co.in>> wrote:

        Hi,

        Is there any way to reject the mail if anywhere in the headers
        there is a specific domain. I want to reject the mail for
        incoming as well as for outgoing to that domain. I don't care if
        the mail is coming from authenticated user account.

        Amit



    for incoming you can try
    qmail/control/badmailfrom
-- Regards
    Dhaval Thakar
    http://www.linuxreaders.com/
    http://www.ipguide.info/



---------------------------------------------------------------------------------
Qmailtoaster is sponsored by Vickers Consulting Group 
(www.vickersconsulting.com)
   Vickers Consulting Group offers Qmailtoaster support and installations.
     If you need professional help with your setup, contact them today!
---------------------------------------------------------------------------------
    Please visit qmailtoaster.com for the latest news, updates, and packages.
To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com
    For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com


Reply via email to