[Exim] SMTP authentication question

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Jesse Gilbert
Date: 2003-03-17 23:51 -000
À: exim-users
Sujet: [Exim] SMTP authentication question
Hello --

Apologies if this question has been visited before - I attempted to search
the list archives, and did not find an answer that I could make sense of.

I am attempting to implement SMTP authentication on a Linux server running
Exim 4.12. It is acceptable to use the PLAINTEXT method, and I have
successfully set up a LOGIN authenticator to work with a fixed username and
password, essentially copying the sample configuration from spec.txt.

I'm essentially a beginner when it comes to working with Exim, and am not
familiar enough with the system to set server_condition according to my
needs. Here is a summary of the situation on the server:

- we provide mail service for multiple "virtual" domains, which Exim routes
beautifully into multiple mailboxes on the disk. We use the pattern:

    /var/mail/$domain/$user



- we run vm-pop3d using multiple passwd files that are created individually
(using htpasswd) following this pattern:

    /etc/virtual/$domain/passwd


The passwords for mail accounts are distinct from system login passwords in
/etc/shadow. vm-pop3d parses the domain of the requesting account, checks
the password in the appropriate passwd file, and if successful pulls the
mail from the appropriate mailbox. All works seamlessly.


- Several of our users are having trouble sending email via their ISP's
SMTP service. We want to provide relaying for them using SMTP
authentication.

Rather than use a fixed account/password combination, I want to provide
local-domain-specific authentication using the virtual mail account password
located in /etc/virtual/$domain/passwd. The passwords are encrypted
(htpasswd).


So my server_condition needs to do the following:

- check the domain of the sending address against the local_domains list.
If local, locate the correct password file in /etc/virtual.

- authenticate the user against the passwd file by decrypting the password
entry for the user and comparing it to the password that was provided in the
SMTP session.

- provide delivery if this succeeds, deny if failed.


Can anyone suggest a syntax to perform this? I know that it is a nested
query, just not familiar enough with Exim's syntax to figure it out
myself... and I'm not sure that I have access to the sending email address
before the message is accepted for relay. If not, can I embed the domain in
the Username and strip it off in the server_condition statement?


thanks for any suggestions,
jg



--
Jesse Gilbert                                        System Administrator
Computer Animation Lab                   California Institute of the Arts
jesse@???                                       661.291.3026