LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-20-2012, 04:55 PM   #1
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 430
Blog Entries: 30

Rep: Reputation: 3
postfix: error: open database /etc/aliases.db: No such file or directory


Hi, I am trying to get fetchmail work with postfix, but the postfix does not work properly:
Code:
Aug 21 04:52:31 vector fetchmail[4827]: sleeping at Tue 21 Aug 2012 04:52:31 AM CST for 30 seconds 
Aug 21 04:53:01 vector fetchmail[4827]: awakened at Tue 21 Aug 2012 04:53:01 AM CST 
Aug 21 04:53:01 vector fetchmail[4827]: 6.3.19 querying pop.gmail.com (protocol POP3) at Tue 21 Aug 2012 04:53:01 AM CST: poll started 
Aug 21 04:53:02 vector fetchmail[4827]: Trying to connect to 173.194.79.109/995...connected. 
Aug 21 04:53:03 vector fetchmail[4827]: Server certificate: 
Aug 21 04:53:03 vector fetchmail[4827]: Issuer Organization: Google Inc 
Aug 21 04:53:03 vector fetchmail[4827]: Issuer CommonName: Google Internet Authority 
Aug 21 04:53:03 vector fetchmail[4827]: Subject CommonName: pop.gmail.com 
Aug 21 04:53:03 vector fetchmail[4827]: pop.gmail.com key fingerprint: B8:AF:A7:80:CD:E2:31:50:6F:ED:0E:4F:C8:04:D6:CD 
Aug 21 04:53:03 vector fetchmail[4827]: POP3< +OK Gpop ready for requests from 114.37.36.143 b9pf30166285pbr.19 
Aug 21 04:53:03 vector fetchmail[4827]: POP3> CAPA 
Aug 21 04:53:03 vector fetchmail[4827]: POP3< +OK Capability list follows 
Aug 21 04:53:03 vector fetchmail[4827]: POP3< USER 
Aug 21 04:53:03 vector fetchmail[4827]: POP3< RESP-CODES 
Aug 21 04:53:03 vector fetchmail[4827]: POP3< EXPIRE 0 
Aug 21 04:53:03 vector fetchmail[4827]: POP3< LOGIN-DELAY 300 
Aug 21 04:53:03 vector fetchmail[4827]: POP3< TOP 
Aug 21 04:53:03 vector fetchmail[4827]: POP3< UIDL 
Aug 21 04:53:03 vector fetchmail[4827]: POP3< X-GOOGLE-VERHOEVEN 
Aug 21 04:53:03 vector fetchmail[4827]: POP3< X-GOOGLE-RICO 
Aug 21 04:53:03 vector fetchmail[4827]: POP3< . 
Aug 21 04:53:03 vector fetchmail[4827]: POP3> USER server@tedchou12.cz.cc 
Aug 21 04:53:04 vector fetchmail[4827]: POP3< +OK send PASS 
Aug 21 04:53:04 vector fetchmail[4827]: POP3> PASS * 
Aug 21 04:53:04 vector fetchmail[4827]: POP3< +OK Welcome. 
Aug 21 04:53:04 vector fetchmail[4827]: POP3> STAT 
Aug 21 04:53:04 vector fetchmail[4827]: POP3< +OK 1 2943 
Aug 21 04:53:04 vector fetchmail[4827]: POP3> UIDL 
Aug 21 04:53:05 vector fetchmail[4827]: POP3< +OK 
Aug 21 04:53:05 vector fetchmail[4827]: POP3< 1 GmailId13945cf462d3ed0a 
Aug 21 04:53:05 vector fetchmail[4827]: POP3< . 
Aug 21 04:53:05 vector fetchmail[4827]: 1 message for server@tedchou12.cz.cc at pop.gmail.com (2943 octets). 
Aug 21 04:53:05 vector fetchmail[4827]: POP3> LIST 1 
Aug 21 04:53:05 vector fetchmail[4827]: POP3< +OK 1 2943 
Aug 21 04:53:05 vector fetchmail[4827]: POP3> RETR 1 
Aug 21 04:53:05 vector fetchmail[4827]: POP3< +OK message follows 
Aug 21 04:53:25 vector fetchmail[4827]: reading message server@tedchou12.cz.cc@pb-in-f108.1e100.net:1 of 1 (2943 octets)Trying to connect to 127.0.0.1/25...connected. 
Aug 21 04:53:28 vector postfix/smtpd[5001]: error: open database /etc/aliases.db: No such file or directory
Aug 21 04:53:28 vector postfix/smtpd[5001]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled

