Problem with smtpd_sender_login_maps.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Problem with smtpd_sender_login_maps.

Rafał Radecki
Hi all.

I have a problem with proper configuration of smtpd_sender_login_maps. I think i don't understand correctly what should be inside the hash file from smtpd_sender_login_maps. I use this parameters:

smtpd_sender_login_maps = hash:/etc/postfix/files/sender_login_maps

smtpd_sender_restrictions =
        permit_mynetworks
        reject_sender_login_mismatch
        permit_sasl_authenticated
        reject_unauth_pipelining
        reject_non_fqdn_sender
        reject_unknown_sender_domain
        #reject_sender_login_mismatch
        #check_sender_access hash:/etc/postfix/files/sender_checks
        permit

I would like to permit connections only when login (for example 'test' system account) equals 'mail from:<[hidden email]>'. I put inside the mentioned file:

test          test

and later (when the above hasn't worked)

[hidden email]         test

and used postmap. When I try to make a connection using telnet the

'auth plain xxx'
(I used user test and his password 'password' to generate 'xxx' with 'perl -MMIME::Base64 -e 'print encode_base64("\000test\000password")'')

gives

'235 2.0.0 Authentication successful'


so user test is authenticated properly but mail from:<[hidden email]> gives

'553 5.7.1 <[hidden email]>: Sender address rejected: not owned by user [hidden email]'.

Could anyone help? Is there a way to use a regular expression inside /etc/postfix/files/sender_login_maps so that with one line (or more ;)) all my user (system in this configuration) accounts must authenticate using THEIR (not ANY CORRECT) user/password pair?

What should be inside /etc/postfix/files/sender_login_maps to allow user 'test' to send mail with his user/password pair when $mydestination for example has two domains (my_domain.something, my_domain.other) and I would like to permit this user to use:

mail from:<[hidden email]>

and

mail from:<[hidden email]>

with one user/password pair? (test/password)

I currently get a lot of spam from and to my system users authenticated with NOT THEIR user/password pairs so I think that smtpd_sender_login_maps could be very helpful.

Thank you for your help ;)

With regards,
R.