Page 1 of 1

procmail as forwarder???

Posted: Wed Apr 02, 2008 3:01 am
by stony007_de
hey!
got a problem with public folder. ther is no posibility to define rules. I have to configure some rules which forward some mails.

It is configured a bb with an mailaddress "info@domain.de".In this folder, all mails come in!

It isn´t possible, with scalix tools, to define a rule that this mails will automaticly forwarded.
For example, a mail with a specified text in the subject "ERROR: HP" , must forward to another mailaddress "error-hp@domain.de".

I got the tip, to realize it with procmail, but i have no expirience with it.
can anybody help?

Posted: Tue Jun 24, 2008 1:45 am
by stony007_de
i need help with procmail!!!

i checked google for config of procmail!
i add some command to the /etc/mail/linux.mc checked the sendmail.cf, and create a .procmail rule file, but it does not work.

hey scalix folk ! help me please...

Posted: Tue Jun 24, 2008 6:55 am
by Valerion
Procmail rules will only run for UNIX users that are locally delivered on the machine. Procmail rules cannot be used for Scalix users or addresses.

Public folders cannot have rules in Scalix, only mailboxes can.

You can have the mail forward to a procmail-controlled mailbox first, then redirect it back into Scalix if you want to use procmail.

Posted: Tue Jun 24, 2008 7:03 am
by stony007_de
ok!! that is the answer why my test did not work.

Is there not a possibility to filter messages with the new 11.4?
Can i not attach procmail at the point "IMPUT_MAIL_FILER" in the smtpd.cfg ??

Posted: Tue Jun 24, 2008 7:13 am
by Valerion
Procmail is not a milter, but a MDA (mail delivery agent). I may be wrong, but I think only milters can be attached there.

Posted: Tue Jun 24, 2008 7:17 am
by stony007_de
that would be the question!!!

if this work, the scalix-folk can configure rulesets for publicfolders.

Posted: Tue Jun 24, 2008 7:25 am
by Valerion
A quick Google search doesn't turn anything up, and I have never configured this myself (nor had the need to). So you will have to figure out if it's possible or not. Not sure if it will work, or if there's a milter available that can do similar rules processing.

Would be nice if you can post here if you find anything.

It may be possible to write your own milter for this as well.

Posted: Thu Jun 26, 2008 1:49 pm
by schmoe90
You could set up a request server script, or even a user account that forwards messages based on their subject.

Posted: Fri Jun 27, 2008 12:18 am
by stony007_de
Yes! I have resolved!
At first I create a "Forward" account. there were some configured "forward" the rules reviewed the subject, sender or the header of an incoming mail and forwards them.
The forwarding function creates an e-mail with the original e-mail as an attachment.
I need a redirection not a forwarding.


Code: Select all

[Public Folder]
  |
[ IN ]            <----- inboxbb@domain.de    <----  [USER] inbox@domain.de
   |--[ SPAM ]     <----- spambb@domain.de     <---filter --subject ***SPAM***
   |--[ HP ]       <----- hpbb@domain.de       <---filter --sender info@hp.com
   |--[ SCALIX ]   <----- sxbb@domain.de       <---filter --subject scalix



See in the codebox the example. If i create a user with the mailaddress inbox@domain.de which should redirect to the public folder "IN" with the configured address inboxfolder@domain.de. That works fine!! but if i create a second rule which is watching for the subject to redirect it to an other folder, the mail will be arrive twice times. In the example, if i set the rule to look at the subject for the string "***SPAM***" the mail will arrive in the SPAM but in the Inbox too.
So that was the error!!

I have found a solution. I edited the userfile 000003d and put my redirectrules in it. this works fine and does not need an third party software.

If i found some time, i will try to create a plugin for scalix which is able to create suche rules without manual touching the user rule file.