Accept only one TLD.... but

Discussion in 'General' started by LTBL SRL, Mar 9, 2016.

  1. LTBL SRL

    LTBL SRL New Member

    Hi all,
    can i accept only one tld for default and with whitelist include some other domain (not tld)?
    Sorry for english....
    Thanks to all.

    Giancarlo
     
  2. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    check this post
    You probably need to add a whitelist entry to actually allow your specific tld/domain
    Code:
     /<.+?@.+?\.tld>/
    Code:
    /<.+?@domain\.tld>/
    
    And add something like the following to your blacklist

    Code:
     /<.+?@.+?>/

    I didn't test it / don't know if this actually would work so be careful, maybe someone else can confirm what I wrote or make better suggestion :)
     
  3. LTBL SRL

    LTBL SRL New Member

    In the afternoon i'll try it.
    Thanks for answer.
    :)
     
  4. LTBL SRL

    LTBL SRL New Member

    @ztk.me
    I must insert the regex into header check?
    In this option there are not whitelist and/or blacklists..
     
  5. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    Yes, Header filter it is.
    And you need to select "DUNNO" for the whitelisting entry.
    Make sure your whitelisting regex is added before the REJECT / blacklist entries.
     
  6. LTBL SRL

    LTBL SRL New Member

    Ok....
    So.. i do this operation in sequence....
    In ISP config under Mail content Filter --> Header filer i add (in squence):
    1)/<.+?@.+?\.tld>/ Accept my TLD; Action DUNNO
    2)/<.+?@domain\.tld>/ Accept some other domains Action DUNNO
    3)/<.+?@domain\.tld>/ Accept some other domains Action DUNNO
    4)/<.+?@.+?>/ Reject everithing else...... Action REJECT


    It's correct?
     
    Last edited: Mar 9, 2016
  7. sjau

    sjau Local Meanie Moderator

    DUNNO won't help:
    I tend you should rather look at the Whitelist / Blacklist options. Those work with domains.
    But not sure how to deny everything basically. Probably need to whitelist your domain and then make a content header check that refuses everything else.
     
  8. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    I actually read the same thing you quoted, sjau but it should work, after receiving OK/DUNNO postfix will go to the next input line does not mean it goes down the current file.

    For example this will work, foo's mail is going trough.
    Code:
    /^.*[email protected]$/ OK
    /^.*example.org$/ REJECT
    
    Yeah I used OK, cause it's shorter =)

    @LTBL SRL I haven't check the syntax to be honest, but if someone knows better, please correct me if I'm wrong :)
     
    Last edited: Mar 14, 2016
  9. sjau

    sjau Local Meanie Moderator

    right.... next line in the config, not in the file :) good catch
     
  10. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    Yeah the description is a bit misleading, felt on that the first time, too :)
     

Share This Page