www.question-defense.com | Engage: Visit :: Login :: Register
Translate to English Übersetzen Sie zum Deutsch/German Переведите к русскому/Russian Μεταφράστε στα ελληνικά/Greek Vertaal aan het Nederlands/Dutch ترجمة الى العربية/Arabic 中文翻译/Chinese Traditional 中文翻译/Chinese Simplified 한국어에게 번역하십시오/Korean 日本語に翻訳しなさい /Japanese Traduza ao Português/Portuguese Traduca ad Italiano/Italian Traduisez au Français/French Traduzca al Español/Spanish
1

I installed ISPConfig awhile back on a web hosting server that at one point also hosted email accounts. I recently moved all of the email to a different server and wanted to cut down on CPU and memory usage so I needed to disable amavisd, clamd, courier-imap, and courier-authlib. These services provided a way to receive email via POP3 and IMAP as well as content filtering and virus scanning for all of that email. So after shutting all of the services down I needed to remove the reference to the local content filter from Postfix because if amavis is shut down and mail is sent from a web application to the localhost then the connection will be refused and Postfix will not send the email. Below I describe the Postfix configuration lines to comment out as well as a way to reload all of the queued email into the Postfix queue so it could be sent again.

Disable Postfix Amavis Configuration

First you will need to comment out the content_filter line which will look similar to the below. In my case it is telling Postfix to send local mail through port 10024 on the localhost or 127.0.0.1. The Postfix configuration file is named main.cf and located in the /etc/postfix directory.

Active Postfix Amavis Configuration Using content_filter:

content_filter = amavis:[127.0.0.1]:10024

Now the below shows the same configuration line updated with a comment in front of it so it is not processed.

Disabled Postfix Amavis Configuration Using content_filter:

#content_filter = amavis:[127.0.0.1]:10024

You may also have reference to amavis in master.cf also located in the /etc/postfix directory. If you do locate it, open in your favorite editor such as vi, and comment it out as shown below.

Comment Out Amavis Reference In The Postfix Configuration File master.cf:

#amavis unix - - - - 2 smtp
#        -o smtp_data_done_timeout=1200
#        -o smtp_send_xforward_command=yes

Restart Postfix To Enable Configuration Changes:

Now use the syntax below to load the new configuration files. This will disable content_filter and not require all email to be filtered when it is sent from the local server.

Reload The Postfix Server Using The Below Syntax:

[root@server postfix]# postfix reload
postfix/postfix-script: refreshing the Postfix mail system
You have new mail in /var/spool/mail/root

Requeue Postgix Email Without Content Filter:

After you have removed the content_filter configuration you may need to put emails back into the queue. Regardless after the content_filter setting has been modified you will want to run the below queue so no emails are stuck in the queue forever. Issue the below command to put emails back into the queue to be sent. For instance in my case I shut down amavis before removing the content_filter configuration line which caused numerous emails to be stuck in the Postfix queue.

Syntax To Requeue Postfix Email Messages:

[root@server postfix]# postsuper -r ALL
postsuper: Requeued: 42 messages

If you watch the maillog, located in the /var/log directory, when running the above command you will see the email being sent from the server if there are any emails that were requeued. All outgoing mail will no longer be filtered.


Postfix

Kyle Dent D.. O’Reilly Media 2003, Paperback, 288 pages, $24.77

4.0


The Book of Postfix

Ralf Hildebrandt. No Starch Press 2005, Paperback, 496 pages, $124.73

4.5

DeliciousStumbleUponDiggTwitterMixxTechnoratiFacebookNews VineLinkedInYahoo! Bookmarks
Related posts:
  1. Clear Out Postfix Queue, Analyze Postfix Email Queue Earlier today we had a minor issue on a development...
  2. Postfix Logrotate Script For Gentoo Linux Working on a friends server earlier this morning I noticed...
  3. Remove Deleted IMAP Email Messages From View in Outlook 2007 Recently I have combined numerous email accounts into one Google...
  4. Setup Gmail Aliases To Easily Filter and Organize Incoming Email I discovered something really cool tonight to help organize my...
  5. Extra SPAM Protection For ISPConfig Running Postfix This article was written to create an easy step to...

Tags: , , , , , , , , , , , , , , , , , ,
2 Responses to “Remove Amavis Content Filter From Postfix Configuration, Requeue All Postfix Email Messages”
  1. Amin Abbaspour says:

    Thanks. This one helped me.

    [Reply]

    alex Reply:

    Hello Amin Abbaspour,

    No problem. Thanks for taking the time to leave feedback. We hope you find other articles on the site helpful as well.

    Thanks.
    alex

    [Reply]

  2.  
Leave a Reply