• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Spam folders and extension addresses

R

rubenmv

Guest
Hi all:

I'm on the first week as a plesk 8.1 user, and boy do I have problems :-(

First off, I'm migrating from a postfix+kitchen sink, lovely handcrafted mail system that took me ages to set up, does that job and has a few perks that I like a lot. (I'm migrating away from that because I think a control panel even though uglier, might help me do things faster and easier)

The two killer features I have are:
  • Extension addresses server-wide
  • Spam folders, server and domain wide

Both of this things are tightly coupled with the MTA and it's delivery mechanism. I've done both with qmail and more recently with postfix.

So the question to you all: How can I implement both spam folders ( quarantined spam messages as decided by SpamAssassin) and extension addresses (delivery of messages sent to user@domain AND user-whatever at the same Maildir) ? ** IN PLESK OF COURSE **

Thanks in advance
 
Wow, something must be in the water because I'm in exactly the same boat. I'm moving many accounts to a plesk server; the users have used extension addresses for years so disabling them now would be painful. If anyone has any ideas on how to implement this in plesk I'd love to hear from you.
 
SpamAssassin

Hi Guys,

I do have the same problem. New with Plesk and seems like I have not much luck with SpamAssassin.
Are there any tricks or real manuals that explain things in this world?

Thank you!!!
 
Thanks ServerTune

Thank you ServerTune, I believe this is exactly what I need:

http://kb.swsoft.com/article_123_1217_en.html

It is mention right at the end: using Bayes Bases for all mailboxes using the rules of one mailbox that I personal can train.
Our aim is to have all our users lighten up from the burden to make themselves rules. So in this way I can make rules from a single mailbox and have them apply to everyone.

Now I just have to ask to my team-mate who has the codes to access low-level. I hope is not too complicate.

Can I ask you a small favor? Could you kindly read the thread I mention above and let me know if it would work for this specific case?

You are really kind and I thank you so much

Joy to you!
 
Re: Re: SpamAssassin

Originally posted by servertune
I am not sure if this KB will help: http://kb.swsoft.com/category123.php

Thanks!

I'm still looking as to how to separate the spam msgs from the ham, *before* the user opens her MUA

Qmail in plesk acts really weird, i've been changing every combination of /var/qmail/users/assign, and /var/qmail/mailnames/DOMAIN/{.qmail, .qmail-default} as well as /var/qmail/mailnames/DOMAIN/USER/{.qmail,.qmail-default} with no success.

I can't receive msgs in USER-FOO@DOMAIN, and I can't find the place where to tell procmail to route spam msgs to a given maildir.

Best,
Rubén
 
These documents show HowTo train SA to sort our ham from spam:
- Wiki
http://wiki.apache.org/spamassassin/BayesInSpamAssassin

- SWsoft
http://kb.swsoft.com/article_123_1217_en.html

It is unfortunate that there is no feature in the current Plesk to train SA. This should be done manually from the command line in the following way.

1. Store SPAM and HAM messages in two different folders, for example 'spam_mails' and 'ham_mails'.

2. Train Spamassassin for one mailbox using the messages from that folders:

Code:
# cd /path/to/spam_mail/
# for message in * ; do /usr/local/psa/admin/sbin/spammng --bayes [email protected] --spam=$message ; done
# cd /path/to/ham_mail/
# for message in * ; do /usr/local/psa/admin/sbin/spammng --bayes [email protected] --ham=$message ; done


3. Then repeat this command for every mailbox on the server or just copy bayes bases (./domain.com/mailname/.spamassassin/bayes_*) from this mailbox to each other.

I suggest you read these threads for more information about SA tarining:

http://forum.swsoft.com/showthread.php?threadid=21027
http://forum.swsoft.com/showthread.php?threadid=36914
http://forum.swsoft.com/showthread.php?threadid=23440

Note
Another way to train Spamassassin is to upload spam filter rules manually from: http://www.rulesemporium.com/rules.htm

You need to put them in:
%plesk_dir%Additional\Perl\site\share\spamassassin

FYI, psa-spamassassin provides the Plesk GUI for SpamAssassin

To verify that spamassassin is indeed tagging messages as spam, send an email with the following in the body. This should be put all on one line without out any whitespace or page breaks:

Code:
XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X
This should be marked with a spam score of 1000.
 
Yes, I know there's a way to mark spam and ham messages and that there's a way to train SA to recognize them into a bayes database.

BUT what I want is to *sort* spam into a user/Spam maildir and ham into user/Maildir automatically .

This allows the user to browse through her mailbox and move any messages that didn't got marked by SA (false negatives) into the Spam folder. Same thing with false positives (ham marked wrongly as spam)

On top of this, I also want that any message sent to USER-FOO@DOMAIN, and also USER-BAR@DOMAIN get received by Qmail, and processed in the same way as USER@DOMAIN

Both of this requirements are normal features of Qmail, that doesn't work on Plesk :-(

Best
Rubén
 
Many Thanks!

Dear Servertune,

thank you very much for your kindness. I will try to do my best to follow your precious advices.
Hopefully my poor users won't be strangled by these unwanted messages anymore. It really start to be an overwhelming situation.
I wish I could help you back somehow, so to repay your kindness.

Joy to you
 
I managed to get extension addresses to work by replacing Plesk's smtpd with qpsmtpd (which I wanted anyway). qpsmtpd does use the correct entry in the users/cdb database, although Plesk overwrites users/assign when you add a new user.

To get around this I manually add the extension stuff in a seperate file. I moved qmail-newu to qmail-newu-plesk and replaced it with a script that moves the assign file, cats the users/extension file and the assign file and runs qmail-newu-plesk.

That seems to work with a couple of exceptions. First, new users don't get extension addresses automatically, although you can do that in a script as well if you'd like.

I'm also only running qpsmtpd on port 25, so TLS connections don't support extension addresses. That's OK for me although others may want to run qpsmtpd with TLS.
 
Oh, I should have mentioned. I suspect, but I'm not sure, that plesk compiiled qmail's smtpd without extension support. That's probably why it doesn't work out of the box.
 
Back
Top