| |
Пользовательский логинРеклама: тюнинг мерседес е210 изготовление нашивок на заказ |
SMTP Authentication using IMAPSMTP Authentication using IMAPThis is a simple solution for SMTP Authentication. It is for those who have a IMAP server and want to provide Authenticated SMTP for everyone that has an IMAP account using the same user and password as IMAP uses. This method does an IMAP call and attempts to log in using the presented name and password. If it succeeds it logs out and returns true allowing the user to send email. The advantage of this method is that it doesn't need to know anything about the IMAP backend. The assumption is that if IMAP calls to good then SMTP will call it good too. It eliminates the need to write Exim code to read the IMAP backend database. If you decide to change IMAP servers you don't have to change anything in Exim to do user authentication. The Perl SolutionThis method uses EXIM's embedded perl to do the job. You have to load a perl program at start time and then it makes calls to a perl subroutine. The Perl routine attempts the IMAP login and returns the result to Exim. In order to make this work you must first load the Perl script as follows: perl_startup = do '/etc/exim/perl.pl' Then - create a small perl program using this code. In this example the file is /etc/exim/perl.pl. It requires the perl module Net::IMAP::Simple (and Net::IMAP::Simple::SSL should you want SSL) be installed. You can install it using cpan. #!/usr/bin/perl Finally - these authenticatos will allow the user and password to be passed on to the Perl script. It calls the subroutine imapLogin passing the host, account, and plain text password. If your users use an encrypted connection the password won't be in the clear. ###################################################################### A variation of this code could be used to authenticate from multiple servers. One could possible do a lookup based on the domain to find the remote server to connect to and authenticate against that. NeededNeed MD5 CRAM/DIGEST version of this code.
Cyrus SASL SolutionExim supports calls to Cyrus SASL and Cyrus can authenticate against IMAP. Cyrus support needs to be compiled into Exim to work. Here's a piece of the Makefile that needs to be edited: #------------------------------------------------------------------------------ Then - you need to configure your authenticators to talk to the Cyrus code. ###################################################################### You then need to configure the /etc/sysconfig/saslauthd file (Redhat/Fedora installation). # To see a list of authentication mechanisms supported by saslauthd execute this command Finally you need to start the daemon: service saslauthd start And set the service to automatically start on bootup: chkconfig saslauthd on If you are running a different distro - these are the general steps that need to be done. There might be some differences in how you accomplish it.
|