returned mail

Discussion in 'Installation/Configuration' started by chief, Oct 12, 2022.

  1. chief

    chief Member HowtoForge Supporter

    Hi,
    The from email is wrong.
    Mail Delivery System<[email protected]>
    I need to change this above. when failed mails are sent back.
    how and where please.. thanks

    When one of my clients wrongly types an [email protected] and it flies back saying who or what your sending to does not exits.. honest i looked it up gov!!!
    It replies back as the following
    Code:
    This is the mail system at host mail.tlsystems.co.uk.
    
    I'm sorry to have to inform you that your message could not
    be delivered to one or more recipients. It's attached below.
    
    For further assistance, please send mail to postmaster.
    
    If you do so, please include this problem report. You can
    delete your own text from the attached returned message.
    
                       The mail system
    
    <user@domain>: host
       .......] said: 550 5.4.1
        Recipient address rejected: Access denied. AS(201........)
        [...........] (in reply to RCPT TO
        command)
     
  2. pyte

    pyte Well-Known Member HowtoForge Supporter

    Check your hostname with "hostname -f" and check the /etc/postfix/main.cf
     
  3. chief

    chief Member HowtoForge Supporter

    yes and no.
    the hostname -f = mail.tlsystems.co.uk and the /etc/postfix/main.cf does also show myhostname = mail.tlsystems.co.uk
    my question again is..
    when an email is incorrectly written to someone and bounced back my mail server sends it to me as "Mail Delivery System <[email protected]>"
    I want to change this to my domain
     
  4. pyte

    pyte Well-Known Member HowtoForge Supporter

    In the main.cf what does the line "myorigin =" set? May set it to "myorigin = $mydomain"
     
  5. chief

    chief Member HowtoForge Supporter

    Thanks for reply..
    it states..
    Code:
    myorigin = /etc/mailname
    so, i should just update the contents of
    Code:
    /etc/mailname
    and put my hostname there, or is it better to have something
    Code:
    myorigin = $hostname
    or something like that?

    dave
     
    Last edited: Oct 18, 2022
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The line should be kept as it is. Which is:

    myorigin = /etc/mailname

    and /etc/mailname should contain the system hostname.
     
  7. chief

    chief Member HowtoForge Supporter

    Thanks till,
    to confirm, it just stated mail.example.tld.. so i should go ahead and alter the text for mail.tlsystems.co.uk
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    mail.example.tld is the hostname of your server? If yes, then the above is as it should be.
     
  9. chief

    chief Member HowtoForge Supporter

    Thanks till,
    to confirm, it just stated mail.example.tld.. so i should go ahead and alter the text for mail.tlsystems.co.uk
     
  10. Anderson Silvestre

    Anderson Silvestre New Member

    Hi, Chief I'm having the same problem but I saw something about the PTR. Do you know how to configure it, or is this the problem?
    Thank you.
     
  11. chief

    chief Member HowtoForge Supporter

    Hey,
    No problem
    My ISP assigned my a batch of 16 IP's, i email their relevent dept with the required hostname of the server and the IP i am assigning it. They update their end and usually 24 hrs it all done.
    To verify your PTR record us mxtoolbox.com, type a domain and then click MXlookup, ignore this, then type your server IP in box choose REVERSE lookup and search.
    It should give you a table with 3 entries, test type, IP and hostname returned.
    You have to get your ISP to update this, as they control the dns entries and its only them who can alter it.
     
  12. Anderson Silvestre

    Anderson Silvestre New Member

    Thanks for the answer. But how can I make this? I do it manually or the ISP takes it automatically? Because in the MXlookup my Reverse DNS is pointing to another domain.
    I think this could be the cause of the errors.
     
  13. Nyx_

    Nyx_ Member

    PTR Records (aka Reverse DNS) are usually maintained by the ISPs. You'll probably need to contact them to have the PTR record attributed correctly.
     

Share This Page