LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   unable to configure postfix (https://www.linuxquestions.org/questions/linux-networking-3/unable-to-configure-postfix-255002/)

syl20 11-15-2004 05:47 AM

unable to configure postfix
 
Hi all,
I want to use postfix with users in /etc/passwd (no LDAP or database) and their mail in /var/spool/mail/.
Who is the owner (and group) of /var/spool/mail/, /var/spool/mail/steve, /var/spool/mail/steve/Maildir/?


My config is : postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
local_recipient_maps =
mail_owner = postfix
mail_spool_directory = /var/spool/mail
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = xxx.fr
myhostname = gw2.xxx.fr
mynetworks = 192.168.3.0/24, 127.0.0.0/8
myorigin = $myhostname
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP $mail_name
unknown_local_recipient_reject_code = 550

when I send an mail via 'mail steve', mailq ->empty, and no mail arrive in /var
/spool/mail/steve/Maildir (steve directory and Maildir were created via mkdir steve and Mkdir Maildir)
So my config doesn't work, what's the pbl?
Thx for u help.

akilles 11-15-2004 06:13 AM

I configged Postfix on my server at home, and I didn't really have to do much. The only thing I remember doing, (I'm not at my server now, so I can't output at list of changed config-values), is:
home_mailbox = Maildir/

I also wanted to use Maildir, but I wanted the folder to be:
/home/username/Maildir
I made the Maildir folder using mkdir, and set the permissions for the user in question.
I then set the config: home_mailbox = $HOME/Maildir
(Not sure if I put a / after Maildir.

-geir

syl20 11-16-2004 11:28 AM

when I set mailbox_transport = local, and i send an email from root to steve : with "mail steve", I get (from /var/log/maillog):

Nov 16 18:57:51 gw2 postfix/pickup[1462]: 0626485: uid=0 from=<root>
Nov 16 18:57:51 gw2 postfix/cleanup[1482]: 0626485: message-id=<419A3F9F.mail1531NKJH4@gw2.xxxx.fr>
Nov 16 18:57:51 gw2 postfix/qmgr[1463]: 0626485: from=<root@gw2.xxxx.fr>, size=402, nrcpt=1 (queue active)

and the email stays in the active queue, it never comes in steve maildir... :(

thx to help me, I don't know what to do.

akilles 11-17-2004 03:15 AM

Take a look at this link: http://www.jennings.homelinux.net/ma...er_config.html

If that still doesn't help, I'll do a print-out of my config-file at home, which works and you'll be able to compare.
The only thing is: I don't use /var/spool/mail/username
As mentioned earlier I use /home/username

syl20 11-17-2004 03:54 AM

Hi akilles, thx for your contribution.

I'm now able to send an mail from anywhere to a people of my mail server. For example I send an email from yahoo to steve@gw2.xxxx.fr, steve receive an email in /var/spool/mail/steve/Maildir/new. 5I changed permissions, owner and group of steve's directory an d subdirectory like this:
1 drwxrw---- 3 steve popusers 104 2004-11-16 10:33 steve-
But when I log into my mail server with steve profile and entre mail command -> no mail for steve....
It will be soon OK, I hope.
Perhaps, that's because I use Maildir/, that mail command isn't OK? I will install courier Imap to try to get mail...

my conf is : # postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
inet_interfaces = $myhostname, localhost
local_recipient_maps = unix:passwd.byname $alias_maps
mail_owner = postfix
mail_spool_directory = /var/spool/mail
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/man
mydestination = $myhostname, $myhostname.$mydomain, localhost.$mydomain, localhost,
mydomain = xxxx.fr
myhostname = gw2
mynetworks = 192.168.3.0/24, 127.0.0.0/8
myorigin = $myhostname
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP $mail_name
unknown_local_recipient_reject_code = 550

akilles 11-17-2004 04:03 AM

I don't think the mail command reads the Maildir/ format. (Not sure about this though.)
Courier-IMAP configged to read Maildir/ is great. Wasn't all that difficult to set up either.
Then using Thunderbird or any other mailclient supporting the IMAP protocol, and you should be laughing. ;)

-Geir


All times are GMT -5. The time now is 01:06 AM.