Re: [exim] Reading "alias : username : password" from text f…

Top Pagina
Delete this message
Reply to this message
Auteur: Jeremy Harris
Datum:  
Aan: exim-users
Onderwerp: Re: [exim] Reading "alias : username : password" from text file when sending an e-mail through GMail
On 25/09/15 03:16, Eugene Dzhurinsky wrote:
> alias : username : password


The data for a lookup will be "username : password".

> PASSWDLINE=${sg{\
>                 ${lookup{$sender_address}\
>                          nwildlsearch\
>                          {/etc/mail/passwd.gmail}\
>                          {$value}\
>                          fail}\
>                }\
>                {\\N[\\^]\\N}\
>                {^^}\
>             }


What's the intent of the ${sg } here?

> login:
>     driver = plaintext
>     public_name = LOGIN

>
>     # Return empty string if not non-TLS AND looking up
>     # $host in passwd-file yields a non-empty string;
>     # fail otherwise.
>     client_send = "<; ${if and{\
>                             {!eq{$tls_cipher}{}}\
>                             {!eq{PASSWDLINE}{}}\
>                            }\
>                            {}fail}\
>                     ; ${extract{2}{::}{PASSWDLINE}}\
>                     ; ${sg{PASSWDLINE}{\\N([^:]+:)(.*)\\N}{\\$3}}"


- The client_send docs don't say what happens if the expansion
fails. Suggest you use client_condition as well.

- The client_send docs don't say you can change the list separator

- You don't need the doublequotes

- ${if } does not take a fail directive.

- You use ${extract } for one send element; why not the other?

- You don't need to double the colon for ${extract }

- Check that your target actually offers the LOGIN type
of plaintext auth.

- Use the debug commandline options to watch what goes on during
an attempt to auth.

--
Cheers,
Jeremy