Using exim4u with a manual Smarthost,

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Using exim4u with a manual Smarthost,

William Marcelo Piovezan
Hi,
 
We use here a Exim4u installation to handle only local messages. The remote messages are forwarded to our ISP Mail server.
 
This is done using a Transport to forward remote SMTP messages. Since my local ISP requires authenticated SMTP, I’ve configured the authenticators section like that using the client_send variable:
 
fixed_login:
        driver = plaintext
        public_name = LOGIN
        server_prompts = "Username:: : Password::"
        server_condition = ${lookup mysql{SELECT '1' FROM users \
                                WHERE username = '${quote_mysql:$1}' \
                                AND clear = '${quote_mysql:$2}'} {yes}{no}}                   
       client_send = : [hidden email] : password
       server_set_id = $1
 
As you may see a valid ISP account is used to authenticate all the remote smtp messages.
 
Today, the ISP have implemented another validation requiring that the authenticated SMTP user needs to be the same used in the From header. Considering that we would need to define the client_send variable with the same data as the “username” and “clear” MySQL fields from the authenticated Exim4u user.
 
Please could you help me how to write a correct client_send syntax to lookup these data from MySQL users table? I´ve tried using the $1 and $2 variables like below but the ISP send’s me an authentication failure
client_send = : $1 : $2
 
If I use the full account syntax it works perfectly but only for that messages sent using that e-mail account. If I try to send messages from another account the ISP informs that the user authenticated and from header are not the same.
 
Best Regards,
 
William Marcelo Piovezan.

_______________________________________________
users mailing list
[hidden email]
https://exim4u.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Using exim4u with a manual Smarthost,

William Marcelo Piovezan
Hi,
 
I could get a working condition with the following lookup:
 
client_send = : $sender_address : ${lookup{$sender_address}\
                        lsearch{/etc/exim/exim-client.passwd}{$value}{fail}}
 
The /etc/exim/exim-client.passwd has the following info:
email1 passwd1
email2 passwd2
.
.
.
But for some reason the equivalent mysql lookup does not work (I have temporary error from Exim):
 
client_send = $sender_address : ${lookup mysql{SELECT clear FROM users \
                        WHERE username = '${quote_mysql:$sender_address}'}{$value}fail}
 
What I missing here? I’ve enabled the debug in Exim but no more information was showed
 
Regards,
 
William Marcelo Piovezan.
 
 
Sent: Thursday, August 15, 2013 1:11 PM
Subject: [Exim4U] Using exim4u with a manual Smarthost,
 
Hi,
 
We use here a Exim4u installation to handle only local messages. The remote messages are forwarded to our ISP Mail server.
 
This is done using a Transport to forward remote SMTP messages. Since my local ISP requires authenticated SMTP, I’ve configured the authenticators section like that using the client_send variable:
 
fixed_login:
        driver = plaintext
        public_name = LOGIN
        server_prompts = "Username:: : Password::"
        server_condition = ${lookup mysql{SELECT '1' FROM users \
                                WHERE username = '${quote_mysql:$1}' \
                                AND clear = '${quote_mysql:$2}'} {yes}{no}}                   
       client_send = : [hidden email] : password
       server_set_id = $1
 
As you may see a valid ISP account is used to authenticate all the remote smtp messages.
 
Today, the ISP have implemented another validation requiring that the authenticated SMTP user needs to be the same used in the From header. Considering that we would need to define the client_send variable with the same data as the “username” and “clear” MySQL fields from the authenticated Exim4u user.
 
Please could you help me how to write a correct client_send syntax to lookup these data from MySQL users table? I´ve tried using the $1 and $2 variables like below but the ISP send’s me an authentication failure
client_send = : $1 : $2
 
If I use the full account syntax it works perfectly but only for that messages sent using that e-mail account. If I try to send messages from another account the ISP informs that the user authenticated and from header are not the same.
 
Best Regards,
 
William Marcelo Piovezan.


_______________________________________________
users mailing list
[hidden email]
https://exim4u.org/mailman/listinfo/users

_______________________________________________
users mailing list
[hidden email]
https://exim4u.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Using exim4u with a manual Smarthost - Solved,

William Marcelo Piovezan
Hi,
 
A new update...after reading this post http://www.exim.org/lurker/message/20060808.075946.b2823a7a.fr.html I’ve decided to replace the '${quote_mysql:$sender_address}' only to '$sender_address' and it started to work.
 
Could someone tell me why the $quote_mysql refuses to work in the client_send option authenticator if it’s working perfectly in any other place in exim.conf (Transports, Routers and even in other Authenticators options).
 
To resume, this works:
client_send = $sender_address : ${lookup mysql{SELECT clear FROM users \
                        WHERE username = '$sender_address'}{$value}fail}
 
But this don’t:
client_send = $sender_address : ${lookup mysql{SELECT clear FROM users \
                        WHERE username = '${quote_mysql:$sender_address}'}{$value}fail}
 
Best Regards,
 
William Marcelo Piovezan.
 
 
Sent: Friday, August 16, 2013 4:12 PM
Subject: Re: [Exim4U] Using exim4u with a manual Smarthost,
 
Hi,
 
I could get a working condition with the following lookup:
 
client_send = : $sender_address : ${lookup{$sender_address}\
                        lsearch{/etc/exim/exim-client.passwd}{$value}{fail}}
 
The /etc/exim/exim-client.passwd has the following info:
email1 passwd1
email2 passwd2
.
.
.
But for some reason the equivalent mysql lookup does not work (I have temporary error from Exim):
 
client_send = $sender_address : ${lookup mysql{SELECT clear FROM users \
                        WHERE username = '${quote_mysql:$sender_address}'}{$value}fail}
 
What I missing here? I’ve enabled the debug in Exim but no more information was showed
 
Regards,
 
William Marcelo Piovezan.
 
 
Sent: Thursday, August 15, 2013 1:11 PM
Subject: [Exim4U] Using exim4u with a manual Smarthost,
 
Hi,
 
We use here a Exim4u installation to handle only local messages. The remote messages are forwarded to our ISP Mail server.
 
This is done using a Transport to forward remote SMTP messages. Since my local ISP requires authenticated SMTP, I’ve configured the authenticators section like that using the client_send variable:
 
fixed_login:
        driver = plaintext
        public_name = LOGIN
        server_prompts = "Username:: : Password::"
        server_condition = ${lookup mysql{SELECT '1' FROM users \
                                WHERE username = '${quote_mysql:$1}' \
                                AND clear = '${quote_mysql:$2}'} {yes}{no}}                   
       client_send = : [hidden email] : password
       server_set_id = $1
 
As you may see a valid ISP account is used to authenticate all the remote smtp messages.
 
Today, the ISP have implemented another validation requiring that the authenticated SMTP user needs to be the same used in the From header. Considering that we would need to define the client_send variable with the same data as the “username” and “clear” MySQL fields from the authenticated Exim4u user.
 
Please could you help me how to write a correct client_send syntax to lookup these data from MySQL users table? I´ve tried using the $1 and $2 variables like below but the ISP send’s me an authentication failure
client_send = : $1 : $2
 
If I use the full account syntax it works perfectly but only for that messages sent using that e-mail account. If I try to send messages from another account the ISP informs that the user authenticated and from header are not the same.
 
Best Regards,
 
William Marcelo Piovezan.


_______________________________________________
users mailing list
[hidden email]
https://exim4u.org/mailman/listinfo/users


_______________________________________________
users mailing list
[hidden email]
https://exim4u.org/mailman/listinfo/users

_______________________________________________
users mailing list
[hidden email]
https://exim4u.org/mailman/listinfo/users