[Dovecot] cutting everything after @

Dominic Marks dom at goodforbusiness.co.uk
Wed Apr 27 15:41:37 EEST 2005


On Wednesday 27 April 2005 11:50, Juraj Bednar wrote:
> Hello,
>
>
>  I am migrating one server to dovecot. The only problem is, that users
>  have logins with @domain as part of their user name. I want to use pam
>  auth (for other reasons, if only for dovecot, I would use mysql, but I
>  need the same password db to be used for other services, like samba).
>
>  Is there a way to allow this type of login? Just cut everything
>  beginning with @. I can change the source code, but then I don't get
>  nice automatic upgrades.
>
>  Or can this be done easily with PAM?
>
>   Thanks,
>
>
>    Juraj.

Would using passwd-file as your passwd database be acceptable? The 
authentication won't go via PAM, if that is what are looking for, but if you 
point passwd-file at a copy of the system passwd file you should be able to 
run an unmodified dovecot and use a single password for your services. Then 
just write a very short script to:

o filter out only the mail accounts from your master passwd, joe, bob, mary.
o rewrite the entries into user at domain:password:::::etc format.

Then either run this every so often, or use the 'unix passwd sync' feature of 
samba to make sure it is synchronised when a user changes their password from 
Windows.

HTH,
-- 
Dominic
GoodforBusiness.co.uk
I.T. Services for SMEs in the UK.



More information about the dovecot mailing list