Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Nov 2002
    Location
    BA, Argentina
    Posts
    27

    Default exim w/open relay

    Hello people..

    I have a big security problem when I set a demo account under Cpanel, the exim relay mail if somebody is authenticated using the user/pass corresponding to that demo account.

    I was tried modifying the statements defined into ACL under check_recipient: in exim.conf but I can´t to prevent any demo user to send emails from any host to any other host, by means of the user / pass. THIS MEANS A SPAM HOLE.

    I try to remove the demo domain from /etc/localdomains, but exim (with the actual conf) still relaying if the mail session is authenticated.

    Below is a scratch from my actual exim.conf

    ******
    check_recipient:
    # Exim 3 had no checking on -bs messages, so for compatibility
    # we accept if the source is local SMTP (i.e. not over TCP/IP).
    # We do this by testing for an empty sending host field.

    accept hosts = :

    require verify = sender
    accept domains = +local_domains
    accept domains = +relay_domains
    accept hosts = +relay_hosts
    accept condition = ${perl{checkrelayhost}{$sender_host_address}}
    accept hosts = +auth_relay_hosts
    endpass
    message = $sender_fullhost is currently not permitted to \
    relay through this server. Perhaps you \
    have not logged into the pop/imap server in the \
    last 30 minutes or do not have SMTP Authentication turned on in your email client.

    endpass
    accept authenticated = *
    deny message = $sender_fullhost is currently not permitted to \
    relay through this server. Perhaps you \
    have not logged into the pop/imap server in the \
    last 30 minutes or do not have SMTP Authentication turned on in your email client.

    ******

    cPanel.net Support Ticket Number:

  2. #2
    cPanel Partner NOC This forum account has been confirmed by cPanel staff to represent a vendor.cPanel Partner NOC Badge
    Join Date
    Nov 2001
    Location
    San Clemente, Ca
    Posts
    703

    Default

    try this

    rm -rf /home/demo/mail
    rm -rf /home/demo/etc
    mkdir /home/demo/mail
    mkdir /home/demo/etc
    chattr +ia /home/demo/mail
    chattr +ia /home/demo/etc

    i dont know for sure if that will work but give it a shot. also you may want to

    echo > /etc/proftpd/demo
    chattr +ia /etc/proftpd/demo


    REMEMBER DEMO is just the username i choose if you demo account has the username cpdemo you would replace demo with cpdemo

    cPanel.net Support Ticket Number:
    Shaun Reitan
    NDCHost.com - cPlicensing.net - ProVPS.com
    Contact us for your cPanel Licensing needs! We Price Match, We provide Support, We take care of our customers!

  3. #3
    Member Hispalab's Avatar
    Join Date
    Apr 2003
    Location
    Madrid -Spain
    Posts
    85

    Default

    Delete demo accounts because your demo user is authenticated on exim for send spam.
    Luis Miguel.

  4. #4
    Member
    Join Date
    Jun 2003
    Posts
    11

    Default

    Hey Shaun,

    Do you think that just removing the mail directory all togeter would be enough? I mean the problem is that they are using the demo account to spam. What if you just simply removed it all togher? That way it woulnd't be able to verify?

    I'm not all that into mail management, though if it goes to look up the username and password for mail when they try to auth, wouldn't it not work?

    Or how about trying to simply place a random hash of a password to other then demo in demo's mail file? That would fail the auth when mail is attmpted to be sent.

    Just throwing ideas around because I'm being nailed with the same problem.

    Cheers,
    Robby
    http://www.luvs.org

  5. #5
    Member
    Join Date
    May 2003
    Location
    blah
    Posts
    16

    Default

    this patch fixes it:


    BEGIN PATCH (copy and paste the below into mailpatch):
    529a530,532
    > if(isdemo($uid)) {
    > die "demo accounts are not permitted to relay mail [$uid]";
    > }
    END PATCH


    how to do it :

    1.create file mailpatch
    2.copy+paste the above into the file
    2. execute:
    patch /etc/exim.pl < mailpatch


    After that exim will not let demo account authenticate via SMTP . This worked for me very well.



    Good luck :-)


    -Gregg

  6. #6
    Member cass's Avatar
    Join Date
    Jul 2002
    Location
    Argentina/USA/Mexico
    Posts
    354

    Default

    Okey...
    I've a serios spam problem on a client server...
    is there a way to configure exim to NOT RELAY
    so... that the FROM: could only contain a domain in the server.

    cause... once autenticated... (ie a normal user) ... mails using any email address could be sent (ie all this new viruses around).
    So, I want to configure this server so that only the local_domains can send mail (the FROM ... yes to any address.

    Also... an optional configuration where autenticated users could only send email using their OWN domain(s) only (main + addons, etc) , could be also good to know.

    Regards
    Carlos Ariel Sepúlveda
    CAS company :: 1997-2011, 14 Years! :: Dedicated Attitude
    http://www.cascompany.com :: Providing CPANEL/WHM Servers since 2002 !

  7. #7
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    If you stop the antirelayd process you will effectively stop POP before SMTP which should suit your needs. Users will then only be able to relay email through the server using SMTP AUTH. Remember to empty out /etc/relayhosts too.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  8. #8
    Member
    Join Date
    May 2003
    Posts
    47

    Default Can you explain better how do this this patch

    Can you explain better how do this this patch. Step by step please.

  9. #9
    Member cass's Avatar
    Join Date
    Jul 2002
    Location
    Argentina/USA/Mexico
    Posts
    354

    Default

    Now, let me ask again on another way ...

    I want that ONLY localdomains be relayed on the server, I want to block any other domain to be relayed on the server.
    The pop before smtp is okey... the problem is that someone could auth with their account... and then send out spam using ANY DOMAIN, I want this to be localdomains only.
    On the other side... the scripts... can send emails using any domain... I hate this! is there a way to also block if the from: domain is not on localdomains?

    Regards.
    Carlos Ariel Sepúlveda
    CAS company :: 1997-2011, 14 Years! :: Dedicated Attitude
    http://www.cascompany.com :: Providing CPANEL/WHM Servers since 2002 !

  10. #10
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    You'd probably better off asking this on the exim mailing list as they're mor likely able to point you in the right direction.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  11. #11
    Member
    Join Date
    May 2003
    Location
    blah
    Posts
    16

    Default

    Quote Originally Posted by boyforeigner
    Can you explain better how do this this patch. Step by step please.

    it's simple: exim.pl has a bug that allows demo accounts to be used to send emails this just adds couple of lines of code to check if it's a demo account before letting it send emails.

Similar Threads & Tags
Similar threads

  1. why is my exim an open relay??
    By corey_s in forum cPanel and WHM Discussions
    Replies: 11
    Last Post: 10-31-2006, 07:08 AM
  2. Exim might be a Open Relay
    By CCorderoR in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 04-04-2004, 08:30 PM
  3. Exim 280 and below is open relay!
    By sexy_guy in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 08-15-2003, 10:23 PM
  4. Are you open relay with EXIM? Yes you are.
    By pirania1 in forum cPanel and WHM Discussions
    Replies: 58
    Last Post: 06-06-2003, 05:41 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube