hi
howto configure mailx ?
kind regards
ccc
hi
howto configure mailx ?
kind regards
ccc
mailx is already configured once it's installed. What seems to be the problem?
Carl
I cannot send any mails to the root user;
ext:/var/mail# echo "Message" | mailx -s "this is a test mail" root@localhost
ext:/var/mail# mail
No mail for root
other user get mails without problems.
I have debian sarge stable with postfix installed.
ext:/# newaliases
ext:/# postmap /etc/aliases
postmap: warning: /etc/aliases, line 2: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 3: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 4: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 5: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 6: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 7: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 8: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 9: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 10: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 11: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 12: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 14: record is in "key: value" format; is this an alias file?
ext:/# postalias /etc/aliases
ext:/# cat /etc/aliases
# /etc/aliases
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
ext:/# postconf alias_maps
alias_maps = hash:/etc/aliases
ext:/# /etc/init.d/postfix restart
Stopping mail transport agent: Postfix.
Starting mail transport agent: Postfix.
greetings
cc
Do a:
grep root /etc/mail/aliases
I suspect root's mail is going somewhere else.
Carl
ext:/# grep root /etc/mail/aliases
grep: /etc/mail/aliases: No such file or directory
maybe:
ext:/# grep root /etc/aliases
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
ext:/#
It might be in /etc/aliases as well depending on how it's installed on debian. I have Mandrake and that's where mine is.
Carl
I tried to add:
root: root
in /etc/aliases, but it doesn't help.
Well unless you rebuild the aliases database file it won't make any difference either way.
/usr/sbin/sendmail -bi
However, what results did you have with grepping for root in aliases? If root isn't in /etc/aliases then adding it probably won't change anything.
Hmm, did you check root's home directory to see if there's a .forward file and/or a .procmailrc file? Maybe it's being forwarded somewhere.
Carl
I found only this and I've deleted:
ext:~# cat .forward
| mailx linux@localhost
but still doesn't work.
ext:/# grep root /etc/aliases
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
I've done:
ext:~# dpkg-reconfigure postfix
and now it seems to work.
p.s
thanks a lot !
Sure, happy to help. I'd be curious as to where all those test messages actually went to. Did you check the linux account's /var/mail/linux mailbox? Either the test messages you've been sending are there or there's a redirect in /etc/mail/aliases or a .forward file that's sending the messages somewhere else.
Basically I hate just pressing that magic "Easy" button and having it work. I'd hunt down where the messages went and then why reconfiguring postfix corrected the problem. Did you rebuild the /etc/aliases file with the sendmail command I used earlier? Perhaps root was being redirected in /etc/aliases and the database wasn't rebuilt after the correction and the postfix reconfiguration also rebuilt the /etc/aliases database file.
See what I mean? I hate "Easy" buttons
Carl
I sent a lot of test mails to the root user, but couldn't find them in /var/mail/linux.
I cannot understand,
in a .forward file was: linux@localhost, but linux@localhost didn't get any root mails.
perhaps they were sent to the nirwana...
and I couldn't send any mails from outside to the root user. all mails to the root were denied.
now it works well.