Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: sanchotai on May 23, 2007, 04:24:49 AM
-
Hi,
I've just set up a 7.1 box.
I would like to use a procmail recipe (eg /etc/procmailrc) as a global script without having to set up a .forward or a .procmailrc for each user.
Thus the process I envisage is:
SMTP recievs mail
Processed thru virus and spam filters
mail piped to a global procmailrc script that:
diverts spam to a separate spam mailbox
distributes certain types of email to a number of users
etc
I am familiar with procmail recipes but am not sure how to get qmail to pipe the message thru to procmail so that it then delivers to the ultimate user.
If anyone can help I would appreciate this very much.
-
To make qmail execute procmail, you could change the .qmail file for every user to include
| /usr/bin/procmail ~/.procmailrc
Of course the ~/.procmailrc points to the home-directory of every user, so that would have to be changed to /etc/procmailrc.
You should use the template system to change the .qmail file. I'looked through the templates, I'm not sure there's a setting somewhere to invoke procmail, the file 10Filter in /etc/e-smith/templates-user/.qmail looks like it could cause procmail to be executed (I took a quick look)
-
Thanks Curly,
I guess I'll have to resort to piping to procmail in each users .qmail file.
I was hoping that somewhere in the qmail delivery chain (ie where it passes thru the virus scanner and spam checker) I'd be able to tag on procmail as a mail delivery agent right at the end. I know procmail can be used as an mda but am not sure where in the qmail configuration all the piping trhu to virus and spam checking is buried.
-
I'm not an mail-expert, but this I know:
The delivery chain is a list of plugins ( plugins in /usr/share/qpsmtpd/plugins ), the list is made twice, once for external mail, one for internal mail, in /var/service/qpsmtpd/config/peers/0 and /var/service/qpsmtpd/config/peers/local. In the peers directory there are also some links pointing to local. In the work-around for bug 2223 the list is changed, I think it would be possible to include procmail somewhere.
-
Thanks for the hint Curly,
I'll snoop around that and see if I can figure it out - will post up results if successful
-
sanchotai
Did you have any success setting up procmail for all your users?
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.
Regards
-
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
-
Thank you that does seem to be what Im looking for.
However it appears that I need to have
http://www.dungog.net/wiki/Usermanager#User_Manager
Installed first to use it. In the past I did install this. So it was already installed.
I typed the following
yum install smeserver-mailsorting
Which is what the following link told me to do.
http://www.dungog.net/wiki/Smeserver-mailsorting says I should use.
I then got the following message, which concluded with the fact that the sw was not installed.
WARNING: Additional commands may be required after running yum
==============================================================
Loading "smeserver" plugin
Loading "installonlyn" plugin
Loading "fastestmirror" plugin
Setting up Install Process
Setting up repositories
smeaddons 100% |=========================| 951 B 00:00
smeextras 100% |=========================| 1.9 kB 00:00
base 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
smeos 100% |=========================| 1.9 kB 00:00
smeupdates 100% |=========================| 1.9 kB 00:00
Determining fastest mirrors
Reading repository metadata in from local files
Excluding Packages from CentOS - os
Finished
Excluding Packages from CentOS - updates
Finished
Parsing package install arguments
No Match for argument: smeserver-mailsorting
Nothing to do
================================================================
No new rpms were installed. No additional commands are required.
================================================================
Then I went to the
http://www.dungog.net/wiki/Usermanager#User_Manager link and read there how to install the mail program and it says to use..
yum --enablerepo=smecontribs install smeserver-mailsorting
I believe that this looks at another place to get the download. SMECONTRIBS
It has downloaded and installed sucessfully... thank you.
I just wanted to ask this question and then I will move further questions to the contribs fourum because it starting to get contribs related. BUT ... should this wiki for the mail sorting be updated with the proper yum command to help others or is there something that I have done wrong, in the first place. I always like help if it will help others.
Regards
-
yes, you needed --enablerepo=smecontribs
I'll add this where needed, thanks