Skip to main content

How to add SMTP A record to all domains

Comments

12 comments

  • quietFinn

    What is a SMTP A record?

     

    0
  • rhm.geerts

    OMG, you are an admin? I hope not.

    An SMTP A record is a DNS A record for SMTP, just like you have A record for mail and (also missing in cpanel) pop and (also missing) imap.

     

    0
  • cPRex Jurassic Moderator

    I also am not familiar with that specific record.

    Besides that issue, any adjustments made to the templates are not retroactive to existing zones - you'd need to manually add the record to each zone on the server.  Your best option is likely this call:

    https://api.docs.cpanel.net/openapi/cpanel/operation/dns-mass_edit_zone/

    but remember that you also need to modify or increment the serial number of each zone as well.

    0
  • cPRex Jurassic Moderator

    rhm.geerts - quietFinn is a long-time and well-respected member of this community and he asked a completely valid question.  Let's all play nice.

    1
  • rhm.geerts

    cPRex I didn't mean to be rude, sorry if it's experienced like that. I also see you are not familiar with that record.

    To me that is very odd, because everybody knows what smtp is. And everybody in fact should know that this record is basically used with email services for the outgoing mailserver. Most ISP's are using this and for example the biggest mailservices, Hotmail and Gmail are using these too for outgoing mail.

    You also are a well respected member and even moderator here, but  (and this really isn't ment rude) knowing the above (so smtp and a record), really amazes me that you also are not familiar with that record. Because every admin should know of this record because it's basic e-mail knowledge.

    Just like pop and imap records. So please don't blaim me wondering about this lack of knowledge on admin level

    I did play nice because I gave a decent explanation, I could also have given a rude answer (like look up what smtp is and what an a record is). But I gave the explanation because I did want to play nice as it could also be he was new in hosting.
    However as said, it's basic e-mail knowledge like the other records I mentioned.

     

    Now I'm not good at scripting. Is it possible you give me a line which will both change a record and update the serial?

    I've got something like this:

    perl -pi -e 's#^smtp\s14400\sIN\sA\s(.*)$#smtp\t14400\tIN\tA\t1.2.3.4#' *.db

    And I guess for ipv6 this would be:

    perl -pi -e 's#^smtp\s14400\sIN\sA\s(.*)$#smtp\t14400\tIN\tAAAA\tipv6.here#' *.db

    But seems these are wrong.

    I've found a command to update the serial. Just struggling with this still to bulk change.

    0
  • quietFinn

    And then you have to figure out how to change MX records to point to that.

    For emails to work you do not need such a "smtp A record".
    It is used in many places, but it's not required.

     

     

    0
  • cPRex Jurassic Moderator

    I'm not able to provide such commands over the Forum due to risk of data loss.

    0
  • rhm.geerts

    quietFinn In fact I don't have to change anything else.

    MX records point to incoming mail. SMTP point to outgoing mail.

    So if one wants to provide an smtp name (like smtp.domain.com next to mail.domain.com) for outgoing mail, the only thing required is either an smtp A record or CNAME record, nothing else.

    You're correct that an smtp record is not required, neither is a pop or imap record. I've never said that it's required. But it's much used and since loads of users do use gmail and/or hotmail, they don't read very well and just enter imap and smtp in their settings.
    So to us it's an extra service to the customer that they can just use what they are used to, so either imap or pop or mail combined with mail or smtp for outgoing mail.
    We just like to provide as much service to our customers as possible.

    cPRex Provided I would be using it on my own risk, would you be willing to provide such command via direct message?

    Also, would I need to add things like imap and smtp to the Letsencrypt config or will they just be added on the next update?

    0
  • cPRex Jurassic Moderator

    There is no direct messaging function through the Zendesk forum system.

    0
  • rhm.geerts

    Oh indeed... didn't see that. Any other way? Maybe email?

    0
  • cPRex Jurassic Moderator

    No - then other people will see this thread and see where I did custom work and the slippery slope just starts sliding.

    0
  • rhm.geerts

    Ok understandable.

    0

Please sign in to leave a comment.