I tried to create a blank file /etc/aliases.db and the error turns to:
Code:
Aug 21 04:50:13 vector fetchmail[4827]: Issuer Organization: Google Inc 
Aug 21 04:50:13 vector fetchmail[4827]: Issuer CommonName: Google Internet Authority 
Aug 21 04:50:13 vector fetchmail[4827]: Subject CommonName: pop.gmail.com 
Aug 21 04:50:13 vector fetchmail[4827]: pop.gmail.com key fingerprint: B8:AF:A7:80:CD:E2:31:50:6F:ED:0E:4F:C8:04:D6:CD 
Aug 21 04:50:14 vector fetchmail[4827]: POP3< +OK Gpop ready for requests from 114.37.36.143 uw8pf45431711pbc.39 
Aug 21 04:50:14 vector fetchmail[4827]: POP3> CAPA 
Aug 21 04:50:14 vector fetchmail[4827]: POP3< +OK Capability list follows 
Aug 21 04:50:14 vector fetchmail[4827]: POP3< USER 
Aug 21 04:50:14 vector fetchmail[4827]: POP3< RESP-CODES 
Aug 21 04:50:14 vector fetchmail[4827]: POP3< EXPIRE 0 
Aug 21 04:50:14 vector fetchmail[4827]: POP3< LOGIN-DELAY 300 
Aug 21 04:50:14 vector fetchmail[4827]: POP3< TOP 
Aug 21 04:50:14 vector fetchmail[4827]: POP3< UIDL 
Aug 21 04:50:14 vector fetchmail[4827]: POP3< X-GOOGLE-VERHOEVEN 
Aug 21 04:50:14 vector fetchmail[4827]: POP3< X-GOOGLE-RICO 
Aug 21 04:50:14 vector fetchmail[4827]: POP3< . 
Aug 21 04:50:14 vector fetchmail[4827]: POP3> USER server@tedchou12.cz.cc 
Aug 21 04:50:14 vector fetchmail[4827]: POP3< +OK send PASS 
Aug 21 04:50:14 vector fetchmail[4827]: POP3> PASS * 
Aug 21 04:50:15 vector fetchmail[4827]: POP3< +OK Welcome. 
Aug 21 04:50:15 vector fetchmail[4827]: POP3> STAT 
Aug 21 04:50:15 vector fetchmail[4827]: POP3< +OK 1 2425 
Aug 21 04:50:15 vector fetchmail[4827]: POP3> UIDL 
Aug 21 04:50:15 vector fetchmail[4827]: POP3< +OK 
Aug 21 04:50:15 vector fetchmail[4827]: POP3< 1 GmailId13945ccada441fb3 
Aug 21 04:50:15 vector fetchmail[4827]: POP3< . 
Aug 21 04:50:15 vector fetchmail[4827]: 1 message for server@tedchou12.cz.cc at pop.gmail.com (2425 octets). 
Aug 21 04:50:15 vector fetchmail[4827]: POP3> LIST 1 
Aug 21 04:50:16 vector fetchmail[4827]: POP3< +OK 1 2425 
Aug 21 04:50:16 vector fetchmail[4827]: POP3> RETR 1 
Aug 21 04:50:16 vector fetchmail[4827]: POP3< +OK message follows 
Aug 21 04:50:36 vector fetchmail[4827]: reading message server@tedchou12.cz.cc@pb-in-f108.1e100.net:1 of 1 (2425 octets)Trying to connect to 127.0.0.1/25...connected. 
Aug 21 04:50:40 vector postfix/smtpd[4953]: error: open database /etc/aliases.db: Invalid argument
Aug 21 04:50:40 vector postfix/smtpd[4953]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Aug 21 04:50:50 vector postfix/smtpd[4953]: connect from localhost[127.0.0.1]
Aug 21 04:50:50 vector fetchmail[4827]: SMTP< 220 vector.linux.net ESMTP Postfix 
Aug 21 04:50:50 vector fetchmail[4827]: SMTP> EHLO vector.linux.net 
Aug 21 04:50:50 vector fetchmail[4827]: SMTP< 250-vector.linux.net 
Aug 21 04:50:50 vector fetchmail[4827]: SMTP< 250-PIPELINING 
Aug 21 04:50:50 vector fetchmail[4827]: SMTP< 250-SIZE 10240000 
Aug 21 04:50:50 vector fetchmail[4827]: SMTP< 250-VRFY 
Aug 21 04:50:50 vector fetchmail[4827]: SMTP< 250-ETRN 
Aug 21 04:50:50 vector fetchmail[4827]: SMTP< 250-ENHANCEDSTATUSCODES 
Aug 21 04:50:50 vector fetchmail[4827]: SMTP< 250-8BITMIME 
Aug 21 04:50:50 vector fetchmail[4827]: SMTP< 250 DSN 
Aug 21 04:50:50 vector fetchmail[4827]: SMTP> MAIL FROM:<ted_chou12@hotmail.com> SIZE=2425 
Aug 21 04:50:52 vector fetchmail[4827]: SMTP< 250 2.1.0 Ok 
Aug 21 04:50:52 vector fetchmail[4827]: SMTP> RCPT TO:<root@localhost> 
Aug 21 04:50:52 vector postfix/smtpd[4953]: warning: hash:/etc/aliases is unavailable. open database /etc/aliases.db: Invalid argument
Aug 21 04:50:52 vector postfix/smtpd[4953]: warning: hash:/etc/aliases lookup error for "root@localhost.linux.net"
Aug 21 04:50:52 vector postfix/smtpd[4953]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 451 4.3.0 <root@localhost>: Temporary lookup failure; from=<ted_chou12@hotmail.com> to=<root@localhost> proto=ESMTP helo=<vector.linux.net>
Aug 21 04:50:52 vector fetchmail[4827]: SMTP< 451 4.3.0 <root@localhost>: Temporary lookup failure 
Aug 21 04:50:52 vector fetchmail[4827]: SMTP error: 451 4.3.0 <root@localhost>: Temporary lookup failure 
Aug 21 04:50:52 vector fetchmail[4827]: SMTP> RSET
Am I missing any setups?
Thanks,
Ted
 
