Koozali.org: home of the SME Server

Enableing Procmail after install ??

Offline steve288

  • *
  • 336
  • +0/-0
Enableing Procmail after install ??
« on: March 05, 2009, 05:26:54 PM »
I have installed the I have installed the userpanel and the mailsorting program.

I have run..
db configuration setprop qmail FilterType procmail
and then
signal-event mailsorting-conf


My eventual goal is to set up global procmail settings.

However for the time being Im just setting up rules for myself to test it.

My set up is that I use the SME server to delegate e-mail processing to another system. I have set up a rule to catch subjects with abcdef as a test. When I look in my folder I can see a .procmailrc file with the rule set up fine. I have set the logs to verbose. However I dont think it is working.

When I look at procmail.logs there are none on the whole machine.

I also read the http://www.dungog.net/wiki/Smeserver-mailsorting wiki which suggests using

tail -50 /home/e-smith/files/users/MYNAME/mailfilter.log

but there are none there or anywhere else on the computer.

Im guessing that procmail is not a process so I cant search for the process ?? not sure. Its not there anyway ps -ef |egrep procmail

Where have I gone wrong.

Regards

By the way I found a post witht the same title but Im not sure it relates to me since it was over a year ago.

http://forums.contribs.org/index.php/topic,33964.0.html




Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Enableing Procmail after install ??
« Reply #1 on: March 05, 2009, 05:53:13 PM »
With such a signature be sure to ask questions... there seems to be only one in your whole post ;-)

Perhaps the /var/log/messages might give you some clues around the time of installation/running the mailsorting-conf event.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline steve288

  • *
  • 336
  • +0/-0
Re: Enableing Procmail after install ??
« Reply #2 on: March 05, 2009, 07:54:50 PM »
Well i guess, sigh I have seen so many responses that seem to be off topic that I was hoping to keep things on track. Perhaps people will take it negatively. I find that instead of people being more-polite on news groups which is what I think they should be since you cant see their face and can easily mis understand their intentions, they tend to be less-polite. As if I'm going to change the culture. I also sort of asume people will extrapolate the answers if it is not directly related to the question but helpfull and thus related. eg how to get something working. But a tag line of "Feel free to extrapolate answers if necessary to get things working" seems mmmmm a little too nerdy.

But I digress, Annnyway...

I have looked at the messages logs and indeed there seem to be messages about installing the software. I dont really see any warning messages. Acept there is one however and I dont know if it relates or not it is as follows.

Mar  4 12:25:14 mail esmith::event[13564]: Processing event: mailsorting-conf steve
Mar  4 12:25:14 mail esmith::event[13564]: Running event handler: /etc/e-smith/events/mailsorting-conf/S20mailsorting-update-user

[HERE IT IS]
Mar  4 12:25:14 mail esmith::event[13564]: Use of uninitialized value in string eq at /etc/e-smith/events/mailsorting-conf/S20mailsorting-update-user
line 44.

Mar  4 12:25:14 mail esmith::event[13564]: S20mailsorting-update-user=action|Event|mailsorting-conf|Action|S20mailsorting-update-user|Start|1236187514
 37000|End|1236187514 311036|Elapsed|0.274036

Note the "uninitialized value in string eq at "

