Prev: adding header to outgoing mail
Next: recipient_bcc_maps
From: Israel Garcia on 29 Apr 2010 08:09 Hi, I'm sending all emails to a relayhost with a TLS connection , but I want to send mail to specific domain using another hosts. I mean: * --> [smtp.tls.host]:587 (TLS) and *@domain1 smtp:[host1] *@domain2 smtp:[host2] This is postconf -n output: alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no config_directory = /etc/postfix header_size_limit = 4096000 inet_interfaces = localhost inet_protocols = ipv4 mailbox_size_limit = 0 mydestination = server.domain, localhost.domain, , localhost, xx.xx.xx.xx/24 reject myhostname = server.domain mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 myorigin = /etc/mailname readme_directory = no recipient_delimiter = + relayhost = [smtp.tls.host]:587 smtp_host_lookup = native,dns smtp_sasl_auth_enable = yes smtp_sasl_password_maps = static:login:userpasswd smtp_sasl_security_options = noanonymous smtp_tls_security_level = may smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) transport_maps = hash:/etc/postfix/transport transport_maps file *@domain1 smtp:[host1] *@domain2 smtp:[host2] But all mail is sent through [smtp.tls.host] and transport_maps is not working. I want to sent all mail to *@domain1 and *@domain2 to their servers as transport_maps says, but teh rest through the relayhost. What am I missing? thanks in advance. -- Regards; Israel Garcia
From: Wietse Venema on 29 Apr 2010 08:22 Israel Garcia: > Hi, > > I'm sending all emails to a relayhost with a TLS connection , but I > want to send mail to specific domain using another hosts. I mean: As documented, the transport_maps setting overrides the relayhost setting, so you are on the right track: relayhost = [smtp.tls.host]:587 transport_maps = hash:/etc/postfix/transport > *@domain1 smtp:[host1] > *@domain2 smtp:[host2] The syntax for transport maps is documented: man 5 transport. Please take a minute to read the docs. Wietse
From: Israel Garcia on 29 Apr 2010 09:03 On Thu, Apr 29, 2010 at 2:22 PM, Wietse Venema <wietse(a)porcupine.org> wrote: > >> Â *@domain1 smtp:[host1] >> Â *@domain2 smtp:[host2] > > The syntax for transport maps is documented: man 5 transport. Please > take a minute to read the docs. :-) working now.. but I'm getting this error when try to connect with the servers defined on transport file: Apr 29 08:31:49 server postfix/smtp[25835]: 270101CE0C: to=<israel(a)domain1>, relay=host1[xx.xx.xx.xx]:25, delay=545, delays=545/0.02/0.09/0, dsn=4.7.0, status=deferred (SASL authentication failed; server host1[xx.xx.xx.xx] said: 535 5.7.0 Error: authentication failed: authentication failure) transport file: domain1 smtp:[host1] domain2 smtp:[host2] thanks Wietse regards Israel. > > Â Â Â Â Wietse > -- Regards; Israel Garcia
From: Wietse Venema on 29 Apr 2010 10:01 Israel Garcia: > On Thu, Apr 29, 2010 at 2:22 PM, Wietse Venema <wietse(a)porcupine.org> wrote: > > > >> ?*@domain1 smtp:[host1] > >> ?*@domain2 smtp:[host2] > > > > The syntax for transport maps is documented: man 5 transport. Please > > take a minute to read the docs. > > :-) working now.. > > but I'm getting this error when try to connect with the servers > defined on transport file: > > Apr 29 08:31:49 server postfix/smtp[25835]: 270101CE0C: > to=<israel(a)domain1>, relay=host1[xx.xx.xx.xx]:25, delay=545, > delays=545/0.02/0.09/0, dsn=4.7.0, status=deferred (SASL > authentication failed; server host1[xx.xx.xx.xx] said: 535 5.7.0 > Error: authentication failed: authentication failure) > > transport file: > domain1 smtp:[host1] > domain2 smtp:[host2] With help from Patrick Koetter there is a newly revised SASL_README document at http://www.postfix.org/SASL_README.html In your case, it seems that Postfix tries to authenticate with the wrong username or password. Wietse
From: Israel Garcia on 29 Apr 2010 11:21
>> >> Apr 29 08:31:49 server postfix/smtp[25835]: 270101CE0C: >> to=<israel(a)domain1>, relay=host1[xx.xx.xx.xx]:25, delay=545, >> delays=545/0.02/0.09/0, dsn=4.7.0, status=deferred (SASL >> authentication failed; server host1[xx.xx.xx.xx] said: 535 5.7.0 >> Error: authentication failed: authentication failure) >> >> transport file: >> domain1 smtp:[host1] >> domain2 smtp:[host2] > > With help from Patrick Koetter there is a newly revised SASL_README > document at http://www.postfix.org/SASL_README.html > > In your case, it seems that Postfix tries to authenticate with the > wrong username or password. Yes, but it should not authenticate with this server. In my scenario, all email is sent to the relayhost using TLS without problem. The problem comes when I send email to a non-authenticated server (a server on transport_maps). It seems my main.cf is setup to send mail ONLY using TLS. I need to be able to sent mail in both ways. thanks Wietse. regards, Israel. > > Â Â Â Â Wietse > -- Regards; Israel Garcia |