[Dovecot] allow_nets

2009-02-28 Thread CJ Teets
Hello,

Im using Ubuntu 8.10 with Dovecot 1.0.10.

I am using passwd files, not a MySQL database.

I have 2 files, a "users" file, and a "passwd" file.

I have added:

allow_nets=10.1.10.1 to the end of a specific users entry in the users file.

When that user tries to login, I get the following in the logs:

dovecot: 2009-02-28 09:06:59 Error: IMAP(b...@mydomain.com): Ambiguous mail
location setting, don't know what to do with it: allow_nets=10.1.10.1 (try
prefixing it with mbox: or maildir:)
dovecot: 2009-02-28 09:06:59 Error: IMAP(b...@mydomain.com): Mail storage
creation failed with mail_location: allow_nets=10.1.10.1
dovecot: 2009-02-28 09:06:59 Error: child 4174 (imap) returned error 89

here is the line from my users file:

b...@mydomain.com::5000:5000::/home/vmail/
mydomain.com/:/bin/false::allow_nets=10.1.10.1

here is the corresponding line from the passwd file:

b...@oldschoolpunk.com:$1$evcHgrbC$BuyQRCspMzTpD8zkphxo0/


My goal is, that I want to allow this user to check email ONLY from the IP
specified (i.e. 10.1.10.1)

I just can't seem to get this working...
Am I going about something the wrong way?

Thanks!


Re: [Dovecot] allow_nets

2009-02-28 Thread CJ Teets
You are correct. I really just skimmed that page, because allow_nets was
listed on the PasswordDatabase/ExtraFields page

I did try your suggestion, however, I got the same error:

 Ambiguous mail location setting, don't know what to do with it:
userdb_allow_nets=10.1.10.1 (try prefixing it with mbox: or maildir:)

But your suggestion did make me think maybe I missed something on the other
page (PasswordDatabase/ExtraFields) so I went back and studied it again, and
in fact solved the problem.

I had tried putting allow_nets in the users file and the passwd file before,
and it never did anything when in the passwd file.

On your tip, and rereading the page, I noticed 6 colons (:) after the users
password, but before the extra field in the examples. I've added the six
colons, and the allow_nets now works great!

Thanks so much for your response. It got me where I needed to be!

CJ


On Sat, Feb 28, 2009 at 2:24 PM, Pascal Volk <
user+dove...@localhost.localdomain.org
> wrote:

> On 28.02.2009 15:33 CJ Teets wrote:
> > Hello,
> >
> > Im using Ubuntu 8.10 with Dovecot 1.0.10.
> >
> > I am using passwd files, not a MySQL database.
> >
> > I have 2 files, a "users" file, and a "passwd" file.
> >
> > I have added:
> >
> > allow_nets=10.1.10.1 to the end of a specific users entry in the users
> file.
> >
> > When that user tries to login, I get the following in the logs:
> >
> > dovecot: 2009-02-28 09:06:59 Error: IMAP(b...@mydomain.com): Ambiguous
> mail
> > location setting, don't know what to do with it: allow_nets=10.1.10.1
> (try
> > prefixing it with mbox: or maildir:)
> > dovecot: 2009-02-28 09:06:59 Error: IMAP(b...@mydomain.com): Mail storage
> > creation failed with mail_location: allow_nets=10.1.10.1
> > dovecot: 2009-02-28 09:06:59 Error: child 4174 (imap) returned error 89
> >
> > here is the line from my users file:
> >
> > b...@mydomain.com::5000:5000::/home/vmail/
> > mydomain.com/
> >
> > here is the corresponding line from the passwd file:
> >
> > b...@oldschoolpunk.com:$1$evcHgrbC$BuyQRCspMzTpD8zkphxo0/
> >
> >
> > My goal is, that I want to allow this user to check email ONLY from the
> IP
> > specified (i.e. 10.1.10.1)
> >
> > I just can't seem to get this working...
> > Am I going about something the wrong way?
>
> You didn't read the end of
> http://wiki.dovecot.org/UserDatabase/ExtraFields
> Try ...:/bin/false::userdb_allow_nets=10.1.10.1
>
>
> Regards,
> Pascal
> --
> Ubuntu is an ancient African word meaning “I can’t install Debian.”
> -- unknown
>