niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Apps » Qmail
Qmail, local accounts, and forwarding
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
Author Message
Rick Root
*nix forums beginner


Joined: 12 Oct 2005
Posts: 10

PostPosted: Wed Jul 12, 2006 2:36 pm    Post subject: Qmail, local accounts, and forwarding Reply with quote

I have set up qmail (netqmail-1.05) set up on a centos 4 linux system as
basically a mail sender. No local mail accounts really.

But I do have local accounts set up with cron jobs that need to get
email notification of cron results forwarded to their real email
addresses. I used to do this with .forward files when I was running
sendmail, but I haven't figured out the solution for qmail (all my other
experiences with qmail involve vpopmail).

I tried setting up .qmail-username files in /var/qmail/alias - similar
to the .qmail-root and .qmail-postmaster - those both work... but the
others do not.

..qmail-root and .qmail-dukescp are both the exact same file.. same
contents, same length, same permissions...

# ls -alF .qmail-root .qmail-dukescp
-rw-r--r-- 1 root qmail 23 May 18 15:10 .qmail-dukescp
-rw-r--r-- 1 root qmail 23 May 17 12:21 .qmail-root

And yet, mail to root works, mail to dukescp does not.

The log file indicates the following:

@4000000044b508391c00b18c delivery 10241: deferral:
Unable_to_chdir_to_maildir._
(#4.2.1)/

But I don't know what maildir is trying to change TO, because it
shouldn't be doing that.

What exactly am I doing wrong here?

Thanks.

Rick
Back to top
Charles Cazabon
*nix forums Guru


Joined: 08 Jan 2005
Posts: 805

PostPosted: Wed Jul 12, 2006 3:05 pm    Post subject: Re: Qmail, local accounts, and forwarding Reply with quote

Rick Root <rick.root@webworksllc.com> wrote:
Quote:
I have set up qmail (netqmail-1.05) set up on a centos 4 linux system as
basically a mail sender. No local mail accounts really.

Okay.

Quote:
But I do have local accounts set up with cron jobs that need to get
email notification of cron results forwarded to their real email
addresses. I used to do this with .forward files when I was running
sendmail, but I haven't figured out the solution for qmail

It's pretty trivial. If they actually are real local accounts, you can use
..qmail files in those accounts' home directories to do what you used to do
with .forward files. `man dot-qmail` explains the (trivial) syntax involved.
`man qmail-getpw` explains what criteria need to be satisfied for qmail to
consider these to be "real" local users.

Quote:
I tried setting up .qmail-username files in /var/qmail/alias - similar
to the .qmail-root and .qmail-postmaster - those both work... but the
others do not.

/var/qmail/alias/ is only consulted if the local users don't exist. i.e., if
the message is to <foo@...> and you have a local user foo,
/var/qmail/alias/.qmail-foo may as well not exist.

Quote:
.qmail-root and .qmail-dukescp are both the exact same file.. same
contents, same length, same permissions...

# ls -alF .qmail-root .qmail-dukescp
-rw-r--r-- 1 root qmail 23 May 18 15:10 .qmail-dukescp
-rw-r--r-- 1 root qmail 23 May 17 12:21 .qmail-root

And yet, mail to root works, mail to dukescp does not.

1. Do you have a user "dukescp"?
2. "Does not work" doesn't mean much.

Quote:
The log file indicates the following:

@4000000044b508391c00b18c delivery 10241: deferral:
Unable_to_chdir_to_maildir._
(#4.2.1)/

But I don't know what maildir is trying to change TO, because it
shouldn't be doing that.

Sounds like you have a local user "dukescp", and your system-wide default
delivery instruction is to deliver to a maildir (maybe "./Maildir/"?), and
user dukescp doesn't have such a maildir.

I strongly suspect placing "&other_address" into ~dukescp/.qmail will do the
trick for you.

Charles
--
--------------------------------------------------------------------------
Charles Cazabon <qmail@discworld.dyndns.org>
Read http://pyropus.ca/personal/writings/12-steps-to-qmail-list-bliss.html
My services include qmail consulting. See http://pyropus.ca/ for details.
--------------------------------------------------------------------------
Back to top
Rick Root
*nix forums beginner


Joined: 12 Oct 2005
Posts: 10

PostPosted: Wed Jul 12, 2006 3:25 pm    Post subject: Re: Qmail, local accounts, and forwarding Reply with quote

Quote:
/var/qmail/alias/ is only consulted if the local users don't exist. i.e., if
the message is to <foo@...> and you have a local user foo,
/var/qmail/alias/.qmail-foo may as well not exist.

Ah, I didn't realize that because "root" is a real user...

Quote:
And yet, mail to root works, mail to dukescp does not.

1. Do you have a user "dukescp"?
2. "Does not work" doesn't mean much.

1. Yes.
2. Only if you ignore the rest of my message where I post the
actually log entry that shows the error occurring. ;)

Quote:
Sounds like you have a local user "dukescp", and your system-wide default
delivery instruction is to deliver to a maildir (maybe "./Maildir/"?), and
user dukescp doesn't have such a maildir.

I strongly suspect placing "&other_address" into ~dukescp/.qmail will do the
trick for you.

Charles, that was the solution, thank you for your help.

Posting to the list for achival purposes.

Rick
Back to top
Charles Cazabon
*nix forums Guru


Joined: 08 Jan 2005
Posts: 805

PostPosted: Wed Jul 12, 2006 4:26 pm    Post subject: Re: Qmail, local accounts, and forwarding Reply with quote

Rick Root <rick.root@webworksllc.com> wrote:
Quote:
/var/qmail/alias/ is only consulted if the local users don't exist. i.e.,
if the message is to <foo@...> and you have a local user foo,
/var/qmail/alias/.qmail-foo may as well not exist.

Ah, I didn't realize that because "root" is a real user...

Not from qmail's point of view. root doesn't satisfy the first condition that
`man qmail-getpw` lists for qmail to consider it a "real" user.

Quote:
Charles, that was the solution, thank you for your help.

You're welcome.

Quote:
Posting to the list for achival purposes.

And thanks for doing that.

Charles
--
--------------------------------------------------------------------------
Charles Cazabon <qmail@discworld.dyndns.org>
Read http://pyropus.ca/personal/writings/12-steps-to-qmail-list-bliss.html
My services include qmail consulting. See http://pyropus.ca/ for details.
--------------------------------------------------------------------------
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
The time now is Sun Nov 23, 2008 11:48 am | All times are GMT
navigation Forum index » Apps » Qmail
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts spoofed local email addresses watkykjy Postfix 0 Thu Nov 20, 2008 8:49 am
No new posts Transfer qmail email account to postfix server tallman Postfix 0 Thu Jun 05, 2008 12:43 pm
No new posts Filtering internal mail and forwarding to another domain fmaa1 Postfix 0 Wed Apr 30, 2008 12:50 pm
No new posts Postfix sending problem for local domain remote email monkey_magix Postfix 0 Mon Sep 10, 2007 10:17 am
No new posts mail forwarding loop killersushi Postfix 0 Tue Jan 23, 2007 3:43 am

Credit Card | Remortgages | Debt Consolidation | Credit Counseling | Bad Credit Loan
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1767s ][ Queries: 16 (0.0821s) ][ GZIP on - Debug on ]