Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


I want to block email from specific sender using amavisd- new

share|improve this question

migrated from Apr 2 '10 at 3:13

This question came from our site for professional and enthusiast programmers.

closed as not a real question by mailq, Chris S, Ward, Iain, splattne Jan 14 '12 at 20:25

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

how to configure the amavis with postfix and how can do the feature of whilelist/blacklist???? – Hitesh Solanki Apr 1 '10 at 6:51

About configuring:

If you are not using Ubuntu/Debian just replace installation section commands (apt-get ...) with your distro package management commands or ignore it if you have everything already installed.

Note that if you want just block some specific sender, there are other ways. For example, header_checks filter for Postfix. Add this to /etc/postfix/

header_checks = regexp:/etc/postfix/header_checks

Then edit the file /etc/postfix/header_checks and add the line like this:

/^From: blocked@sender\.address/       REJECT

Read man header_checks and man regexp_table to get more ideas if needed.

If you still want to blacklist senders with Amavis, there are two ways: hard blacklisting (that is, complete blocking of certain senders) and adding Spamassassin score points for those senders.

For some reason, hard blacklisting works only via SQL lookups. If you want to use this approach and if you have Amavis set up to work with SQL lookups, find variable $sql_select_white_black_list in /etc/amavisd.conf and replace 'undef' with an appropriate database query. Setting up Amavis, database and database tables for this is far beyond the scope of a short answer like this. You can find tutorials on

To setup Spamassassin blacklisting, find variable @score_sender_maps in /etc/amavisd.conf. There are a variety of methods to let Amavis know what senders should be blacklisted: hash assigned to this variable, a separate file, SQL lookup. I don't want to describe all these details because /etc/amavisd.conf is very well commented. So all needed info and examples can be found in /etc/amavisd.conf right around the variables I mentioned above.

If your particular distro has amavisd.conf without comments (I've seen that once, but I don't remember what distro it was), download Amavis sources and find fully commented amavisd.conf inside the tarball.

Good luck!

share|improve this answer

Hey Try out this :

All The Best

share|improve this answer