Re: Difficulties with Acct-specific SMTP vars
Pierre-Jean <sygne@...> wrote:
> jgw@... wrote:
>
> > Hello heirloom mailx users,
> > I'm trying to set up account-specific SMTP variables (see below) but am
> > not having much luck. The heirloom mailx(1) manpage seems to suggest the
> > the proper form is "<smtp_var>-user <at> host=" where the user <at> host is taken
> > from the value of the "from" variable. As can be seen, when used in this
> > way, no authentication occurs and the SMTP server issues a "Relaying
> > denied". Omiting "user <at> host" results in success. No problems with
> > account-specific IMAP vars (been using them for years), just SMTP.
> >
> > BTW, I also tried:
> >
> > "..-smtp_user <at> smtp_server="
> > "..-me\ <at> foobar\.org="
> >
>
>
> It seems to me that you've found the solution, but didn't knew it!
>
> I am using:
>
> account foo {
> set from=me@...
> set password-me@...="imap_passwd"
> set smtp=smtp.foo.org
> set smtp-auth-user="me@..."
> set smtp-auth-passwd="smtp_passwd"
> }
>
> account bar {
> set from=me@...
> set password-me@...="imap_passwd"
> set smtp=smtp.bar.org
> set smtp-auth-user="me@..."
> set smtp-auth-passwd="smtp_passwd"
> }
>
> And I can send mails using account specific smtp:
> ...
Thanks for the reply. This of course works but isn't what I was asking about.
Also, it the above now requires you to reset the various SMTP-related variables
if moving between multiple IMAP accounts in a single mailx session. That seems
to be what the ..-user <at> host= variables are for. And they work for IMAP, just
not for SMTP, at least not in the way I'm interpreting the manpage. To quote
from mailx(1):
...
smtp-auth
Sets the SMTP authentication method. If set to `login',
or if unset and smtp-auth-user is set, AUTH LOGIN is
used. If set to `cram-md5', AUTH CRAM-MD5 is used; if
set to `plain', AUTH PLAIN is used. Otherwise, no SMTP
authentication is performed.
smtp-auth-user <at> host
Overrides smtp-auth for specific values of sender
addresses, depending on the from variable.
...
The IMAP-related vars are described similarly and work as described, so I don't
think I'm misinterpreting the manpage.
Per the previous reply, I tried explicitly setting 'from' with the same result:
the ..-user <at> host vars get set but not used. I've poked around some in the code
but I'm not very proficient in C and nothing stands out WRT patching.
Jeff
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d