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 21st April 2006, 17:10
oversight oversight is offline
Junior Member
 
Join Date: Apr 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to oversight
Default Howto let procmail move spam to folder?

I followed the briljant tutorial from falko and got my system up and running in notime. Thanks falko.

However, I want my spam in the folder spam. or Junkmail or..... any folder I like.
How do I implement this by using procmail?

thanks
Reply With Quote
Sponsored Links
  #2  
Old 21st April 2006, 17:56
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Have a look here: http://www.cs.columbia.edu/~crf/howt...ail-howto.html
__________________
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 21st April 2006, 20:45
oversight oversight is offline
Junior Member
 
Join Date: Apr 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to oversight
Default

hi falko,

I followed your howto with postfix, virtual users, domains, clamav spamassassin etc.

can youtell me howto do this with the this setup? http://www.howtoforge.com/virtual_po..._quota_courier
Reply With Quote
  #4  
Old 22nd April 2006, 16:20
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

I haven't tested, but you can try to do this:

Code:
postconf -e 'mailbox_command = /usr/bin/procmail'
/etc/init.d/postfix restart
Then create a global procmail recip /etc/procmailrc.
__________________
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 22nd April 2006, 16:24
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,146
Thanks: 4
Thanked 55 Times in 51 Posts
Default

does a local .procmailrc folder in the email users "Home Mail" folder always work or does that need to be enabled?
Reply With Quote
  #6  
Old 22nd April 2006, 16:49
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

It should always work with system users, however overdight is using virtual users, that's why I suggest a global procmailrc.
__________________
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
  #7  
Old 23rd April 2006, 14:58
todgerme todgerme is offline
Member
 
Join Date: Dec 2005
Location: Belfast, Northern Ireland
Posts: 54
Thanks: 0
Thanked 1 Time in 1 Post
Default

i suspect the way around this problem is to pass the particular domain through a different MDA. I'm not sure if Postfix even looks at .forward files when using Virtual Users so I'm not convinced you can call Procmail with a .forward file.
I have repeatedly tried to get .forward files working but no look yet with Virtual users:
A quick show of the Postfix defaults shows:
# postconf -d | grep .forward
forward_path = $home/.forward${recipient_delimiter}${extension}, $home/.forward
I have tried specifying all sorts in the forward but it just seems to ignore whatever I do.

Also I have read in a few places that the Procmail command only works for local users and not Virtual Users so I'n not convinced a Global procmail script will work although never say never.

So two ways forward I can see:

The Postfix conf shows virtual_transport = virtual, we could change this maildrop or procmail, however that will mean all mail will be delivered using these agents and maildrop for example can't make its own directories the way the Postfix virtual agent does so it's probably best to leave this as is.

So like the way you can pass mail off to Yaa to get an autoresponders through the transport layer, I would suggest the same but passing it off to Maildrop/Procmail. Obviously a Procmail entry would need to be made in the master.cf file but there should already be an entry for maildrop. In addition you'll need to create a maildroprc file in /etc to reflect users directories and tell it to check for maildroprc files in the various home directories but I don't think that should be a big issue. One further idea would be to try and enable Mysql Virtual users in the maildrop source for Debian, a simply configure switch can have Maildrop looking at the database. From there, the exisiting guide will need to be modded so that it gets its maildir information from the database and not from concats of the email address on top of the vmail home directory

master.cf should look like this
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr /bin/maildrop -d ${recipient}

then you should have something like

domain.com -> maildrop in your transport MySQL tables.

Ignoring most of this punters guide:

http://www.marlow.dk/site.php/tech/postfix

look at the maildrop bit, he includes a maildrop script that would be perfect for creating the directories with maildirmake, and allowing for per domain maildrop scripts.

So a little work required but not impossible! Hope it helps
Reply With Quote
  #8  
Old 1st May 2006, 01:53
todgerme todgerme is offline
Member
 
Join Date: Dec 2005
Location: Belfast, Northern Ireland
Posts: 54
Thanks: 0
Thanked 1 Time in 1 Post
Default

i have prepared a guide for the very thing so check it out. it was done in a real rush but i do have it working so if you run into any problems, give me a shout. next thing to do is to try and have all the filtering MySQL driven, so no need for flat files at all!!!

Last edited by todgerme; 1st May 2006 at 01:55.
Reply With Quote
  #9  
Old 1st May 2006, 15:28
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Thumbs up

Thanks!
http://www.howtoforge.com/postfix_mailfilter

(I you find some time, can you try to format it as described here? http://www.howtoforge.com/howto_formatting_guide )
__________________
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
  #10  
Old 1st May 2006, 15:39
todgerme todgerme is offline
Member
 
Join Date: Dec 2005
Location: Belfast, Northern Ireland
Posts: 54
Thanks: 0
Thanked 1 Time in 1 Post
 
Default

yeah already have plans to smarten it up, it reads awful, done in a big rush! I'm gonna add one for the Yaa autoresponder too and that should stop two of the biggest questions on this forum!
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
How to kill spam when spamassassin marks it spam kpimichael Suggest HOWTO 15 6th August 2007 16:44
all mails sent end up in yahoo/gmail SPAM folder cpcpy General 15 15th March 2006 16:53
plenty of procmail/trashscan processes ZyanKLee Installation/Configuration 10 27th December 2005 20:09
procmail <defunct> ZyanKLee Installation/Configuration 1 19th December 2005 00:58


All times are GMT +2. The time now is 21:06.


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