FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 01-03-2012, 08:22 PM
Sergi Pons Freixes
 
Default Setting Postfix + Courier + Cyrus: cannot find user dir on authentication

Hi All,
I am trying to adapt a tutorial for setting a mail server in Arch Linux [1] to Debian. I finished the step of PostfixAdmin, and I perfectly can send e-mails from it and add users and domains to the database. Looking at /home/vmail, I also checked that I can receive e-mails. Before setting up Rouncube, I wanted to try accessing with Thunderbird, but I am getting the message of Incorrect username or password.

Looking at the logs, on mail.log I can see:Jan *3 00:32:52 cub3 imapd: Connection, ip=[::ffff:80.35.195.218]Jan *3 00:32:53 cub3 imapd: chdir Maildir: No such file or directory
Jan *3 00:32:53 cub3 imapd: sachiel@cub3.net: No such file or directory
But:# ls /home/vmail/sachiel@cub3.net
# ls /home/vmail/sachiel@cub3.net/cur *new *tmp# ls /home/vmail/sachiel@cub3.net/new/1325457494.Vca00I4f096M587089.cub3 *1325457546.Vca00I4f099M501611.cub3 *1325471089.Vca00I4f78fM130501.cub3

So the directories exist... I've rechecked the config files several times (even on*different*days, as resting is always good :P), and googling around, but no luck about what is wrong. Any advice about where to look for it is appreciated.

Regards,Sergi
 
Old 01-03-2012, 08:29 PM
Sergi Pons Freixes
 
Default Setting Postfix + Courier + Cyrus: cannot find user dir on authentication

On Tue, Jan 3, 2012 at 10:22 PM, Sergi Pons Freixes <sachiel2014@gmail.com> wrote:

I am trying to adapt a tutorial for setting a mail server in Arch Linux [1] to Debian.*
Forgot to attach the link to the tutorial!
https://wiki.archlinux.org/index.php/Simple_Virtual_User_Mail_System*
 
Old 01-04-2012, 03:55 PM
Camaleón
 
Default Setting Postfix + Courier + Cyrus: cannot find user dir on authentication

On Tue, 03 Jan 2012 22:22:25 +0100, Sergi Pons Freixes wrote:

> Hi All,

Hi Sergi. Please, turn off html when sending e-mails, they're hard to
read from text based e-mail clients :-)

> I am trying to adapt a tutorial for setting a mail server in Arch Linux
> [1] to Debian. I finished the step of PostfixAdmin, and I perfectly can
> send e-mails from it and add users and domains to the database. Looking
> at /home/vmail, I also checked that I can receive e-mails. Before
> setting up Rouncube, I wanted to try accessing with Thunderbird, but I
> am getting the message of Incorrect username or password.
>
> Looking at the logs, on mail.log I can see:
> Jan 3 00:32:52 cub3 imapd: Connection, ip=[::ffff:80.35.195.218]
> Jan 3 00:32:53 cub3 imapd: chdir Maildir: No such file or directory
> Jan 3 00:32:53 cub3 imapd: sachiel@cub3.net: No such file or directory

I have no previous experience with Courier, but the above message seems
to indicate Courier can't find the proper place where messages are being
dropped.

> But:
> # ls /home/vmail/
> sachiel@cub3.net
> # ls /home/vmail/sachiel@cub3.net/
> cur new tmp
> # ls /home/vmail/sachiel@cub3.net/new/
> 1325457494.Vca00I4f096M587089.cub3 1325457546.Vca00I4f099M501611.cub3
> 1325471089.Vca00I4f78fM130501.cub3

(...)

Mmm... isn't a parent "/Maildir" folder required? :-?

I mean, something like: "/$HOME/vmail/$user/Maildir/cur|new|tmp"

I would also check where is the Courier variable for the stored mailboxes
pointing to.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2012.01.04.16.55.18@gmail.com">http://lists.debian.org/pan.2012.01.04.16.55.18@gmail.com
 
Old 01-04-2012, 04:18 PM
Tony van der Hoff
 
Default Setting Postfix + Courier + Cyrus: cannot find user dir on authentication

On 04/01/12 16:55, Camaleón wrote:

On Tue, 03 Jan 2012 22:22:25 +0100, Sergi Pons Freixes wrote:


Hi All,


Hi Sergi. Please, turn off html when sending e-mails, they're hard to
read from text based e-mail clients :-)


