Hello.
I configured the postfix mail server according to the Postfix + Dovecot + Postfixadmin instructions .

I did everything as described there. Mail is accepted. And if you send from localhost , through the site, then the mail is sent. Problems only when mail from mail programs goes.

How do I solve this problem?
Thank.

  • When sending by the client, what does he write as an error? - ArcherGodson
  • on the server execute_netstat -ntupl_ - ArcherGodson
  • [root@spendhunters ~]# netstat -ntupl netstat: illegal option -- t - Oleg Zagorodni
  • sorry)) bsd etzh then sockstat -l - ArcherGodson
  • and here: postconf | grep my - ArcherGodson

3 answers 3

№1. Why in the config:

 myhostname = mail.spendhunters.ru 

although it seems to me to be:

 myhostname = spendhunters.ru 

№2. How much

 # nslookup -type=mx spendhunters.ru ns5.ukrdns.bizServer: ns5.ukrdns.bizAddress: 78.109.16.107#53spendhunters.ru mail exchanger = 9 spendhunters.ru. 

although it should be:

 spendhunters.ru mail exchanger = 9 mail.spendhunters.ru. 
  • I tried spendhunters.ru and mail.spendhunters.ru did not help - Oleg Zagorodni
  • let's try it as it should (described above), then it will be clear from the errors what is wrong. - ArcherGodson
  • and, of course, as admin.hashcode.ru/users/1439/jaur and from postconf smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination said, it’s obvious that mynetworks is first resolved, then sasl_authenticated is released, then it is unctuated, unasable, mynetworks are resolved, then sasl_authenticated, then are restitted, unctv, unacted, etc. From this it follows that the one from whom the letters are not accepted for sending is either not in mynetworks, or is not sasl-authenticated. - ArcherGodson

In the postfix settings, check the mynetworks parameter and specify the range of addresses from which you can send.

    Hello. Postfix, like almost any other MTA (Exim, Exchange, etc.) allows you to use yourself as, in most cases, in two cases:

    1. the client has an IP address from the subnet specified in mynetworks;
    2. The client has been authenticated.

    When sending mail using an email client, password authentication is typically used. As far as I know Postfix allows you to use two SASL implementations for authentication - Cyrus and Dovecot. In the article, the link you provided is used by Dovecot SASL. One of the possible reasons for not sending mail is that the client does not pass authentication, or the MTA provides authentication methods that are not supported by the mail client. To solve the problem, I recommend that you perform several checks:

    1. Since Dovecot SASL is used for authentication, check the authentication capability using the built-in dovecot tools:

      doveadm auth login password

    2. If authentication with doveadm was successful, the cause of the error, in most cases, can be found in the log, as a rule, is / var / log / maillog. For diagnostics, it is better to use the simplest possible means (an email client is not), for example, nc. Cling to the server log with tail:

      tail -f / var / log / maillog

    And send with nc a test letter (by day from the many howto on the Net). If you cannot identify the cause of the problem yourself, post the session log in a comment to this letter.