[Resolved] Getting Postfix to work with Logwatch

So I setup a linode yesterday and this is my first real venture into setting everything up from scratch with linux. I followed this guide to setup logwatch which should allow me to email myself log files, it handled the postfix installation, but for some reason it doesn't work.

I've tried google that suggested some things, but so far nothing I've tried has helped, any ideas?

root@TIA568B:/etc/postfix# logwatch --mailto testing <at>tia568b.com
root@TIA568B:/etc/postfix# cat /var/log/mail.log
Sep 10 17:44:14 localhost postfix/cleanup[24472]: fatal: open database /etc/postfix/virtual.db: No such file or directory
Sep 10 17:44:15 localhost postfix/master[19740]: warning: process /usr/lib/postfix/cleanup pid 24472 exit status 1
Sep 10 17:44:15 localhost postfix/master[19740]: warning: /usr/lib/postfix/cleanup: bad command startup -- throttling
Sep 10 17:44:24 localhost postfix/smtpd[24473]: fatal: open database /etc/postfix/virtual.db: No such file or directory
Sep 10 17:44:25 localhost postfix/master[19740]: warning: process /usr/lib/postfix/smtpd pid 24473 exit status 1
Sep 10 17:44:25 localhost postfix/master[19740]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
root@TIA568B:/etc/postfix# postmap  /etc/postfix/virtual.db
postmap: fatal: open /etc/postfix/virtual.db: No such file or directory
root@TIA568B:/etc/postfix# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
home_mailbox = mail/
inet_interfaces = all
mailbox_size_limit = 0
mydestination = tia568b.com, localhost.com, , localhost
myhostname = tia568b.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = hash:/etc/postfix/virtual</at> 

The pages I found suggest fatal: open database /etc/postfix/virtual.db: No such file or directory can be dealt with via postmap /etc/postfix/virtual.db, but for whatever reason this doesn't work with me.

Edit: I've tried creating an empty file at /etc/postfix/virtual.db before running postmap, but it postmap doesn't seem to do anything with it.

Any ideas? I'm sure I'm just being a complete newb here, but it's completely new to me and my google-fu is failing me :(

2 Replies

> virtualaliasmaps = hash:/etc/postfix/virtual
you need that file to exist, put your mappings in it.

and then run postmap /etc/postfix/virtual which will in turn create /etc/postfix/virtual.db

@Internat:

> virtualaliasmaps = hash:/etc/postfix/virtual
you need that file to exist, put your mappings in it.

and then run postmap /etc/postfix/virtual which will in turn create /etc/postfix/virtual.db Thank you very much! :D Working now :)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct