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

Greylisting - CLI

Discussion in 'Plesk 9.x for Linux Issues, Fixes, How-To' started by kram@, Oct 9, 2009.

  1. kram@

    kram@ Regular Pleskian

    26
    40%
    Joined:
    Dec 11, 2003
    Messages:
    152
    Likes Received:
    2
    Location:
    South Africa
    Hello,

    when i run this command /usr/local/psa/bin/grey_listing -i

    I get

    White domains patterns list:
    *google.com
    *mail.ru
    *parallels.com
    *mail.ru
    *yahoo.com
    *yandex.ru

    I am trying to remove *mail.ru *mail.ru *yandex.ru

    I run the following commands.

    /usr/local/psa/bin/grey_listing --update-server -domains-whitelist del:*@mail.ru

    /usr/local/psa/bin/grey_listing --update-server -whitelist del:*@mail.ru

    I get the following reply.

    SUCCESS: Update of server-wide settings complete.

    However when i run /usr/local/psa/bin/grey_listing -i

    White domains patterns list:
    *google.com
    *mail.ru
    *parallels.com
    *mail.ru
    *yahoo.com
    *yandex.ru

    The domain is still listed.

    Am i missing something simple here?

    ANy suggestions?
     
  2. trialotto

    trialotto Golden Pleskian Plesk Guru

    37
     
    Joined:
    Sep 28, 2009
    Messages:
    1,436
    Likes Received:
    206
    Simply remove the @ sign.

    Use command

    /usr/local/psa/bin/grey_listing --update-server -domains-whitelist del:*mail.ru

    and/or

    /usr/local/psa/bin/grey_listing --update-server -domains-whitelist del:*mail.ru
     
  3. kram@

    kram@ Regular Pleskian

    26
    40%
    Joined:
    Dec 11, 2003
    Messages:
    152
    Likes Received:
    2
    Location:
    South Africa
    Resolved

    Hey trialotto,

    Thanks, I was making such a silly error.
    I don't know why I just never though of removing the @.

    Clearly doing to many things at once on the server, is not the best approach.
    1x Things at a time = 100% focus :)
     
  4. trialotto

    trialotto Golden Pleskian Plesk Guru

    37
     
    Joined:
    Sep 28, 2009
    Messages:
    1,436
    Likes Received:
    206
    By the way....

    It was not that silly.

    Some further advice: it is wise to add some specific mail adresses to the (generic) white list, as you was probably trying to do.

    Just use:

    /usr/local/psa/bin/grey_listing --update-server -whitelist add:*@<allowedDomain>.tld

    (Hint: if possible, please remove the * and replace with the mail address that you really trust. Make a list of those trusted mail adresses and do:

    -whitelist add:<mailname1>@<allowedDomain>.tld,<mailname2>@<allowedDomain>.tld (and so on)

    )

    Why should you? Well, there is an advantage to this: the generic whitelist is shared with spamassassin and therefore the spam daemon knows to trust the address(es). Nice, easy and very convenient for those mail adresses coming from yahoo.com, hotmail.com, gmail.com etc.

    Then all other mail adresses from those domains will not be whitelisted and will be evaluated.

    Hence, for this to be really effective and optimal, remove the domain entry from the domains whitelist with:

    /usr/local/psa/bin/grey_listing --update-server -domains-whitelist del:*<allowedDomain>.tld

    Afterwards, do check the entries with the -i option.

    Probably you were trying this ;-) So, not that silly at all.
     
  5. kram@

    kram@ Regular Pleskian

    26
    40%
    Joined:
    Dec 11, 2003
    Messages:
    152
    Likes Received:
    2
    Location:
    South Africa
    Bulk for a single domain

    Hey trialotto,

    Thanks for the info!
    Do you by any chnace know how to add an email address or domain to all mailboxes in one domain.
    One client of mine has 75 mailboxes, they all communicate with a specific email domain that is black-listed.
    Instead of trying to add a white list 1 by 1 a bulk add would certainly help :)

    any thoughts?
     
  6. kram@

    kram@ Regular Pleskian

    26
    40%
    Joined:
    Dec 11, 2003
    Messages:
    152
    Likes Received:
    2
    Location:
    South Africa
    Bulk White list for a single domain

    Hey

    Thanks for the info :)

    Do you by any chance know how to add a domain or email address to all emails in a domains white-list?
    I have a few clients that have over 70 mailboxes, they communicate with certain domains that in the server-black list

    Would be cool if i could add their list from the CLI instead of 1 by 1 in PLESK.

    Any thoughts?
     
  7. trialotto

    trialotto Golden Pleskian Plesk Guru

    37
     
    Joined:
    Sep 28, 2009
    Messages:
    1,436
    Likes Received:
    206
    Bulk white lists

    kram@, I am not sure what the essence of your post is.

    Please clarify!

    It is possible by the way, to black-/whitelist domains/mailaddresses on the individual domain level. This is achieved by greylisting, with the associated black-/whitelisted items also being used by the normal spam filter (spamassassin).

    Somehow, it seems that you want a routing of mail, but i cannot identify from your story why you want that and how you have (tried) to set it up.

    Or, it can be the case that you want to say that you receive mail for your customers domains, from servers that are blacklisted somehow (probably by the default settings of plesk).

    Hence, explain want you want....then i can give an appropriate response/commands
     
  8. kram@

    kram@ Regular Pleskian

    26
    40%
    Joined:
    Dec 11, 2003
    Messages:
    152
    Likes Received:
    2
    Location:
    South Africa
    Clarity

    trialotto -

    What I am trying to is white-list an email address/domain to every user in a domain on PLESK.
    If a domain has 50+ mailbox it's a bit of a pain to add one at a time via PLESK for the client.

    I had to create a txt file enter every mailbox with the white-list option

    --MY TXT FILE LOOKS LIKE THIS--
    ./grey_listing --update-mailname user1@mydomain.co.za -whitelist add:*@yourdomain.co.za
    ./grey_listing --update-mailname user2@mydomain.co.za -whitelist add:*@yourdomain.co.za
    ./grey_listing --update-mailname user3@mydomain.co.za -whitelist add:*@yourdomain.co.za
    ./grey_listing --update-mailname user4@mydomain.co.za -whitelist add:*@yourdomain.co.za

    Again time consuming!

    If this could be done with a script, that called the domain, counted in the mailboxes and produced a .txt file above and ran it.... that would rule!

    A few my clients have 75 - 150 email accounts.
    They deal with very specific domains, I would like them to supply me a list of these domains.
    I then enter the sender domains in a script, it runs and does all the mailboxes at once :)

    Does this make sense?
     
  9. trialotto

    trialotto Golden Pleskian Plesk Guru

    37
     
    Joined:
    Sep 28, 2009
    Messages:
    1,436
    Likes Received:
    206
    Not really: even though it is late at night for me when reading your post, it is clear to me that what you want is simpler than you think.

    Running the command

    ./grey_listing -u -domains-whitelist add:*yourdomain.co.za

    would result in what you try to achieve in that txt file.

    It simply states that all mail from yourdomain.co.za will be whitelisted for all mailadresses available on all domains on your plesk server, including those domains with the pattern *mydomain.co.za

    Even if there is an alternative reason why you want to do some specific, your method is not the proper one.

    Your improper method seems to suggest that there is some relaying role for yourdomain.co.za, but in this situation it is not wise to do something like that. First try the command mentioned above.
     
Loading...