1 of 3
willdanceforfun
  • 557
  • 3
  • 11
  • 24

SASL PLAIN authenticating with primary domain, but not with virtual domain

Postfix + dovecot and sasl. Works so far with 1 domain.

Added a virtual domain. Incoming mail for this works. Outgoing however has SASL authentication failing.

Why does it fail I don't know.

/etc/sasl2/smtpd.conf looks like:

pwcheck_method: auxprop
auxprop_plugin: sasldb
mech_list: PLAIN LOGIN

postconf -n output:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 40960000
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain
mydomain = primary.net
myhostname = mail.primary.net
myorigin = $myhostname
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
relay_domains = $mydestination, primary.net, seconddomain.org
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_client_restrictions = permit_sasl_authenticated
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_helo_required = yes
smtpd_helo_restrictions = reject_non_fqdn_hostname
smtpd_recipient_restrictions = permit_sasl_authenticated,   
                               permit_mynetworks,        
                               reject_invalid_hostname,        
                               reject_unauth_pipelining,    
                               reject_unauth_destination,   
                               reject_rbl_client sbl-xbl.spamhaus.org,              
                               permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = reject_unknown_sender_domain
soft_bounce = no
unknown_local_recipient_reject_code = 550
virtual_alias_domains = mail.seconddomain.org
virtual_alias_maps = hash:/etc/postfix/virtual

The virtual alias domain works. But when I'm trying to authenticate with a virtual domain maillog throws the error:

 SASL PLAIN authentication failed

Any ideas what I should look at?

willdanceforfun
  • 557
  • 3
  • 11
  • 24