When I look at the file line 44 it says :
if($user->prop('geekmode') eq "enabled"){

Here it is in context a little more:
------------------------------------
if (defined $userName)
{
    my $user = $accountsdb->get($userName);
    die
        "Account $userName is not a user account; update mailsorting failed.\n"
        unless ($user && $user->prop('type') eq "user");
    @users = ($user);
  if($user->prop('geekmode') eq "enabled"){
        print "User $userName in geek mode, do not update mailfilter and procmail rules.\n";
        exit;
    }
}
else
-----------------------------------
Now I dont know if this is all a red herring  and has nothing to do with my problem but it almost looks like something is not set up properly based on the message???
I know very little about perl (which Im asuming its writen in but it looks like its not getting a value from somewhere.)

Any advice how to resolve this problem or perhaps its some other issue that is not related to this.

um "Feel free to extrapolate answers if necessary to get things working"

Regards
Steve

Offline stephen noble

  • *
  • 607
  • +1/-0
    • Dungog
Re: Enableing Procmail after install ??
« Reply #3 on: March 05, 2009, 11:25:04 PM »
I'll answer your questions in the wiki

http://www.dungog.net/wiki/Smeserver-mailsorting#Testing

http://www.dungog.net/wiki/Smeserver-mailsorting#Create_a_global_rule
if you can expand on the methods you use I'll update this

Quote
Note the "uninitialized value in string eq at "

this is just log noise

Offline stephen noble

  • *
  • 607
  • +1/-0
    • Dungog
Re: Enableing Procmail after install ??
« Reply #4 on: March 06, 2009, 02:00:34 AM »

Quote
My set up is that I use the SME server to delegate e-mail processing to another system.


Here is your problem, mail is forwarded before you get to procmail
which is run from the users .qmail
sorry, I didn't see this sooner

Offline steve288

  • *
  • 336
  • +0/-0
Re: Enableing Procmail after install ??
« Reply #5 on: March 06, 2009, 02:33:11 PM »
Thanks SNOBLE,

I guess what your saying is that in my situation you cannot use procmail.

I use to use procmail about 5 years ago a lot and have forgoten almost everything I know about it. However, Im not sure if anyone can answer this or not, but why couldnt it be designed to work with procmail. I mean spamassasin works for us in the delegated state. I guess before it is forwarded, I would think (Im sure Im showing my ignorance now) that if spamassassin  can work well in our environment then procmail  could be set up in a similar way.
Sorry if Im asking a dumb question.

Regards

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Enableing Procmail after install ??
« Reply #6 on: March 07, 2009, 02:39:49 AM »
steve288

procmail works only on final mail delivered locally to end user accounts on the server.

As you have delegated mail delivery elsewhere then procmail never even sees the messages, so cannot filter them.

A lot of the spam filtering etc is done very early in the mail processing stage ie by qpsmtpd, and as this is at the stage where the sme server is accepting or declining to accept messages, it is effective for all users.

Please accept the advice given as you were essentially already told this.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline lancelott2

  • *
  • 73
  • +0/-0
  • Ich bin Lancelott2
    • Meine private Homepage
Re: Enableing Procmail after install ??
« Reply #7 on: March 07, 2009, 08:41:01 AM »
Hello steve288,

why not useing fetchmail on the other system to get on your mails sortet. Or maybe Imapsync could solve your problem too.

Greetings,

Lance
---------------------------------------------------------------------
Auch ich lerne noch ständig dazu!
---------------------------------------------------------------------

Offline steve288

  • *
  • 336
  • +0/-0
Re: Enableing Procmail after install ??
« Reply #8 on: March 09, 2009, 01:59:19 PM »
thanks mary that helps in understanding a bit. Of course I want to use procmail on all my mail, individual accounts I have always thought was a bit dumb, since most users cant write procmail recipes. (just my opinion) I want to set up a global file, but I asume your comment still rings true rats. What I really wanted to do was set up procmail to add some x- fields and headers and use it to execute commands, or auto reply to some email addresses with forms that people commonly want.

Originally I thought you could do this because of my post here.
http://forums.contribs.org/index.php/topic,37115.0.html


Where I asked ...
We  use SME to filter mail for spam then use the "Delegate mail servers" feature to allow exchange to send and recieve mail.
I would really like to figure out how to use procmail with this configuration.

I was given the answer...

http://www.dungog.net/wiki/Smeserver-mailsorting
in smecontribs
Use the contrib, and add a new fragment that does what you want
use db settings for global rules with 40global, or script your own fragment
template-user/.procmail/50custom

Im guessing in what your saying that this information was not completely correct. That the person who gave the answer hadnt seen my op mentioning delgating the mail  or thought through the implications of delegating the mail.

As far as the fetchmail comment, Im sorry I really dont understand what you mean. I understand fetchmail eg It ... fetches the mail. But the rest I dont understand.  However my issue isnt really downloading mail or preventing spam per say. Its really the ability to add headers with formail and using procmail to execute scripts when you sent mail through with say a subject "send form 123!" and then it emails out the form.

Thank you


Offline lancelott2

  • *
  • 73
  • +0/-0
  • Ich bin Lancelott2
    • Meine private Homepage
Re: Enableing Procmail after install ??
« Reply #9 on: March 09, 2009, 04:04:25 PM »
Hello,

as far as i understand is that you wana do something like that:

email ->virusscan->spamfilter->sorting->deliver to a other adress

If you configur the part "deliver to a other adress" it will not work and it will do something like that.

email->virusscan->spamfilter->deliver

sorting is taken out. But if you be a bit creative you could do something like that.

email->virusscan->spamfilter->sorting->let it in the box<--pic the box up by fetchmail->deliver to an other adress.

or maybe

email->virusscan->spamfilter->sorting->let it in the box<--pic it up with imapsync->mirror it to destination

Oh and if you dont can install a paket via yum, so search for it, download it and install it from local.
To change Fetchmai to grap folders u finde something here http://forums.contribs.org/index.php/topic,43296.0.html

I hope i could help you.

greetings,

lance

« Last Edit: March 09, 2009, 04:08:59 PM by lancelott2 »
---------------------------------------------------------------------
Auch ich lerne noch ständig dazu!
---------------------------------------------------------------------

Offline steve288

  • *
  • 336
  • +0/-0
Re: Enableing Procmail after install ??
« Reply #10 on: March 09, 2009, 07:02:56 PM »
I see I think what your saying is to put the mail on the sme and them move the mail "physically" over to the windows. Yes I suppose you could do that. I think at this point I will leave well enough alone. I have to know what things are imperitive and necessary and what things would just be nice. I think this is the nice category and I will leave it works find the way it is now.

thanks though for the advice.

Regards

Offline lancelott2

  • *
  • 73
  • +0/-0
  • Ich bin Lancelott2
    • Meine private Homepage
Re: Enableing Procmail after install ??
« Reply #11 on: March 09, 2009, 07:22:34 PM »
no i was thinking about imap over thunderbird or outlook. Lough, but now you really confuse me.
Maybe a language problem on my side ;). Anyway my msn is open for you.