I am trying to adapt a tutorial for setting a mail server in Arch Linux
[1] to Debian. I finished the step of PostfixAdmin, and I perfectly can
send e-mails from it and add users and domains to the database. Looking
at /home/vmail, I also checked that I can receive e-mails. Before
setting up Rouncube, I wanted to try accessing with Thunderbird, but I
am getting the message of Incorrect username or password.

Looking at the logs, on mail.log I can see:
Jan 3 00:32:52 cub3 imapd: Connection, ip=[::ffff:80.35.195.218]
Jan 3 00:32:53 cub3 imapd: chdir Maildir: No such file or directory
Jan 3 00:32:53 cub3 imapd: sachiel@cub3.net: No such file or directory


I used this to set up Courier
http://edin.no-ip.com/blog/hswong3i/exim4-courier-ssl-debian-etch-mini-howto

Which contains this:
If you have an existing user account without Maildir under home
directory, run the following command:

maildirmake ~/Maildir

HTH,




--
Tony van der Hoff | mailto:tony@vanderhoff.org
Buckinghamshire, England |


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4F0489F0.7060009@vanderhoff.org">http://lists.debian.org/4F0489F0.7060009@vanderhoff.org
 
Old 01-05-2012, 10:39 AM
Sergi Pons Freixes
 
Default Setting Postfix + Courier + Cyrus: cannot find user dir on authentication

2012/1/4 Tony van der Hoff <tony@vanderhoff.org>
> I used this to set up Courier
> http://edin.no-ip.com/blog/hswong3i/exim4-courier-ssl-debian-etch-mini-howto
>
> Which contains this:
> If you have an existing user account without Maildir under home directory, run the following command:
> maildirmake ~/Maildir

In the setup I use, the emails are not stored under each local user's
home, but in /home/vmail/user@domain/ . The Maildir hierarchy is
reproduced inside this directory, as I showed on the first message.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAOG-P07_mUTDc5wL-J5u6V2tNDoSn0LunxTzg46hV+_LoexpYw@mail.gmail.com"> http://lists.debian.org/CAOG-P07_mUTDc5wL-J5u6V2tNDoSn0LunxTzg46hV+_LoexpYw@mail.gmail.com
 
Old 01-05-2012, 03:03 PM
Camaleón
 
Default Setting Postfix + Courier + Cyrus: cannot find user dir on authentication

On Thu, 05 Jan 2012 12:39:01 +0100, Sergi Pons Freixes wrote:

> 2012/1/4 Tony van der Hoff <tony@vanderhoff.org>
>> I used this to set up Courier
>> http://edin.no-ip.com/blog/hswong3i/exim4-courier-ssl-debian-etch-mini-
howto
>>
>> Which contains this:
>> If you have an existing user account without Maildir under home
>> directory, run the following command: maildirmake ~/Maildir
>
> In the setup I use, the emails are not stored under each local user's
> home, but in /home/vmail/user@domain/ . The Maildir hierarchy is
> reproduced inside this directory, as I showed on the first message.

Sergi, "chdir Maildir: No such file or directory" message seems to mean
the server is trying to "go" to that directory and is not found, because
it does not exist.

http://www.courier-mta.org/imapd.html

"(...) The last daisy-chained command is imapd, which is the actual IMAP
server, which is started from the logged-in account's home directory. The
sole argument to imapd is the pathname to the default IMAP mailbox, which
is usually ./Maildir. Some authentication modules are capable of
specifying a different filename, by setting the MAILDIR environment
variable."

I would start by discarding a problem with a bad folder structure
required by Courier.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2012.01.05.16.03.14@gmail.com">http://lists.debian.org/pan.2012.01.05.16.03.14@gmail.com
 
Old 01-05-2012, 07:14 PM
Sergi Pons Freixes
 
Default Setting Postfix + Courier + Cyrus: cannot find user dir on authentication

2012/1/5 Camaleón <noelamac@gmail.com>:
>
> Sergi, "chdir Maildir: No such file or directory" message seems to mean
> the server is trying to "go" to that directory and is not found, because
> it does not exist.
>

Yes, you're right. What puzzles me is that on /etc/courier/authmysqlrc
I have specified:

MYSQL_HOME_FIELD "/home/vmail"

and

# This is an optional field, and can be used to specify an arbitrary
# location of the maildir for the account, which normally defaults to
# $HOME/Maildir (where $HOME is read from MYSQL_HOME_FIELD).
#
# You still need to provide a MYSQL_HOME_FIELD, even if you uncomment this
# out.
#
MYSQL_MAILDIR_FIELD maildir

