Skip to main content

VPS WHM/cPanel setup - Emails - Default address, etc.

Comments

12 comments

  • cPanelMichael
    Hello :) It sounds like the domain name's MX records may not yet point to your VPS. I recommend setting up name servers at your registrar and using those instead of entering custom DNS records. Thank you.
    0
  • cvsouth
    Hi Michael thanks for your response I set up private name server (I think). I removed the add-on domains, removed DNS records from the VPS host, allowed shared nameserver IPs in tweak settings, set up and my one IP to the new nameservers ns1.mydomain.com and ns2.mydomain.com rather than ns0, ns1 and ns2.vpsdomain.com. I updated the nameservers for the domain from the domain registrar and re-added them as add-on domains in cPanel which worked. I was hoping that emails would just start working after this but no luck. What I have noticed though is that once I remove the DNS records from the VPS provider for the domain, when I try to send emails to something@mydomain.com I don't get an undelivered report anymore, but I also don't receive the email (it is set up with a default address forwarding to my gmail). So now it is like the email is lost completely. Another things I've found out is that if I create an email account in cPanel, a) every account has all the emails on the server from the beginning of time and b) if I try to send an email through it, it says From address is invalid which is 'accountname@', so clearly something wrong there. Could this be a clue? Are there any troubleshooting things I can do? Or are there any common things that I have missed completely? Sorry for the long winded question
    0
  • cvsouth
    I've been fiddling around with things, When in cPanel I set the 'Default address' for a domain to 'Discard with error to sender (at SMTP time)', that works. ...But when I set it to forward to another email address, no luck. So it seems like the email reaches the server because it is able to reject it with a custom message; but not able to forward it/send emails? Anyone have any ideas?
    0
  • cPanelMichael
    Do you notice any output to /var/log/exim_mainlog or /var/log/exim_reject log when you configure it to forward to another email address. Is the other email address a local or remote address? Thank you.
    0
  • cvsouth
    I set it to reject in cPanel and then sent an email, in /var/log/exim_rejectlog I have this: 2013-11-22 21:12:06 H=mail-lb0-f175.google.com [209.85.217.175]:47247 F= rejected RCPT : My custom reject message
    I then changed it to forward to myemail@gmail.com instead of rejecting, and in /var/log/exim_mainlog I have this: 2013-11-22 21:16:42 SMTP connection from [209.85.215.53]:44949 (TCP/IP connection count = 1) 2013-11-22 21:16:43 SMTP connection identification D=mydomain.com O=bbb@mydomain.com E=myemail@gmail.com M= U=myaccount ID=500 B=redirect_resolver 2013-11-22 21:16:43 1Vjy5j-0000p9-Ls <= myemail@gmail.com H=mail-la0-f53.google.com [209.85.215.53]:44949 P=esmtps X=TLSv1:RC4-SHA:128 S=1722 id=CAJF2zdDTLZVe+5_+43THwsTYZOtr_2Zk3pn3Kmv5e0ENPzq1zg@mail.gmail.com T="" for bbb@mydomain.com 2013-11-22 21:16:43 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1Vjy5j-0000p9-Ls 2013-11-22 21:16:43 1Vjy5j-0000p9-Ls SMTP connection identification D=mydomain.com O=bbb@mydomain.com E=myemail@gmail.com M=1Vjy5j-0000p9-Ls U=myaccount ID=500 B=redirect_resolver 2013-11-22 21:16:43 1Vjy5j-0000p9-Ls SMTP connection outbound 1385155003 1Vjy5j-0000p9-Ls mydomain.com myemail@gmail.com 2013-11-22 21:16:43 SMTP connection from mail-la0-f53.google.com [209.85.215.53]:44949 closed by QUIT 2013-11-22 21:16:44 1Vjy5j-0000p9-Ls => myemail@gmail.com R=lookuphost T=remote_smtp H=gmail-smtp-in.l.google.com [173.194.67.26] X=TLSv1:RC4-SHA:128 C="250 2.0.0 OK 1385155005 g2si901903wiw.8 - gsmtp" 2013-11-22 21:16:44 1Vjy5j-0000p9-Ls Completed
    The email I'm trying to forward it to is my regular gmail
    0
  • cvsouth
    Still struggling with this, any ideas?
    0
  • cvsouth
    Here is some more info: When setting a default address, when set up to reject the email with a message in cPanel, that works fine. But when set to forward to an email address (gmail) the email just goes missing (see above). I did an 'SMTP test' online and this was the results: [QUOTE]Connecting to 220-server.mydomain.com ESMTP Exim 4.82 #2 Fri, 29 Nov 2013 15:54:51 +0000 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail. [1513 ms] EHLO MXTB-PWS3.mxtoolbox.com 250-server.mydomain.com Hello mxtb-pws3.mxtoolbox.com [64.20.227.133] 250-SIZE 52428800 250-8BITMIME 250-PIPELINING 250-AUTH PLAIN LOGIN 250-STARTTLS 250 HELP [780 ms] MAIL FROM: 250 OK [780 ms] RCPT TO: 550-Please turn on SMTP Authentication in your mail client. 550-mxtb-pws3.mxtoolbox.com [64.20.227.133]:56547 is not permitted to relay 550 through this server without authentication. [1654 ms] MXTB-PWS3v2 6178ms
    This part would seem to be the important part: [QUOTE]550-Please turn on SMTP Authentication in your mail client. 550-mxtb-pws3.mxtoolbox.com [64.20.227.133]:56547 is not permitted to relay 550 through this server without authentication. [1654 ms]
    I don't know how to fix it though, any suggestions?
    0
  • cPanelMichael
    Have you checked to ensure the domain name is listed in the /etc/localdomains file on this system? Thank you.
    0
  • cvsouth
    The domain is listed, yeah
    0
  • cvsouth
    Done some more digging If I set up an email account in cPanel then I can send and receive emails through it as expected, so it would appear that the DNS and MX records are all ok and that exim is working properly? mydomain.com is listed in /etc/localdomains I checked in /etc/valiases/mydomain.com and it has the following: [QUOTE]*: myemail@gmail.com
    Which also shows up when I run the Mail Troubleshooter in WHM for something@mydomain.com So it all appears to be set up properly When I send an email to something@mydomain.com, expecting it to be forwarded to myemail@gmail.com via the default address, it just never arrives.. In /var/log/exim_mainlog I get: [QUOTE]2013-12-08 13:48:41 SMTP connection from [209.85.215.44]:37155 (TCP/IP connection count = 1) 2013-12-08 13:48:43 SMTP connection identification D=mydomain.com O=something@mydomain.com E=myemail@gmail.com M= U=myaccount ID=500 B=redirect_resolver 2013-12-08 13:48:44 1Vpeiy-00008i-2n <= myemail@gmail.com H=mail-la0-f44.google.com [209.85.215.44]:37155 P=esmtps X=TLSv1:RC4-SHA:128 S=1728 id=CAJF2zdBcSpu1DBAJSDRoL2dWCZWp_vcQnKXY-Hkt2K8W1NRThw@mail.gmail.com T="subject" for something@r$ 2013-12-08 13:48:44 SMTP connection from mail-la0-f44.google.com [209.85.215.44]:37155 closed by QUIT 2013-12-08 13:48:44 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1Vpeiy-00008i-2n 2013-12-08 13:48:44 1Vpeiy-00008i-2n SMTP connection identification D=mydomain.com O=something@mydomain.com E=myemail@gmail.com M=1Vpeiy-00008i-2n U=myaccount ID=500 B=redirect_resolver 2013-12-08 13:48:44 1Vpeiy-00008i-2n SMTP connection outbound 1386510524 1Vpeiy-00008i-2n mydomain.com myemail@gmail.com 2013-12-08 13:48:45 1Vpeiy-00008i-2n => myemail@gmail.com R=lookuphost T=remote_smtp H=gmail-smtp-in.l.google.com [173.194.67.26] X=UNKNOWN:ECDHE-RSA-AES128-GCM-SHA256:128 C="250 2.0.0 OK 1386510526 q19si26$ 2013-12-08 13:48:45 1Vpeiy-00008i-2n Completed
    Any ideas? This is so frustrating Thanks
    0
  • cvsouth
    I just found out that it's only when I use the same email that it should be forwarded to, as the original sender, that it doesn't work. Is there any reason why it wouldn't do a round journey like that?
    0
  • cPanelMichael
    [quote="cvsouth, post: 1524572">I just found out that it's only when I use the same email that it should be forwarded to, as the original sender, that it doesn't work. Is there any reason why it wouldn't do a round journey like that?
    Could you provide an example of this? Thank you.
    0

Please sign in to leave a comment.