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 23rd January 2008, 15:58
c0mputernick c0mputernick is offline
Junior Member
 
Join Date: Jan 2008
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Default adding Server side mail filters to Virtual Users And Domains With Postfix 7.10

Has anyone added server side mail filters to their "Virtual Users And Domains With Postfix, Courier And MySQL Ubuntu 7.10" setup?

I would like to, but am unsure what to change in postfix/maildrop to be able to add this functionality. Can anyone assist me with this? Ive found some related gentoo material creating the file: /home/vmail/.mailfilter with this inside:
"
xfilter "/usr/bin/spamc"
# Check for user defined filter file
exception {
include "$HOME/mailfilters/$LOGNAME"
}
"
and then creating this file that holds the filters for this particular user:
/home/vmail/mailfilters/virtuser@somedomain.com

But i need to know how to change postfix to hand the mail off to maildrop instead of its normal delivery.

Any help would be much appreciated.
Reply With Quote
Sponsored Links
  #2  
Old 24th January 2008, 14:59
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

Why don't you use amavisd as shown in the tutorial?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 24th January 2008, 18:37
c0mputernick c0mputernick is offline
Junior Member
 
Join Date: Jan 2008
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Default

i am. Im not talking about spam/virus filtering. Im talking about sorting mail, or server side mail filters. Where i can put mail as it comes into the server into its respective folder, normally via maildrop.
Unless i missed something (and ive done the setup at least 10 times by now) i didnt see an option (or even know that amavisd does mail sorting) to do mail sorting.
If i missed something please point it out, i have read and reread the entire setup from start to finish several times and must be missing what your referring to.

Thanks for the help.
Reply With Quote
  #4  
Old 25th January 2008, 17:02
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

These links might help you: http://www.howtoforge.com/postfix_mailfilter
http://www.howtoforge.com/autorespon..._postfix_users
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 25th January 2008, 17:11
c0mputernick c0mputernick is offline
Junior Member
 
Join Date: Jan 2008
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Default

Thats exactly what i was looking for! Thanks for the links!
Reply With Quote
  #6  
Old 25th January 2008, 17:26
c0mputernick c0mputernick is offline
Junior Member
 
Join Date: Jan 2008
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Default

I wonder if there is a way to link or add links to the end of a particular how-to so other users can find them easier?
Like "Add-ons for Postfix Guide 7.10" or something similar.
Reply With Quote
  #7  
Old 26th January 2008, 19:06
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

I'm already adding links to related tutorials at the end of the tutorials. Do you mean that users should be able to add links themselves?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #8  
Old 6th February 2008, 22:40
c0mputernick c0mputernick is offline
Junior Member
 
Join Date: Jan 2008
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
 
Default

Quote:
Originally Posted by falko
I followed all the instructions perfectly, double checked them, but im getting an error in my syslog and mail is getting bounced before i even send a test for the filter:

postfix/pipe[25281]: 9F6B874D750: to=<nick@mydomain.com>, relay=maildrop, delay=20738, delays=20738/0.03/0/0.04, dsn=5.1.1, status=bounced (user unknown. Command output: Invalid user specified. )

The user is correct, it should be vmail as in the guide with uid/gid of 5000

I think it has something to do with the line changed in master.cf for maildrop:

maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/maildrop/bin/maildrop -d ${user}@${nexthop} ${extension} ${recipient} ${user} ${nexthop} ${sender}

I am using the falko guide for ubuntu 7.10 and i did have to change the path names in the filter part from:
/u0/vmail/.mailfilter/user@domain.com
to:
/home/vmail/.mailfilter/nick@mydomain.com
because that is where the mail and filters are held.

I start getting those errors as soon as i add this section:
VALUES ( 'mydomain.com', 'maildrop' ); in the transport table.

Ive checked for type-o's and their dont seem to be any, which is why i think its something to do with the line in master.cf (mainly because i dont understand all the ${} stuff, it could be right, but i wouldnt know it. Do you have to change it at all for ubuntu 7.10?

I hope im not the only one that has ran into this and im crossing my fingers its a simple fix, it seems im almost there (if the filters actually work after this)


Also, you said in the how-to that you could filter mail on a per users basis instead of the entire domain. "(important to note you can do this on a purely per email basis ie, all emails but users@example.com go to the normal virtual transport and by adding in the email address and a maildrop transport)"
How is this done? instead of adding "mydomain.com, maildrop" would you add "user@mydomain.com, maildrop" instead in the transport table?

Thanks for any and all help.
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 Radukn HOWTO-Related Questions 14 12th October 2008 17:10
Virtual Users And Domains With Postfix, Courier And MySQL Secondary MX acoghlan HOWTO-Related Questions 1 8th March 2008 05:02
fetchmail Virtual Users And Domains With Postfix, Courier And MySQL (Ubuntu 7.10) c0mputernick HOWTO-Related Questions 4 31st January 2008 15:28
Upgrade question for "Virtual Users And Domains With Postfix, Courier And MySQL" emresumengen HOWTO-Related Questions 3 1st December 2006 15:33
Another Problem: Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP bluegrass Installation/Configuration 24 8th March 2006 01:41


All times are GMT +2. The time now is 11:00.


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