Old 08-20-2012, 09:13 PM   #2
Ygrex
Member
 
Registered: Nov 2004
Location: Russia (St.Petersburg)
Distribution: Debian
Posts: 666

Rep: Reputation: 68
it should be in berkeley db format, just create it with postalias: https://wiki.archlinux.org/index.php...tfix.2Faliases
 
1 members found this post helpful.
Old 08-21-2012, 09:35 AM   #3
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 430

Original Poster
Blog Entries: 30

Rep: Reputation: 3
Thanks ygrex, I can't seem to get posfix to work properly, i think it requires some dependencies from mysql, so I am trying to get fetchmail to work with sendmail, becuase I have got this to work in the past before. What I don't get is that I have installed both sendmail and sendmail-cf, I built a sendmail.c file with different mc files (each times I tried differently), but the 25 port is keep refusing me. Here are some of my trials:
Code:
root:# telnet 127.0.0.1 25
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
vector:/~
root:# telnet 127.0.0.1 25
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
vector:/~
root:# killall sendmail
vector:/~
root:# sendmail
Recipient names must be specified
vector:/~
root:# telnet 127.0.0.1 25
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused

root:# cd /etc/mail
vector://etc/mail
root:# ls
Makefile   aliases.db      local-host-names  sendmail.cf.old  trusted-users
access     domaintable     mailertable       sendmail.mc      virtusertable
access.db  domaintable.db  mailertable.db    statistics       virtusertable.db
aliases    helpfile        sendmail.cf       submit.cf
I am pretty sure that sendmail is installed correctly, fetchmail seems to be able to search for the emails correctly, but I am only left with the barrier to connect to port 25 at localhost just to move the remote emails to the local server.
 
Old 08-21-2012, 09:52 AM   #4
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 430

Original Poster
Blog Entries: 30

Rep: Reputation: 3
NEvermind! ive got it to work. The script lies in:
/etc/rc.d/rc.sendmail start
thanks to this blogger:
http://n00bsys0p.wordpress.com/2010/...ndmail-server/
 
Old 01-14-2016, 01:56 AM   #5
michalzuber
LQ Newbie
 
Registered: Jan 2016
Location: Slovakia
Distribution: Arch Linux
Posts: 1

Rep: Reputation: Disabled
Another fix

I found another solution at serverfault.com/a/506358/78526
Running command
Code:
newaliases
should create the missing DB file.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix error: private/smtp No such file or directory sohmc Linux - Server 1 12-29-2011 08:52 AM
[SOLVED] SQLite: Trying to open a database file in sqlitebrowser returns an error Kenny_Strawn Linux - Server 2 10-31-2010 06:24 PM
Postfix Aliases & Active Directory paul_mat Linux - Networking 0 11-17-2005 12:09 AM
Postfix No such file or directory error on receiving mail jimieee Linux - Software 1 03-26-2004 07:25 AM
Postfix and the aliases file MasterC Linux - General 5 01-16-2003 04:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration