1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Plesk 8.3 and Greylisting

Discussion in 'Plesk for Linux - 8.x and Older' started by ghazlewood, Jan 16, 2008.

  1. ghazlewood

    ghazlewood Basic Pleskian

    24
    40%
    Joined:
    Nov 15, 2004
    Messages:
    40
    Likes Received:
    0
    Location:
    London, UK
    Does anyone know why Brent Meshier's greylisting solution (see here) doesn't work on Plesk 8.3? I've just upgraded a customer to a new CentOS 5 box and wasn't aware that greylisting wouldn't work on the machine, otherwise I would have opted for 8.2.1

    TIA

    George
     
  2. atomicturtle

    atomicturtle Golden Pleskian

    29
     
    Joined:
    Nov 20, 2002
    Messages:
    2,110
    Likes Received:
    7
    Location:
    Washington, DC
    Ive got the qgreylist rpm in my repo. The whole SMTP_AUTH issue can be compensated for by using the submission port (587). So modifying qmail isn't necessary any more.
     
  3. ghazlewood

    ghazlewood Basic Pleskian

    24
    40%
    Joined:
    Nov 15, 2004
    Messages:
    40
    Likes Received:
    0
    Location:
    London, UK
    Thanks for the reminder Scott but unfortunately the server has a number of existing customers on it who all use port 25 to send so 587 isn't an option (unfortunately!). I can't believe I'm the ony one who's stuck with this problem? I guess I'll just have to bide my time...

    I did find greylite earlier today but so little has been written about using it with Plesk I'm not sure it's the best option for a live server :)
     
  4. faris

    faris Guest

    0
     
    Just install spamdyke which will also greylist for you.

    However it does not support pop-before-relay so if you need that you are still stuck :)
     
  5. ghazlewood

    ghazlewood Basic Pleskian

    24
    40%
    Joined:
    Nov 15, 2004
    Messages:
    40
    Likes Received:
    0
    Location:
    London, UK
    Hey that looks like a great solution, thanks faris! I'd not heard of spamdyke before. I'm not sure how many POP-before-SMTP users the client has but it's definitely a possibility...
     
  6. atomicturtle

    atomicturtle Golden Pleskian

    29
     
    Joined:
    Nov 20, 2002
    Messages:
    2,110
    Likes Received:
    7
    Location:
    Washington, DC
    I always recommend against the pop-before-relay system anyway. Especially if your users are coming from proxies, some spammer will undoubtedly take advantage of it.
     
  7. ghazlewood

    ghazlewood Basic Pleskian

    24
    40%
    Joined:
    Nov 15, 2004
    Messages:
    40
    Likes Received:
    0
    Location:
    London, UK
    Ok i've successfully got spamdyke working on the server but I thought I'd post my findings in case anyone else gets stuck with things or wonders how to set it up with Plesk.

    I found a tutorial in German on setting up spamdyke with Plesk which had some useful config examples but I found that their use of some settings was too restrictive so I pared them down.

    So after installing spamdyke I created the file below:

    /etc/spamdyke.conf
    Then you need to create some directories and files:
    I also found that setting the ownership of the new files was important, so:

    Next I backed up the original smtp and smtps xinetd.d files:
    Changed the smtp_psa and smtps_psa files so that on the server_args line between "/var/qmail/bin/relaylock" and "/var/qmail/bin/qmail-smtpd" I had "/usr/local/bin/spamdyke -f /etc/spamdyke.conf"

    I also copied the full server_args line to a new file (which I called spamdyke-test-config), added --config-test to the spamdyke arguments. This allows me to quickly test the spamdyke config without having to copy and paste bits.

    So after running the config test I found that it complained about a lack of domains in the greylist directory (which should list all domains to be protected) so I ran the following:
    Finally I added an event on 'Domain creation' and 'Domain alias creation' in Event Manager in the CP to:
    (I've not tested this bit yet as I've not created a new domain but I assume it will work!)

    Finally a quick:
    Once everything is running ok i guess you can lower the log level in the config.

    If users complain about mail being rejected with DENIED_GRAYLISTING when they send mail it is because they are not using SMTP authentication... I did a few 'grep DENIED /usr/local/psa/var/log/maillog' to see where blocks were occuring...

    If anyone has any suggestions please let me know...
     
  8. faris

    faris Guest

    0
     
    That's a very helpful howto.

    I've been working on a howto document for a while now myself but I've had trouble finding the time to polish it up to a level I'd be happy to see released.

    Incidentally, if you put the conf file and the blacklist/whitelist files in /etc/spamdyke.d/ then you have fewer issues with ownership. The only thing I've put in the /var/qmail directory is the graylist tree.

    I've also created a script to create the graylist directories with a little twist where you can disable or enable a particular domain with that setting not being changed when you scan the rcpthosts (and morercpthosts in my case) for new domains. I'm very proud of it :) I used the whole thing as a kind of learning project as I've never had the need to look into shell scripting much in the past. It has been huge fun. And all thanks to spamdyke!

    I'm a little unhappy about having used the rm -rf command to delete directories though. I can see it leading to trouble but I have not figured out how to make it "safe". I guess I should make it display a list of the directories it is going to remove and ask for a confirmation before continuing....hmm...yes....I'll give this a go if I have time.

    Faris.
     
  9. ghazlewood

    ghazlewood Basic Pleskian

    24
    40%
    Joined:
    Nov 15, 2004
    Messages:
    40
    Likes Received:
    0
    Location:
    London, UK
    Thanks for the advice faris, I like the idea of /etc/spamdyke.d for the config files.

    I've tested the domain creation portion (Event Manager) of my howto and realised that it doesn't work! I'd be very interested to know how you did the greylist directory creation, you mention that it scans rcpthosts, that sounds like a cool solution which keeps everything clear of plesk... Would you be happy to share?

    Cheers
     
  10. BlueOryx

    BlueOryx Guest

    0
     
    Everything you need to install spamdyke in plesk!

    Hi, all

    thank you for this thread... it got me going in the right direction and i finally got it working with Event Manager and all.

    I have added this how to to our wiki.
    Don't worry i was sure to pay respects to this thread!

    See it all here (install, Bash script, event manager setup, Everything!)

    Blue Oryx Internet Solutions, LLC Wiki

    Let me know if it helps!
     
  11. ghazlewood

    ghazlewood Basic Pleskian

    24
    40%
    Joined:
    Nov 15, 2004
    Messages:
    40
    Likes Received:
    0
    Location:
    London, UK
    Superb job! Thanks for posting. Now I can perfect my setup with Event Manager. Perhaps the author of spamdyke, Sam, would be happy linking or posting the full doc on the main spamdyke site? What do you think?
     
  12. BlueOryx

    BlueOryx Guest

    0
     
    If he links me on his site that would be awesome! I can use any SEO i can get!

    If he just uses my code and adds it to his install maybe he could through up a thank you link too!

    wonder if he reads this forum?

    anyway, keep me posted, i would love to know if it works on others servers too. (it should)

    also, anyone else seeing qmail turned off in the service manager in plesk but everything running smoothly? I have a separate post asking too.

    this is kinda weird.
     
  13. ghazlewood

    ghazlewood Basic Pleskian

    24
    40%
    Joined:
    Nov 15, 2004
    Messages:
    40
    Likes Received:
    0
    Location:
    London, UK
    Yeah had noticed that the Service Manager reports that Qmail is down/off when it isn't too. Anyone know why?
     
  14. ncc@sgcom.com.s

    ncc@sgcom.com.s Basic Pleskian

    23
    57%
    Joined:
    Mar 25, 2004
    Messages:
    44
    Likes Received:
    0
    SPAMdyke

    Spamdyke is an excellent software.

    However, currently spamdyke only works for SMTP authentication and not POP3 before SMTP authentication. Secondly spamdyke has some problem working on SSL SMTP port 465 with Plesk.

    These two problems, especially the latter, may cause quite a problem to the hosted users if they are not familiar with the settings.

    Other than that, everything else is working very well.
     
  15. Hal9000

    Hal9000 Guest

    0
     
    I just installed spamdyke yesterday and am very pleased with how it's working.
    However, I also suffer from the smtps/465 problem. Is there any way to solve this? What exactly is the problem?
     
  16. ghazlewood

    ghazlewood Basic Pleskian

    24
    40%
    Joined:
    Nov 15, 2004
    Messages:
    40
    Likes Received:
    0
    Location:
    London, UK
    I've just rolled out spamdyke onto a couple of other production servers and am strangely having a few problems. Namely that although I have created the folders for each of the domains I want greylisted, none of the domains are being greylisted and I am seeing no files created inside the domain folders. I have checked the permissions on the folders and spamdyke etc. and everything is correct. Spamdyke is running and I can see it rejecting via one of the RBLs but it's not using greylisting at all. Most mysterious. Looking back at the original server I setup I can see that although it was creating the email address files in January it hasn't been recently... perhaps I should take this to the spamdyke users list...
     
  17. ghazlewood

    ghazlewood Basic Pleskian

    24
    40%
    Joined:
    Nov 15, 2004
    Messages:
    40
    Likes Received:
    0
    Location:
    London, UK
    Ignore me, I had a no-graylist-dir setting in there by mistake so it wasn't working as graylist-dir and no-graylist-dir are mutually exclusive! :)
     
  18. soarchrist

    soarchrist Guest

    0
     
    Spamdyke install is easy with the tutorial found at Blue Oryx Internet Solutions, LLC Wiki. However, make note that the last item on their list of things to do is to create a Event Handler for new domain creation. They made a typo (as of this post) in the script name to be called by Plesk CP. They have greylist spelled with an 'a'... so keep watch of that.
     
  19. mistertee

    mistertee Guest

    0
     
    Hello everyone,

    This thread (and BlueOryx's wiki) have been tremendous help in me getting spamdyke set up on our Linux Plesk Server.

    I have one issue though and hope somebody can help. My /var/qmail/spamdyke/greylist/ directory lists every main domain name in my server (using the "for i in `ls -1 /var/qmail/mailnames`; do mkdir $i; done" command). However, my server already has hundreds of domain aliases set up (some of our domain have 3 or 4 domain aliases attached).

    Is there an easy way to get all of those domain aliases into the /var/qmail/spamdyke/greylist/ directory? Some other command which can list them all? As a last ditch effort I can go and and note them down and add them by hand, but a faster way would be great (especially since once I'm done with this server I'm going to do this on another server with hundreds of domains).

    EDIT: PARTIAL SOLUTION So I found a text file listing all of the domains in Plesk (both primary and domain aliases). The file is located at /var/qmail/control/virtualdomains . The only problem is that each domain has a colon and number after it. For example...

    example.com:83
    example2.com:4
    domainaliaspointingtoexample.com:83
    etc...

    So I had to copy this text and edit out the :numbers and then manually add them to the /var/qmail/spamdyke/greylist/ directory. If anyone comes up with a way to automatically check this virtualdomains file, strip out the :numbers and then add them to the /var/qmail/spamdyke/greylist/ then this would take care of existing domain aliases.


    ~ Mr.T
     
Loading...