Greetings,

Lance
---------------------------------------------------------------------
Auch ich lerne noch ständig dazu!
---------------------------------------------------------------------

Offline steve288

  • *
  • 336
  • +0/-0
Re: Enableing Procmail after install ??
« Reply #12 on: March 09, 2009, 07:49:24 PM »
Yes I have to admit that your language is a little choppy to understand, BUT I do appreciate your effort. I could not even attempt to speak any other language, so you effort is appreciated. You speak more English than I do of any other language.

 I actually struggling myself with Imap and Exchange I'm trying to get horde to work with imap but am having some problems. I have never done this before so imap and Horde was going to be my next question to the newsgroup. In other words I'm not sure imap is working enough or I don't understand it enough to move to anything further at this time, untill I understand my imap issue.

I will look up thunderbird and see what it is.  I think you have provided me with enough info so that I hope I can sort out out what you are saying.

Thanks again. :)

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Enableing Procmail after install ??
« Reply #13 on: March 09, 2009, 09:13:11 PM »
steve288

Your knowledge seems poor, so therefore you are dangerous (technically speaking). You need to get up to speed and stop trying to do things that you do not understand. Or to say it the other way around, you need to understand and learn how to use the tools, before deciding to do things with the tools, that way you will know what you can and cannot do.

In the dungog mailsorting wiki it clearly says:
"The rules that you define are executed as email arrives in your mailbox on the server, and are independent of your email client. If you sort to folders you will need to use a IMAP mail client to read them."

Note is says "...arives in your mailbox on the server....", referring to the sme mail server.

If you delegate mail (to a server running exchange), then the latter stages of  mail processing for all users is handled by exchange. You will need to use exchange to apply any delivery rules, or otherwise setup delivery rules in individual mail clients ie Outlook etc (or Thunderbird).

