The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How can I send a single email from the server? Command line?

Discussion in 'E-mail Discussions' started by lenashore, Jun 3, 2015.

  1. lenashore

    lenashore Member

    Joined:
    Feb 11, 2011
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    My server got on a blacklist yesterday. I found the offending problem and cleaned it up. So, now I am trying to get delisted. One of things I need to do is to send an email from the offending server with a special subject line provided for me:

    You must be able to send an e-mail with an verifycode from xxx.xx.xxx.xx to delist.
    I don't have any email accounts on this server. I do have some Wordpress sites that have email forms - but I don't know how to SEND an email to these guys. Clearly I could set up a form on a server to send mail and send it (the damn hackers do it) - but I was hoping there was more of a one-time solution... Maybe sending from the command-line somehow? Or is there an option to send a single mail from the WHM someplace?

    Any ideas? I am feeling a little dumb here.
     
  2. madmanmachines

    madmanmachines Well-Known Member

    Joined:
    Nov 28, 2014
    Messages:
    94
    Likes Received:
    3
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hi,

    You'll need to receive mail from the same address that you send the delist request from, so you should probably just create a temporary email account. As well, are you sure the RBL requires the delist request to be sent from the server?

    Thanks,
     
  3. lenashore

    lenashore Member

    Joined:
    Feb 11, 2011
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    It did say "from the IP it was listed". So, I'm inferring it needs to come from the server.

    I did find a possible solution from the command line a few minutes ago. I should know in a few hours if it worked. As if it worked, I should be delisted within 3 hours.

    Code:
    [root@tecadmin ~]# mail -s "Test Subject" user@example.com < /dev/null
    
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,774
    Likes Received:
    663
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    While it may work sending from the command line, is there any reason you can't create an email account for a domain name hosted on your server?

    Thank you.
     
  5. lenashore

    lenashore Member

    Joined:
    Feb 11, 2011
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    I suppose I could. There are no mail accounts at all on the server now. I guess I assumed if I made an account it would add extra software to the server. Also, all sites are set up to use outside mail servers. Would that matter? Maybe that is a non-issue?
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,774
    Likes Received:
    663
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    No extra software is installed as cPanel already includes email functionality. That being said, if the domain name resolves to a remote server and email is handled remotely, then it's likely a better idea to send the email as you did.

    Thank you.
     
  7. lenashore

    lenashore Member

    Joined:
    Feb 11, 2011
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the clarification on how it works. Much appreciated. So much to learn, but that can be fun.
     
Loading...

Share This Page