Home>

Emails sent with PHP's mail command are judged as spam with a high probability.

It is another company that manages its own domain, and we use conoha to manage the website.
Mail server etc. will be managed by the company that manages the domain, and we can not be involved at all.
conoha's DNS sets A record and TXT record. (V = spf1 ip4: our server's IP -all)
I set up Postfix and set the domain to be a unique domain.

I can now reach gmail and work email addresses.
It means that it never reaches the client's email address. It ’s not spam.

Is there anything that can be done by setting something in the DNS on the client side?
Do you need any settings for DNS on my side?

It may be too little information, but if there is insufficient information, it will be supplemented more and more.

  • Answer # 1

    If you send mail directly from a public cloud server such as AWS or Azure, the IP may be blacklisted, so you are guided through SendGrid etc. It may be awake.
    However, if the domain management company comes out of the management mail server, I don't think that is the case, so the mail doesn't reach the other party. I feel that it is quick to find out the cause.
    I think the mail server is receiving a non-delivery report.
    Postfix just relays to the mail server of the domain management company, right?
    Maybe Postfix has received something, so if you look at the log, you may have something.

  • Answer # 2

    -The sending domain by the mail command has already been registered in the SPF record

    Then, as a procedure for carving out the survey,

    Check the mail log of the sending server and check whether it is relayed to the MX record of the destination domain.

    [When delivery to MX is successful] Since some processing is performed in the environment before MX, contact the mail administrator of the destination domain.

    [If delivery to MX has failed] Please describe the error that has occurred.

    For undeliverable email issues, if no clear error details can be confirmed
    Sending survey requests to the sending/receiving server administrator is the smartest and can be solved smoothly.

    [Supplement]
    When submitting a survey request to the administrator of the sending/receiving server
    ・ Sent mail address
    ・ Receiving mail address
    ・ Time of transmission attempt (up to "minute" if possible)
    I think that you can get a quicker answer.

  • Answer # 3

    Because the important Postfix settings are not written, it will be general, but for your reference
    Write assuming Postfix is ​​sending directly.

    DNS
    It is desirable to register so that there is no contradiction between the forward lookup of the FQDN that Postfix claims and the reverse lookup of the global IP.

    SPF record
    The receiving mail server queries the DNS of the envelope From address for the SPF record. For example, if the sender is [email protected], it is necessary to register the SPF record in the DNS of example.com.

    Disable SSL
    If you use old encryption such as SSLv2, v3, the other party may be rejected.

    Check if it is registered in RBL.
    If it is registered, it may be blocked by the RBL filter, so it is better to change the IP address.
    There are many RBLs all over the world, so it is a good idea to research on RBL search sites.

    DKIM
    Using DKIM will increase the reliability of your email.
    However, because it is not so popular, it is not essential and it is a more selective choice.

  • Answer # 4

    Thank you for your advice.
    After all, it was because the other party applied a very strong filter to the mail server.
    At present, no further measures can be taken, so the problem was solved by using Sendgrid.