Thunderbird is the accepted "standard" for email clients.
IMAP is just a mail storage/delivery method. With IMAP, all mail delivered to end user accounts stays on the sme (mail) server in the users IMAP Inbox or other folders.

With POP, users download the messages from the server to their local email program.

Horde (webmail) already works with IMAP, as it reads the IMAP folders on the sme server. Horde is a web based email application running on the server, already configured to read the IMAP mail for users. There is nothing to do to make it work, so I don't understand what problems you could be having. Of course it can only read mail delivered to end user accounts (IMAP folders) on the sme server, and therefore will not be able to read mail delegated to other servers.

I think the general suggestion being made was to stop delegation to exchange, and then allow your sme server (using mailsorting or procmail) to process all mail to end user accounts, and if required to sort to other IMAP folders you create.

Then on your Windows clients, you install Thunderbird email program, and configure it to read the IMAP mail folders on the sme server.
Of course any email program can read the IMAP mail folders on the sme server, even Outlook or Outlook Express etc.

The above does away with using exchange though, which may not be what your organisation wants.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline lancelott2

  • *
  • 73
  • +0/-0
  • Ich bin Lancelott2
    • Meine private Homepage
Re: Enableing Procmail after install ??
« Reply #14 on: March 09, 2009, 10:32:44 PM »
wow mary you are good. for the first i am not good in exchange but i thought imap is a problem for it.
steve better turn your sme in a hole mail exchange server. it comes with all you need.

greetings,

lance

---------------------------------------------------------------------
Auch ich lerne noch ständig dazu!
---------------------------------------------------------------------

Offline steve288

  • *
  • 336
  • +0/-0
Re: Enableing Procmail after install ??
« Reply #15 on: March 10, 2009, 03:50:31 PM »
Thanks Mary for your thoughts. There are a lot of things to learn your right. Unfortunately Wiki's however are not always right and certainly dont contain all the information that one needs or a complete discussion on. Of course they are maintained by the "kindness of strangers ". We are thankfull for that. But they dont contain exhaustive information on the topic and sometimes are wrong, or perhaps better to say things change that make them wrong. And it seems I always want to do things that they are not always specific on. We try to use the newsgroups to flesh out some of these differences. Despite a comment that says x it does not always mean that xx is not true unless specifically mentioned. I think we all like Linux because of its versatility and at times thinking outside the MS box.

Thank you for clarifying what lancelott2 meant. Despite his best efforts I did not understand what he meant. I suppose my comments belie what I do know, but I have never used Thunderbird or heard of it. Generally we use Exchange which I can't nor want to change. The last time I used a Linux mail reader (other than Pine) I think it was Netscape on Redhat. (does Netscape even exist now other than Mozilla?)

thank you again for your comments Mary,

I will be posting my problems with Horde on another post because well Its a different issue and I want to make it easier for people who are looking for solutions, to specific issues easier to find them rather than have to read about the previous issues which are un related. All software has its Nuances despite developers best efforts to make them straight forward. Perhaps im a dolt, when I worked in a previous company where we developed hardware and software there was a sign in one of the hardware engineers offices. It said "If you make is so easy that an idiot can use it, they probably will." perhaps Im that person I dont know.

Regards


Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Enableing Procmail after install ??
« Reply #16 on: March 10, 2009, 04:22:18 PM »
steve288

Your knowledge is the issue, not the accuracy of the wiki. You can google for many things also eg Thunderbird
http://www.mozillamessaging.com/en-US/thunderbird/all.html
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline steve288

  • *
  • 336
  • +0/-0
Re: Enableing Procmail after install ??
« Reply #17 on: March 10, 2009, 05:03:31 PM »
Thanks Mary for your thoughts. There are a lot of things to learn your right. Unfortunately Wiki's however are not always right and certainly dont contain all the information that one needs or a complete discussion on. Of course they are maintained by the "kindness of strangers ". We are thankfull for that. But they dont contain exhaustive information on the topic and sometimes are wrong, or perhaps better to say things change that make them wrong. And it seems I always want to do things that they are not always specific on. We try to use the newsgroups to flesh out some of these differences. Despite a comment that says x it does not always mean that xx is not true unless specifically mentioned. I think we all like Linux because of its versatility and at times thinking outside the MS box.

