LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   /etc/aliases.db No such file or directory (https://www.linuxquestions.org/questions/linux-server-73/etc-aliases-db-no-such-file-or-directory-627538/)

ncsuapex 03-12-2008 11:56 AM

/etc/aliases.db No such file or directory
 
Getting errors when I try to run the newaliases command. Also getting the errors in the maillog


EDIT: Does port 25 need to be open on the router to receive mail?


I also can't receive external(internet mail) but I can send mail with mutt and mail


postmap /etc/aliases
postmap: fatal: cannot remove zero-length database file /etc/aliases.db: Permission denied

postmap /etc/aliases
postmap: fatal: open database /etc/aliases.db: Permission denied

rw-rw-rw- 1 postfix postfix 8843 2008-03-12 12:48 aliases
-rw-r--r-- 1 postfix postfix 0 2008-03-12 12:49 aliases.db
root@myhostname.us:/etc# newaliases
postalias: fatal: cannot remove zero-length database file /etc/aliases.db: Permission denied
root@myhostname.us:/etc# postalias aliases
postalias: fatal: cannot remove zero-length database file aliases.db: Permission denied
root@myhostname.us:/etc#


postconf -n
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = /usr/doc/postfix/html
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/man
myhostname = myhostname.us
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/doc/postfix
relayhost = [smtp.earthlink.net]
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
unknown_local_recipient_reject_code = 550

FNC 03-12-2008 03:07 PM

Try to change the permission on aliases.db

chmod 666 aliases.db

ncsuapex 03-12-2008 03:19 PM

^ I had tried that before and got the same error. I think I fixed it but I still can not receive internet mail.


I cp aliases aliases.db
then ran new aliases and didn't get any errors.


I can send from my PC to internet mail but I can not receive mail on my PC if I reply from the internet mail to my username on the pc



Mar 12 16:08:40 myhostname.us postfix/postfix-script: stopping the Postfix mail system
Mar 12 16:08:40 myhostname.us postfix/master[26654]: terminating on signal 15
Mar 12 16:08:41 myhostname.us postfix/postfix-script: warning: group or other writable: /etc/postfix/./aliases
Mar 12 16:08:41 myhostname.us postfix/postfix-script: starting the Postfix mail system
Mar 12 16:08:41 myhostname.us postfix/master[1048]: daemon started -- version 2.3.3, configuration /etc/postfix
Mar 12 16:15:06 myhostname.us postfix/pickup[1049]: E5326AFDE9: uid=0 from=<root>
Mar 12 16:15:06 myhostname.us postfix/cleanup[1112]: E5326AFDE9: message-id=<20080312201506.E5326AFDE9@myhostname.us.us>
Mar 12 16:15:06 myhostname.us postfix/qmgr[1050]: E5326AFDE9: from=<root@myhostname.us.us>, size=1443, nrcpt=1 (queue active)
Mar 12 16:15:06 myhostname.us postfix/local[1114]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Mar 12 16:15:06 myhostname.us postfix/local[1114]: E5326AFDE9: to=<myusername@myhostname.us.us>, orig_to=<root>, relay=local, delay=0.02, delays=0.01/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Mar 12 16:15:06 myhostname.us postfix/qmgr[1050]: E5326AFDE9: removed



# postmap /etc/aliases
postmap: warning: /etc/aliases, line 15: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 16: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 19: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 20: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 21: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 22: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 23: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 24: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 25: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 26: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 29: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 31: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 32: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 33: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 34: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 37: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 233: record is in "key: value" format; is this an alias file?

FNC 03-12-2008 05:58 PM

You do need port 25 to be able to receive email.

ncsuapex 03-12-2008 07:50 PM

opened 25 for tcp and mail is pouring in!


All times are GMT -5. The time now is 08:02 PM.