PDA

Bekijk de volledige versie : Need help with installing MTA (postfix)



sturkel
03-07-2008, 10:25
I always used postfix as mta under debian/ubuntu.
From now I want to use my wl-500gp as server, but can't get postfix working.
When i download and install the package i get the next message:

Configuring postfix
creating new user(s) and group(s) ...
-> backup /etc/group.postfix-save ceated
-> new group maildrop created
-> maildrop:x:69:
changing permissions of /opt/var/spool/postfix/* ... chown: unknown group name: mail
chown: unknown user name: mail
chown: unknown user name: mail
ok
changing permissions of /opt/sbin/post* ... ok

Please read the man-pages and docs carefully,
$ ipkg install postfix-doc
$ less /opt/share/doc/postfix/readme/BASIC_CONFIGURATION_README

then configure postfix,
$ vi /opt/etc/postfix/main.cf
$ vi /opt/etc/aliasas
$ newaliasas

and start the server
$ /opt/etc/init.d/S69postfix

Successfully terminated.

I can't find the commands (groupadd and useradd) to make the mail user and group.
The biggest problem comes with running the deamon:

[root@WL500gP sbin]$ /opt/etc/init.d/S69postfix
starting service postfix
/opt/etc/init.d/S69postfix: /opt/etc/init.d/S69postfix: 47: /opt/sbin/postfix: not found

The postfix executable is available in the /opt/sbin directory.
Who can help me to get the MTA working.

Jospfh
09-07-2008, 14:44
To add users manually install the adduser package:

ipkg install adduser

I get same same error from chown:

Configuring libnsl
Configuring postfix
creating new user(s) and group(s) ...
-> backup /etc/group.postfix-save ceated
-> new group maildrop created
-> maildrop:x:69:
changing permissions of /opt/var/spool/postfix/* ... chown: unknown group name: mail
chown: unknown user name: mail
chown: unknown user name: mail
ok
changing permissions of /opt/sbin/post* ... chown: unknown user name: root
chown: unknown user name: root
ok


Yes, my config does not have a root user...

But when running postfix I get a different error (one that makes sense):
/opt/etc/init.d/S69postfix start
starting service postfix
postfix: fatal: file /opt/etc/postfix/main.cf: parameter mail_owner: unknown user name value: mail

sturkel
10-07-2008, 09:51
To add users manually install the adduser package:

ipkg install adduser

I get same same error from chown:

Configuring libnsl
Configuring postfix
creating new user(s) and group(s) ...
-> backup /etc/group.postfix-save ceated
-> new group maildrop created
-> maildrop:x:69:
changing permissions of /opt/var/spool/postfix/* ... chown: unknown group name: mail
chown: unknown user name: mail
chown: unknown user name: mail
ok
changing permissions of /opt/sbin/post* ... chown: unknown user name: root
chown: unknown user name: root
ok


Yes, my config does not have a root user...

But when running postfix I get a different error (one that makes sense):
/opt/etc/init.d/S69postfix start
starting service postfix
postfix: fatal: file /opt/etc/postfix/main.cf: parameter mail_owner: unknown user name value: mail

I added the user mail manually to the /etc/passwd and added mail to /etc/group.
After that change postfix report that the service is started, but I only see the qmgr with 'ps aux'.
On my other system running debian I see the following processes:
pickup -l -t fifo -u -c -o content_filter -o receive_override_options no_header_body_checks
/usr/lib/postfix/master
qmgr -l -t fifo -u

When I try to telnet the localhost on port 25 I don't even get a connection.

wengi
10-07-2008, 11:39
Hi,

maybe i am a bit wrong, but
creating new user(s) and group(s) ...
-> backup /etc/group.postfix-save ceated
-> new group maildrop created
-> maildrop:x:69:
changing permissions of /opt/var/spool/postfix/* ... chown: unknown group name: mail
chown: unknown user name: mail
chown: unknown user name: mailcreating a user and group called maildrop and then trying to chown for a user/group called mail must fail...

wengi

sturkel
10-07-2008, 11:45
Hi,

maybe i am a bit wrong, but
creating new user(s) and group(s) ...
-> backup /etc/group.postfix-save ceated
-> new group maildrop created
-> maildrop:x:69:
changing permissions of /opt/var/spool/postfix/* ... chown: unknown group name: mail
chown: unknown user name: mail
chown: unknown user name: mailcreating a user and group called maildrop and then trying to chown for a user/group called mail must fail...

wengi
You are right, but when I look inside the .ipk file, there is a postinst file what containt:

#!/bin/sh
OPTWARE_TARGET=oleg

if [ ${OPTWARE_TARGET} = "vt4" ] ; then
mail_owner=admin
mail_group=101
setgid_group=maildrop
setgid_group_id=106
else
mail_owner=mail
mail_group=mail
setgid_group=maildrop
setgid_group_id=69
fi
group_file=/etc/group

/bin/echo -n "creating new user(s) and group(s) ... "
if [ -z "`/bin/grep \"\(^$setgid_group\b\|:$setgid_group_id\):\" $group_file`" ] ; then
/bin/cp $group_file $group_file.postfix-save
/bin/echo -e "\n\t -> backup $group_file.postfix-save ceated"
/bin/sed -i "s/^\(nobody\)/$setgid_group:x:$setgid_group_id:\n\1/g" $group_file
/bin/echo -e "\t -> new group $setgid_group created"
/bin/echo -e "\t -> `/bin/grep \"\(^$setgid_group\b\|:$setgid_group_id\):\" $group_file`"
else
/bin/echo "failed"
fi
so I suggest that there has to be both user and group mail and a group maildrop.
maildrop group is created by the installer.
What am I doing wrong?
Telnet won't connect on port 25 even after 2 hours (where's the timeout?)

update:
postifx is now started, the alias database was not build. (this was a default setting in other distributions for as far as I remember)

sturkel
14-07-2008, 16:19
The MTA is working now and I can receive mail on it.
The next problem is connecting to the machine through imap.
I can only locate the cyrus-imapd.
I was common with courier-imap, but it's not in the ipkg list.
Installing cyrus comes with some errors:

set saslpasswd2 for user 'mail' ... listusers failed
failed
changing permission ...
chown: /opt/etc/sasl2: No such file or directory
chmod: /opt/etc/sasl2: No such file or directory
The listusers fails because the db doesn't exist:
unable to open Berkeley db /opt/etc/sasl2: No such file or directory
Also the sals2 in the /opt/etc dir doesn't exist.
Does someone know how to solve this errors?
If it's easy to compile courier-imap I want to try that option, but a dependency of courier-imap is courier-authlib so I think I have to build a bench of files.

wengi
15-07-2008, 07:27
Hi,

i am not sure, but maybe the cyrus-sasl packages will solve your probs.
Have a look at http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/ or do a 'ipkg list | grep -i cyrus'

wengi

sturkel
15-07-2008, 07:53
Hi,

i am not sure, but maybe the cyrus-sasl packages will solve your probs.
Have a look at http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/ or do a 'ipkg list | grep -i cyrus'

wengi
The sasl packages were already installed and I tried to find al the dependencies, but it fails.
After googeling I find dovecot, maybe that imap daemon will help me.

sturkel
16-07-2008, 09:52
Like cyrus, dovecot gives me also some errors, which I can't explain.
dovecot.conf
base_dir = /opt/var/run/dovecot
protocols = imap
ssl_disable = yes
disable_plaintext_auth = no
log_path =/opt/var/log/dovecot.log
info_log_path =/opt/var/log/dovecot.info
#login_user = root#dovecot
login_process_size = 32
login_process_per_connection = yes
login_processes_count = 3
login_max_processes_count = 128
first_valid_uid = 1
last_valid_uid = 0
default_mail_env = maildir:/tmp/harddisk/mail/%u/Maildir
auth_verbose = yes

auth default {
# Space separated list of wanted authentication mechanisms:
# plain digest-md5 cram-md5 apop anonymous
mechanisms = plain
passdb passwd-file {
args = /opt/etc/dovecot/users
}
userdb static {
args = uid=info gid=info home=/tmp/harddisk/mail/%u
}
}
/opt/etc/dovecot/users is owned by dovecot:dovecot with chmod 777
The only mailbox available is 'info' owned by info:info
The error from /opt/var/log/dovecot.log:
dovecot: Jul 16 10:48:39 Error: Auth process died too early - shutting down
dovecot: Jul 16 10:48:39 Error: auth(default): Panic: Leaked file fd 7: dev 0.5 inode 175292
dovecot: Jul 16 10:48:39 Error: child 7846 (auth) killed with signal 6
I can't find a solution to solve this, because I can't find the actual error.

update:
after a reboot all things are correctly started, but when I restart dovecot I get the error above
1857 ? S 0:00 \_ dovecot-auth
1861 ? S 0:00 \_ [imap-login]
1860 ? S 0:00 \_ [imap-login]
1862 ? S 0:00 \_ [imap-login]
I can't match that.

maslokm
07-05-2009, 21:30
Hello.
I have Dovecot and Postfix working fine. You just need to create all missing users and groups.