Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 25th May 2007, 01:17
hnodine hnodine is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Posts: 10
Thanks: 1
Thanked 1 Time in 1 Post
Default mysql whitelisting for 'Virtual Users And Domains With Postfix, Courier And MySQL'?

Hello-
I followed the 'Virtual Users And Domains With Postfix, Courier And MySQL (Fedora Core 5)' howto, and added maildrop mail filtering to move messages marked as spam to each user's Junk folder. Now I would like to whitelist senders that I have placed in a mysql database. There are some guides on the web, but since the howto does not create teh same tables as those in other guides I am unsure how to proceed. Any help would be appreciated.

Thank you in advance for your time.
Reply With Quote
Sponsored Links
  #2  
Old 25th May 2007, 19:12
acoghlan acoghlan is offline
Junior Member
 
Join Date: Jan 2007
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by hnodine
I followed the 'Virtual Users And Domains With Postfix, Courier And MySQL (Fedora Core 5)' howto, and added maildrop mail filtering to move messages marked as spam to each user's Junk folder.
i have used the same guide on my FC5 box, and have been trying to do get Maildrop filtering out the spam for some time now, but cant seem to get it working (although the mail server itself is working great, and identifying spam quite well).

Could you possibly post the FC5 maildrop instructions in this forum? The other instructions listed on this site are for Debian, and I cant get it all working on FC5.

In exchange - I have nearly got the whitelist working - with all entries stored in MySQL - when I have it sorted, I will post here.

Cheers

Andrew
Reply With Quote
  #3  
Old 25th May 2007, 19:42
hnodine hnodine is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Posts: 10
Thanks: 1
Thanked 1 Time in 1 Post
Default excellent

A simple way to filter mail marked as spam to each virtual users mailbox is to edit /etc/postfix/master.cf, where you see the maildrop line, make sure it reads
Code:
maildrop  unix  -       n       n       -       -       pipe
 flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${user}@${nexthop} ${extension} ${recipient} ${user} ${nexthop} ${sender}
Save the changes, then exit.
Next, edit /etc/postfix/main.cf and add a line at the bottom of the file that says
Code:
maildrop_destination_recipient_limit=1
Save and exit.
Finally, create /home/vmail/.mailfilter . In that file paste
Code:
USER="$3"
HOST="$4"
if ( /^X-Spam-Status: Yes/)
{
   to "/home/vmail/$HOST/$USER/.Junk"
}
This will place all of the mail with the X-Spam-Status: Yes header (which is inserted by Spammassin) into each user's Inbox.Junk directory. Note that you could make a much more complex set of filters for each user, but this really seems to be the best setup I have found. Let me know if you have problems with this. I thank you in advance for your efforts on my problem.
Reply With Quote
  #4  
Old 25th May 2007, 21:57
acoghlan acoghlan is offline
Junior Member
 
Join Date: Jan 2007
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
 
Default

cool - thanks for that.

I take it that this setup moves junk mail for ALL users? I have 2 questions;
1. where would you put the .mailfilter file to make it user based
2. is there any way the maildrop filter can be stored in MySQL rather than on the file system?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Users And Domains With Postfix, Courier And MySQL Secondary MX acoghlan HOWTO-Related Questions 1 8th March 2008 05:02
Upgrade question for "Virtual Users And Domains With Postfix, Courier And MySQL" emresumengen HOWTO-Related Questions 3 1st December 2006 15:33
Virtual Users And Domains With Postfix, Courier And MySQL [+ procmail ?] immobilia HOWTO-Related Questions 5 29th June 2006 23:20
Virtual Users And Domains With Postfix, Courier And MySQL - "apt-get" and Courier burritonator HOWTO-Related Questions 3 15th March 2006 20:11
Problem with Virtual Users And Domains With Postfix, Courier And MySQL Howto fenix Server Operation 4 11th March 2006 02:53


All times are GMT +2. The time now is 09:48.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.