Thank you for clarifying what lancelott2 meant. Despite his best efforts I did not understand what he meant. I suppose my comments belie what I do know, but I have never used Thunderbird or heard of it. Generally we use Exchange which I can't nor want to change. The last time I used a Linux mail reader (other than Pine) I think it was Netscape on Redhat. (does Netscape even exist now other than Mozilla?)

Thank you again for your comments Mary,

I will be posting my problems with Horde on another post because well Its a different issue and I want to make it easier for people who are looking for solutions, to specific issues easier to find them rather than have to read about the previous issues which are un related. All software has its Nuances despite developers best efforts to make them straight forward. Perhaps im a dolt, when I worked in a previous company where we developed hardware and software there was a sign in one of the hardware engineers offices. It said "If you make is so easy that an idiot can use it, they probably will." perhaps Im that person I dont know.

Regards

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: Enableing Procmail after install ??
« Reply #18 on: March 10, 2009, 05:04:21 PM »
Steve288,

Quote
But they dont contain exhaustive information on the topic and sometimes are wrong, or perhaps better to say things change that make them wrong.

Please qualify what you find incorrect or incomplete. There are many of us here with varied level of knowledge that contribute to the Wiki. Most Wiki entries begin as threads on the forums and end up in the wiki as more permanent entries. The Wiki is review by all (including you) so please let us know what needs to be changed.

Offline steve288

  • *
  • 336
  • +0/-0
Re: Enableing Procmail after install ??
« Reply #19 on: March 10, 2009, 07:20:45 PM »
Thanks for asking Mercyh.

Indeed this is what I did do and I hope and wish others would too.

I compliment everyone on their efforts, but things are not always noticed by us lowly users or and by the Doc Team.  When I pointed out something that did not work for me in a wiki
(seem my comment)
http://forums.contribs.org/index.php/topic,37115.msg207182.html#msg207182

Snoble, acknowledged it and said that he would fix it. I thank him and all those who work for the huge salary of nothing for the effort they put in. As a bonus they get sometimes-thoughtless negative comments.  This is not me I hope.

I think my point is that because of the voluntary nature of this software,  things do creep in and information is not always accurate because of changes and differing users experiences.  I know that effort is made to correct this.  Sometimes however you try to ask questions because the wiki ‘s are indeed “threads on the forums and end up in the wiki as more permanent “.  And some stuff just needs fleshing out. Indeed I once tried to join the so that I could contribute but for some reason the  process  didn’t work for me and I gave up. This was some time ago.
I guess sometimes however I really dont know what contributions would be apreciated by the docs team. I like to have things spelled out. I dont know if my aproach is what is needed. Here in my organization I am known as the document guy. I do howto's on things to make it easier for me, other i.t. staff and end users to do stuff, its the way I dont forget.  And I apreciate it when I find things this way.

As you have said we are all at different learning points, and we all come from different backgrounds. I think we are trying to develop in our knowledge and hopefully share it with others so they can grow too.

I think we should consider this conversation as closed as it has seriously veered off course.

With Respect



Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Enableing Procmail after install ??
« Reply #20 on: March 10, 2009, 08:22:27 PM »
Indeed I once tried to join the so that I could contribute but for some reason the  process  didn’t work for me and I gave up. This was some time ago.
The procedure has been revised and simplified so feel free to try again: http://wiki.contribs.org/Help:Contents
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline axessit

  • *****
  • 213
  • +0/-0
Re: Enableing Procmail after install ??
« Reply #21 on: March 18, 2009, 01:33:02 AM »
If you want to have SME use procmail to create some rules, then make SME the default mail server and get users to get their mail from there, use Horde or some other programme like Zafara if you want an MS Outlook look-alike. If you want to use Exchange, then set the rules up in Exchange. Users can use individual rules to sort mail. They can be either set up on the MS Outlook client or Exchange web interface. But, keep all mail processing to one mail server. You'll confuse others who may have to follow....

I use the userpanel contrib which allows you to access the procmail rules. They're pretty easy to set up for an end user.