local data error while talking to smtp

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

local data error while talking to smtp

luistkd4
Hi in postfix I have this configuration in main.cf:

smtp_sender_dependent_authentication = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = mysql:/etc/postfix/sender_passwd.cf
relayhost = [smtp.sendgrid.net]:587
smtp_sasl_security_options = noanonymous

/etc/postfix/sender_passwd.cf:
user = user
password = pass
hosts = host
dbname = db
query = SELECT CONCAT(email,":",key) FROM users WHERE email = '%s';

In mysql I have unlimited connections, but postfix open +- 10.

When I try make a stress test I can send many message but in certain moment
I have this error:

ar  8 11:06:22 UBMSASENDWEB01 postfix/smtp[5589]: warning: 5D8EC1400CC:
*smtp_sasl_password_maps lookup error*
Mar  8 11:06:22 UBMSASENDWEB01 postfix/smtp[5589]: 5D8EC1400CC: *local data
error while talking to smtp.sendgrid.net[108.168.183.160]*
Mar  8 11:06:23 UBMSASENDWEB01 postfix/smtp[5589]: warning: 5D8EC1400CC:
smtp_sasl_password_maps lookup error
Mar  8 11:06:23 UBMSASENDWEB01 postfix/smtp[5589]: 5D8EC1400CC:
to=<[hidden email]>, relay=smtp.sendgrid.net[167.89.123.53]:587, delay=6,
delays=0.07/0/5.9/0, dsn=4.3.0, status=*deferred (local data error while
talking to smtp.sendgrid.net[167.89.123.53])*

What can be this? My load is 0.15

Thanks




--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
Reply | Threaded
Open this post in threaded view
|

Re: local data error while talking to smtp

Viktor Dukhovni


> On Mar 8, 2018, at 9:25 AM, luistkd4 <[hidden email]> wrote:
>
> When I try make a stress test I can send many message but in certain moment
> I have this error:
>
> Mar  8 11:06:22 UBMSASENDWEB01 postfix/smtp[5589]: warning: 5D8EC1400CC:
> *smtp_sasl_password_maps lookup error*
>
> What can be this?

It is a lookup error in the MySQL database.  No further information is
available from what you posted.  Everything else is a consequence of
the lookup error.

--
        Viktor.


Reply | Threaded
Open this post in threaded view
|

Re: local data error while talking to smtp

Wietse Venema
In reply to this post by luistkd4
luistkd4:
> Hi in postfix I have this configuration in main.cf:
>
> smtp_sender_dependent_authentication = yes
> smtp_sasl_auth_enable = yes
> smtp_sasl_password_maps = mysql:/etc/postfix/sender_passwd.cf

Use proxymap:mysql:/etc/postfix/sender_passwd.cf. Do the same
thing with all mysql, ldap, and pgsql tables.

With all but the latest Postfix versions you will need to update
the proxy_read_maps setting; until recently it was missing
smtp_sasl_password_maps and some 20 other things.

The corrected setting is below.

        Wietse

proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps
    $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains
    $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps
    $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks
    $smtpd_sender_login_maps $sender_bcc_maps $recipient_bcc_maps
    $smtp_generic_maps $lmtp_generic_maps $alias_maps $smtpd_client_restrictions
    $smtpd_helo_restrictions $smtpd_sender_restrictions
    $smtpd_relay_restrictions $smtpd_recipient_restrictions
    $address_verify_sender_dependent_default_transport_maps
    $address_verify_sender_dependent_relayhost_maps
    $address_verify_transport_maps $fallback_transport_maps
    $lmtp_discard_lhlo_keyword_address_maps $lmtp_pix_workaround_maps
    $lmtp_sasl_password_maps $lmtp_tls_policy_maps $mailbox_command_maps
    $mailbox_transport_maps $postscreen_discard_ehlo_keyword_address_maps
    $rbl_reply_maps $sender_dependent_default_transport_maps
    $sender_dependent_relayhost_maps $smtp_discard_ehlo_keyword_address_maps
    $smtp_pix_workaround_maps $smtp_sasl_password_maps $smtp_tls_policy_maps
    $smtpd_discard_ehlo_keyword_address_maps $smtpd_milter_maps
    $virtual_gid_maps $virtual_uid_maps

Reply | Threaded
Open this post in threaded view
|

Re: local data error while talking to smtp

luistkd4
I tried using hash to test and I created a postmap -q in loop to teste
connecty:
i=0;while ($true); do postmap -q [hidden email]
hash:/etc/postfix/test.cf; i=$((i+1)); echo $i;done



Inside test.cf:
[hidden email] [hidden email]:123qwe!@#QWE

This connect sucesfull without error.

When I try " i=0;while ($true); do postmap -q [hidden email]
mysql:/etc/postfix/sender_passwd.cf; i=$((i+1)); echo $i;done"

This work too, but sometimes freezes for a seconds and after my while
continues.
Likewise I going update the proxy_read_maps.
Thanks.




--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
Reply | Threaded
Open this post in threaded view
|

Re: local data error while talking to smtp

luistkd4
Hi everyone the error is in the my.cnf with the following parameter:
init_connect='SET wait_timeout = 30'

Thanks!



--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html