Re: [exim] How do I add SMTP AUTH details to the SMTP delive…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Lloyd Tennison
Date:  
À: Nigel Metheringham
CC: exim-users, Linspeed
Sujet: Re: [exim] How do I add SMTP AUTH details to the SMTP delivery?
Years ago I did this to SMTPDirect.py making it ASMTPDirect.py

# Manage a connection to the SMTP server
class Connection:
    def __init__(self):
        self.__connect()


    def __connect(self):
        self.__conn = smtplib.SMTP()
        self.__conn.connect(mm_cfg.SMTPHOST, mm_cfg.SMTPPORT)
        if mm_cfg.SMTP_AUTH:
            self.__conn.login(mm_cfg.SMTP_USERNAME, mm_cfg.SMTP_PASSWORD)
        self.__numsessions = mm_cfg.SMTP_MAX_SESSIONS_PER_CONNECTION


and adding to Defaults.py

SMTPPORT = 25
SMTPHOST = 'smtp.domain.com'
SMTP_USERNAME = 'username'
SMTP_PASSWORD = 'password'
DELIVERY_MODULE = 'ASMTPDirect'
# Needs to be 1 for ASMTPDirect to work
SMTP_AUTH = 1

----- Original Message -----
From: Nigel Metheringham <nigel.metheringham@???>
To:
Cc: exim-users@???, Linspeed <lee@???>
Date: Wed, 24 Sep 2008 11:03:51 +0100
Subject: Re: [exim] How do I add SMTP AUTH details to the SMTP delivery?

> Since I have an example around I'll paste that - there are other ways
> of doing this though, and you may not want to use this particular one
> if you talk to more than one SMTP server....
>
>    # router
>    # NB no other router uses the same transport
>    smart_route:
>      driver = manualroute
>      route_list = \
>        *         1.2.3.4 byname
>      transport = auth_smtp

>
>
>    # transport
>    auth_smtp:
>      driver = smtp
>      hosts_require_auth = *

>
>
>    # authenticator
>    cram:
>      driver = cram_md5
>      public_name = CRAM-MD5
>      client_name = myusername
>      client_secret = mypassword

>
>
>
> --
> ## List details at http://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/
>