* Tong* <sun_tong_001@yahoo.com> writes:
> On Thu, 07 Sep 2006 18:29:42 +0200, Alexander Dalloz wrote:
>
>>> I had been searching for the method to use different user/password for
>>> my smarthost connection. So far I haven't found a clear one.
>>
>> Different from what?
>> If you mean to be able to use different user/password configurations
>> (AuthInfo) for the same smarthost or mailertable targets: this is not
>> possible.
>
> Ok, just to make it crystal clear,
>
> So if my box is used by more than 2 users, they all have to share the
> same user/password configurations for the smarthost, which will end up
> with the same from field. Ie, there is no way for them to specify their
> own from field? (I'm talking about smarthosts like gmail that do not allow
> you to set your own from field).
The suggestions below *MAY* work [no guarantees whatsoever]
You may try to select different "pseudo smart host" based (e.g.) on
envelope sender or authentication credentials used during local
submission. "Pseudo smart hosts" will be a CNAME to smtp.gmail.com in
your local DNS domain (BTW smtp.gmail.com is a CNAME). You may create
one wild-card CNAME *.gmail.smtp.example.com for all pseudo smart hosts.
It should allow you to specify different outgoing AUTH per "pseudo smart
host".
In case of problems with connections caching use custom mailer
(variation of esmtp mailer) for smart hosts sending one message per
connection.
Relay selection based on envelope sender had been implemented in
(discontinued) smarttable. It has been never supported by sendmail.org.
P.S.
"Right way" would require changes in sendmail source code:
* selecting outgoing authentication credentials based on more data
* caching of outgoing connections
BTW It will be better in sendmail X, will not it? ;-)
--
[pl2en: Andrew] Andrzej Adam Filip :
anfi@priv.onet.pl :
anfi@xl.wp.pl