Being maildir a field on the database with the content: user@domain,
therefore imapd should use /home/vmail/user@domain/ as Maildir . For
some reason is ignoring it?


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAOG-P06pKLP_zn7UM2+NYgN4NgfXGi1anMVbZYbEMmOFNDUW5Q@mai l.gmail.com">http://lists.debian.org/CAOG-P06pKLP_zn7UM2+NYgN4NgfXGi1anMVbZYbEMmOFNDUW5Q@mai l.gmail.com
 
Old 01-06-2012, 12:08 PM
Camaleón
 
Default Setting Postfix + Courier + Cyrus: cannot find user dir on authentication

On Thu, 05 Jan 2012 21:14:06 +0100, Sergi Pons Freixes wrote:

> 2012/1/5 Camaleón <noelamac@gmail.com>:
>>
>> Sergi, "chdir Maildir: No such file or directory" message seems to mean
>> the server is trying to "go" to that directory and is not found,
>> because it does not exist.
>>
>>
> Yes, you're right. What puzzles me is that on /etc/courier/authmysqlrc I
> have specified:
>
> MYSQL_HOME_FIELD "/home/vmail"
>
> and
>
> # This is an optional field, and can be used to specify an arbitrary
> # location of the maildir for the account, which normally defaults to
> # $HOME/Maildir (where $HOME is read from MYSQL_HOME_FIELD).
> #
> # You still need to provide a MYSQL_HOME_FIELD, even if you uncomment this
> # out.
> #
> MYSQL_MAILDIR_FIELD maildir
>
> Being maildir a field on the database with the content: user@domain,
> therefore imapd should use /home/vmail/user@domain/ as Maildir . For
> some reason is ignoring it?

Sergi... as I see, "/Maildir" is a folder, it has to exist in your path
or you have to configure Courier to look into another different place,
which is not the case :-)

I can be wrong because I have not used Courier before, but this can be
easily tried, just create a new "test" account at:

/home/vmail/Maildir/test@cub3.net/

Restart the daemons, send a message to that account ("To: test@cub3.net"),
try to login and review the logs.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2012.01.06.13.08.45@gmail.com">http://lists.debian.org/pan.2012.01.06.13.08.45@gmail.com
 
Old 01-09-2012, 08:24 AM
Sergi Pons Freixes
 
Default Setting Postfix + Courier + Cyrus: cannot find user dir on authentication

2012/1/6 Camaleón <noelamac@gmail.com>:
>
> Sergi... as I see, "/Maildir" is a folder, it has to exist in your path
> or you have to configure Courier to look into another different place,
> which is not the case :-)
>
> I can be wrong because I have not used Courier before, but this can be
> easily tried, just create a new "test" account at:
>
> /home/vmail/Maildir/test@cub3.net/

>From what I understand from the documentation, a maildir is actually a
hierachy of subfolders (./new, ./cur, ./tmp, etc), which is usually
located at /home/user/Maildir. In the setup I'm trying, this hierarchy
hang from /home/vmail/user@domain/ . Actaully, postfix creates this
architecture of folders when I set-up a mail user and send an e-mail
to it. With the config files I posted before, courier should look at
these folders, but he is looking in another place... :S


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAOG-P070WN0qNqdVcKuxvBKOqPZAZBaKsXTbX6NndX60d1kjGg@mai l.gmail.com">http://lists.debian.org/CAOG-P070WN0qNqdVcKuxvBKOqPZAZBaKsXTbX6NndX60d1kjGg@mai l.gmail.com
 
Old 01-09-2012, 09:00 PM
Sergi Pons Freixes
 
Default Setting Postfix + Courier + Cyrus: cannot find user dir on authentication

Ok, I finally found what was wrong.

On authmysqlrc, MYSQL_MAILDIR_FIELD must be the full path to the
maildir, not the relative path according to MYSQL_HOME_FIELD.

So, instead of
MYSQL_HOME_FIELD "/home/vmail"
MYSQL_MAILDIR_FIELD mail

It must be:
MYSQL_HOME_FIELD "/home/vmail"
MYSQL_MAILDIR_FIELD concat("/home/vmail/",mail)

Thank you for the guidance.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAOG-P06oUKVdZ8WBcKPBR53kB0yhiw0V8gpxiiUq9CARoHHprw@mai l.gmail.com">http://lists.debian.org/CAOG-P06oUKVdZ8WBcKPBR53kB0yhiw0V8gpxiiUq9CARoHHprw@mai l.gmail.com
 

Thread Tools




All times are GMT. The time now is 03:30 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org