Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In my test postfix server I have configured SASL auth and "reject_authenticated_sender_login_mismatch". My problem is that I would like to use alias on authenticated user, but I don't know how to do it.

# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = amavisd-new:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
disable_vrfy_command = yes
header_checks = pcre:/etc/postfix/header_checks
html_directory = no
inet_interfaces = localhost, 192.168.66.98
inet_protocols = all
local_recipient_maps =
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = test-test.com
mynetworks = 192.168.66.0/24, 127.0.0.0/8
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 mysql:/etc/postfix/relay_domains
relayhost =
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_client_restrictions = reject_unauth_pipelining,   permit_sasl_authenticated,      reject_rbl_client zen.spamhaus.org      reject_rbl_client bl.spamcop.net        reject_rbl_client psbl.surriel.com   reject_rbl_client combined.rbl.msrbl.net
smtpd_delay_reject = yes
smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:10031
smtpd_helo_required = yes
smtpd_recipient_restrictions = check_policy_service inet:127.0.0.1:10031,       permit_sasl_authenticated,      reject_unauth_destination,      reject_unverified_recipient,    reject_invalid_hostname,        permit_mynetworks,   reject
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_path = smtpd
smtpd_sasl_security_options = noanonymous
smtpd_sender_login_maps = ldap:/etc/postfix/sender_maps
smtpd_sender_restrictions = reject_authenticated_sender_login_mismatch, permit_sasl_authenticated
soft_bounce = no
transport_maps = hash:/etc/postfix/transport ldap:/etc/postfix/perditionMailhost_ldap
unknown_local_recipient_reject_code = 550
virtual_alias_maps = ldap:/etc/postfix/virtual

# cat /etc/postfix/sender_maps
server_host = ldap://ldap1-1.test-test.com:1389
version = 3
search_base = ou=mymensajes,ou=pre_testcontext,dc=org
scope = sub
query_filter = (mail=%s)
result_attribute = cn
ldap_bind = no
result_filter = %s

# cat /etc/postfix/virtual
server_host = ldap1-1.test-test.com:1389
version = 3
search_base = ou=mymensajes,ou=pre_testcontext,dc=org
scope = sub
query_filter = mail=%s
result_attribute = cn
ldap_bind = no
result_filter = %s

Thanks.

share|improve this question
    
What do You mean by alias on authenticated user? Did You mean that You want to assign several e-mail addresses to one user? –  Alan Kuras Jun 19 '12 at 10:56
    
yes! an auth user is user1@domain.com but also has the alias superuser@domain.com. So, autenticated as user1@domain.com also can send as superuser@domain.com. –  magiza83 Jun 19 '12 at 11:45
    
that's what I've configured, in main.cf the last line, and it use an ldap lookup table that provides the "main address". But it does not work. Or maybe I've done it wrong... –  magiza83 Jun 19 '12 at 13:30
    
the content of /etc/postfix/virtual is in the main post. It is a ldap search, and the search works ok if I use: "postmap -q alias@domain.com ldap:/etc/postfix/virtual". –  magiza83 Jun 20 '12 at 10:31
    
remove reject_authenticated_sender_login_mismatch and try without this if its working –  Alan Kuras Jun 20 '12 at 10:41
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.