[Dovecot] User login for SMTP but not for IMAP/POP?

Gedalya gedalya at gedalya.net
Mon Jul 15 02:38:00 EEST 2013


On 07/14/2013 11:06 AM, Martin wrote:
> Hello everybody,
>
> I have a question, though I'm not sure if it's a matter of dovecot or
> postfix. Or if it's even possible to do at all.
>
> If I understand it correctly, SMTP authentification is done via SASL.
> When a user wants to login Postfix queries an external user database
> (dovecot). Therefore the SMTP-users are identical to the IMAP/POP-users.
>
> I want to achieve the following: I want some user credentials
> (username&password) for a user that is able to login via SMTP, but who
> doesn't have a mailbox and therefore shouldn't be able to login via
> IMAP/POP.
>
> Is this even possible?
> How can it be achieved? Or: does this behaviour have a special name,
> which I can google for?
>
>
> Regards,
> Martin

http://wiki2.dovecot.org/Variables

Look at  %s

If you use sql, try:

IF('%s' != 'smtp' and smtp_only, 'Y', NULL) as nologin

I've never tried this with smtp, but I assume this would work, i.e. when 
postfix is authenticating %s == 'smtp'.



More information about the dovecot mailing list