<div dir="ltr">Again, this doesn't help with doveadm running as the local user, and also doesn't help with<div>the PAM authentication.</div><div><br></div><div><div>passdb {</div><div> driver = pam</div><div> #[session=yes] [setcred=yes] [failure_show_msg=yes] [max_requests=20]</div><div> #[cache_key=<key>] [<service name>]</div><div> args = failure_show_msg=yes session=yes max_requests=20</div><div> skip = authenticated</div><div>}</div></div><div><br></div><div>How can I default the domain for PAM authentication?</div><div>(I've set auth_default_realm and it doesn't help in this case).</div><div><br></div><div><div># System users (NSS, /etc/passwd, or similiar). In many systems nowadays this</div><div># uses Name Service Switch, which is configured in /etc/nsswitch.conf.</div><div>userdb {</div><div> # <doc/wiki/AuthDatabase.Passwd.txt></div><div> driver = passwd-file</div><div> # [blocking=no]</div><div> args = username_format=%Ln /etc/passwd</div><div> #override_fields = user=%Ln /etc</div><div> #name = %Ln</div><div><br></div><div> # Override fields from passwd</div><div> #override_fields = home=/home/virtual/%u</div><div> #skip = found</div><div>}</div></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 15, 2019 at 6:31 AM John Fawcett via dovecot <<a href="mailto:dovecot@dovecot.org">dovecot@dovecot.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<div class="gmail-m_-8030485373348157100moz-cite-prefix">On 15/04/2019 12:59, Larry Rosenman via
dovecot wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">forgot to reply all.<br>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">---------- Forwarded message
---------<br>
From: <strong class="gmail_sendername" dir="auto">Larry
Rosenman</strong> <span dir="ltr"><<a href="mailto:larryrtx@gmail.com" target="_blank">larryrtx@gmail.com</a>></span><br>
Date: Mon, Apr 15, 2019 at 5:58 AM<br>
Subject: Re: SOLR/Index?<br>
To: John Fawcett <<a href="mailto:john@voipsupport.it" target="_blank">john@voipsupport.it</a>><br>
</div>
<br>
<br>
<div dir="ltr">the local users (myself, my wife, a friend) can
authenticate EITHER as <username> or <username>@<a href="http://lerctr.org" target="_blank">lerctr.org</a>.
<div><br>
</div>
<div>switching to all virtual users is NOT going to happen. </div>
<div><br>
</div>
<div>If I login to roundcube with <user>@<a href="http://lerctr.org" target="_blank">lerctr.org</a> it finds the
autoindexed mail.</div>
<div><br>
</div>
<div>So, if I make everyone always authenticate as
<user>@<a href="http://lerctr.org" target="_blank">lerctr.org</a> we should be fine.</div>
<div><br>
</div>
<div>and change my script to do doveadm -u
<user>@<domain> instead of depending on the
local user running the cron job. </div>
<div><br>
</div>
<div>question: Is there some way to have dovecot change what
it sees to be <user>@<a href="http://lerctr.org" target="_blank">lerctr.org</a>
when they login as <user>?</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</div>
</blockquote>
<p>Dovecot is very configurable, but it can also take some time,
effort and testing to get the configuration you want. Personally I
don't mix user types since it takes out an element of complexity.
<br>
</p>
<p>For your case you might find it useful to look into <tt>auth_default_realm</tt></p>
<p>that can specify a domain name when one is not supplied.<br>
</p>
<p> <a class="gmail-m_-8030485373348157100moz-txt-link-freetext" href="https://wiki2.dovecot.org/DomainLost" target="_blank">https://wiki2.dovecot.org/DomainLost</a></p>
<p>Other things that might be useful: there is a method for
returning a "user" field from the userdb query or passdb query
which will change the username. Or there is another setting that
can overriding values of fields returned by the userdb.<br>
</p>
<p><a class="gmail-m_-8030485373348157100moz-txt-link-freetext" href="https://wiki.dovecot.org/UserDatabase" target="_blank">https://wiki.dovecot.org/UserDatabase</a></p>
<p>Hope it helps!<br>
</p>
<p>John<br>
</p>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Larry Rosenman <a href="http://www.lerctr.org/~ler" target="_blank">http://www.lerctr.org/~ler</a><br><span>Phone: <span title="Call with Google Voice"><span title="Call with Google Voice"><span title="Call with Google Voice">+1 214-642-9640</span></span></span> (c) E-Mail: </span><a href="mailto:larryrtx@gmail.com" target="_blank">larryrtx@gmail.com</a><br>US Mail: 5708 Sabbia Dr, Round Rock, TX 78665-2106</div></div></div></div></div></div></div></div>