Simon Wilson:
> A quick query on?smtpd_sender_login_maps format.
> 
> I have this working well on port 587 to ensure that specified  
> SASL-authenticated users only can send emails from their owned email  
> addresses.
> 
> So I have in a file 'controlled_envelope_senders' this, as an example:
> 
>   @simonandkate.net               simon
> 
> ...and I have reject_sender_login_mismatch set in master.cf for port  
> 587. Then in main.cf:
> 
>   smtpd_sender_login_maps = hash:/etc/postfix/controlled_envelope_senders
> 
> Perfect...
> 
> I am disabling a couple of email addresses as a first step along the  
> way to deleting some accounts and domain names. I've disabled inbound  
> emails fine, and now need to prevent the users sending, while still  
> being able to access webmail for a few days.
> 
> 
> The question:
> 
> Within the smtpd_sender_login_maps file, is an empty RH side valid so  
> *NO* SASL users can send from that (domain) address? Or does it need  
> to have *something* on the RHS?

Maps can't return an empty result but you have other options:

1) Return a bogus login name. This is perhaps the easiest.

2) Return 'not found'. When you use a pcre map instead of hash, you
   have negative patterns, IF/ELSE/ENDIF.
   See http://www.postfix.org/pcre_table.5.html. This will not
   search by "@domain" use bare "user", only with the full sender
   address.

        Wietse

Reply via email to