<div dir="ltr"><a href="http://lmgtfy.com/?q=%2Fetc%2Fpostfix%2Fvirtual.db%3A+No+such+file+or+directory&l=1">http://lmgtfy.com/?q=%2Fetc%2Fpostfix%2Fvirtual.db%3A+No+such+file+or+directory&l=1</a><br><div><br></div>
<div>You need to execute "postmap /etc/postfix/virtual" after editing the file.</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 4 July 2013 20:48, Dotan Cohen <span dir="ltr"><<a href="mailto:dotancohen@gmail.com" target="_blank">dotancohen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On an Ubuntu Server 12.04 machine, I've set up an email forwarder for<br>
a specific address in /etc/postfix/virtual: <a href="mailto:example@mydomain.com">example@mydomain.com</a><br>
<a href="mailto:postfix-test@dotancohen.com">postfix-test@dotancohen.com</a><br>
<br>
The address <a href="mailto:postfix-test@dotancohen.com">postfix-test@dotancohen.com</a> works and receives mail. When<br>
I send mail to <a href="mailto:example@mydomain.com">example@mydomain.com</a> I get this in the logs:<br>
<br>
warning: hash:/etc/postfix/virtual is unavailable. open database<br>
/etc/postfix/virtual.db: No such file or directory<br>
warning: hash:/etc/postfix/virtual lookup error for "<a href="mailto:example@mydomain.com">example@mydomain.com</a>"<br>
warning: 705B58190E: virtual_alias_maps map lookup problem for<br>
<a href="mailto:example@mydomain.com">example@mydomain.com</a> -- deferring delivery<br>
<br>
Why might postfix be unable to find the /etc/postfix/virtual file?<br>
<br>
$ ls -la<br>
total 96<br>
drwxr-xr-x 3 root root 4096 Jul 4 08:46 .<br>
drwxr-xr-x 102 root root 4096 Jun 24 06:23 ..<br>
-rw-r--r-- 1 root root 274 Jun 24 06:23 <a href="http://dynamicmaps.cf" target="_blank">dynamicmaps.cf</a><br>
-rw-r--r-- 1 root root 1549 Jul 4 08:46 <a href="http://main.cf" target="_blank">main.cf</a><br>
-rw-r--r-- 1 root root 5531 Jun 24 06:23 <a href="http://master.cf" target="_blank">master.cf</a><br>
-rw-r--r-- 1 root root 19707 Feb 20 20:03 postfix-files<br>
-rwxr-xr-x 1 root root 8729 Feb 20 20:03 postfix-script<br>
-rwxr-xr-x 1 root root 26498 Feb 20 20:03 post-install<br>
drwxr-xr-x 2 root root 4096 Feb 20 20:03 sasl<br>
-rw-r--r-- 1 root root 43 Jul 4 08:27 virtual<br>
-rw-r--r-- 1 root root 130 Jul 4 08:26 vmailbox<br>
<br>
$ cat virtual<br>
<a href="mailto:example@mydomain.com">example@mydomain.com</a> <a href="mailto:post-test@dotancohen.com">post-test@dotancohen.com</a><br>
<br>
$ cat <a href="http://main.cf" target="_blank">main.cf</a> | grep virtual<br>
virtual_mailbox_domains = <a href="http://mydomain.com" target="_blank">mydomain.com</a><br>
virtual_mailbox_base = /var/mail/vhosts<br>
virtual_mailbox_maps = hash:/etc/postfix/vmailbox<br>
virtual_minimum_uid = 100<br>
virtual_uid_maps = static:5000<br>
virtual_gid_maps = static:5000<br>
virtual_alias_domains = <a href="http://fastupfront.com" target="_blank">fastupfront.com</a><br>
virtual_alias_maps = hash:/etc/postfix/virtual<br>
# virtual_alias_maps = /etc/postfix/virtual # I tried without the<br>
'hash:' prefix as well.<br>
<br>
Note that <a href="http://mydomain.com" target="_blank">mydomain.com</a> is anonymized. In fact, the domain name that is<br>
used in the files is a real domain name that does have its A and MX<br>
records pointed to the IP address of this server, and serving webpages<br>
with Apache works. The DNS records were changed last week, so I know<br>
that they have propagated.<br>
<br>
--<br>
Dotan Cohen<br>
<br>
<a href="http://gibberish.co.il" target="_blank">http://gibberish.co.il</a><br>
<a href="http://what-is-what.com" target="_blank">http://what-is-what.com</a><br>
<br>
_______________________________________________<br>
Linux-il mailing list<br>
<a href="mailto:Linux-il@cs.huji.ac.il">Linux-il@cs.huji.ac.il</a><br>
<a href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il" target="_blank">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">
<a href="http://www.linkedin.com/in/gliderflyer" target="_blank">
<span>
<img src="http://s4.licdn.com/scds/common/u/img/webpromo/btn_viewmy_160x25.png" alt="View my profile on LinkedIn" height="25" width="160">
</span></a></div>
</div>