postfix

61 views
Skip to first unread message

Ted Brenner

unread,
Mar 7, 2017, 10:56:05 PM3/7/17
to qubes...@googlegroups.com
Hi all,

I'm trying to setup postfix following this guide. But I'm not able to get a few things to work. 

First, the commands I added to /rw/config/rc.local don't seem to run. Namely, it doesn't appear to be mounting the /usr/local/etc/postfix directory in /etc/postfix. Also postfix doesn't appear to be running on startup. How do we tell if that gets run correctly?

Thanks!
Ted

--
Sent from my Desktop

Nick Darren

unread,
Mar 8, 2017, 1:08:29 AM3/8/17
to Ted Brenner, qubes...@googlegroups.com

On 03/08/2017 03:56 AM, Ted Brenner wrote:

Hi all,

I'm trying to setup postfix following this guide
<https://www.qubes-os.org/doc/postfix/>. But I'm not able to get a few
things to work.

First, the commands I added to /rw/config/rc.local don't seem to run.
Namely, it doesn't appear to be mounting the /usr/local/etc/postfix
directory in /etc/postfix. Also postfix doesn't appear to be running on
startup. How do we tell if that gets run correctly?

Thanks!
Ted


Did you 'chmod +x /rw/config/rc.local' before restart the vm or try to run sh /rw/config/rc.local to see either it is working or not?

signature.asc

lok...@gmail.com

unread,
Mar 8, 2017, 4:33:07 AM3/8/17
to qubes-users, griz...@gmail.com
On Wednesday, 8 March 2017 14:08:29 UTC+8, Nick Darren wrote:

> First, the commands I added to /rw/config/rc.local don't seem to run.
> Namely, it doesn't appear to be mounting the /usr/local/etc/postfix
> directory in /etc/postfix. Also postfix doesn't appear to be running on
> startup. How do we tell if that gets run correctly?

You have to set the executable bit on the script. If you don't do that, the script won't run.

Unman

unread,
Mar 8, 2017, 10:15:33 AM3/8/17
to Ted Brenner, qubes...@googlegroups.com
On Tue, Mar 07, 2017 at 09:56:02PM -0600, Ted Brenner wrote:
> Hi all,
>
> I'm trying to setup postfix following this guide
> <https://www.qubes-os.org/doc/postfix/>. But I'm not able to get a few
> things to work.
>
> First, the commands I added to /rw/config/rc.local don't seem to run.
> Namely, it doesn't appear to be mounting the /usr/local/etc/postfix
> directory in /etc/postfix. Also postfix doesn't appear to be running on
> startup. How do we tell if that gets run correctly?
>
> Thanks!
> Ted
>

Other have pointed out that you need to set the executable bit on
rc.local.
You might want to cnsider instead the use of bind-dirs :
www.qubes-os.org/doc/bind-dirs which provides similar functionality.

Ted Brenner

unread,
Mar 8, 2017, 10:32:49 AM3/8/17
to Unman, qubes...@googlegroups.com
Thanks all. Yes, this was the issue. Still can't get postfix to work but that now appears to be due to missing the aliases.db. 

Is there a reason rc.local isn't executable by default? 

Ted Brenner

unread,
Mar 8, 2017, 9:36:14 PM3/8/17
to Unman, qubes...@googlegroups.com
Quick follow up. What user is running rc.local? Is it root or user? I assume it is user since I'm seeing a permission denied when the call to run postfix tries to access the aliases.db file. So should I throw a sudo in front of the command to start postfix in the rc.local file? Or should I change the permissions on aliases.db? Per the instructions I'm also doing a mount command but that succeeds. Which is odd since if I try it as user, it fails saying only root can do it. Which is why I ask which user is running rc.local.

Unman

unread,
Mar 9, 2017, 7:57:34 AM3/9/17
to Ted Brenner, qubes...@googlegroups.com
It's root - you could see this by appending:
echo `whoami` >> /home/user/rc_perms
But I suspect you already know this.

What are the permissions on aliases.db?
What template are you using and do you have selinux enabled?


Ted Brenner

unread,
Mar 9, 2017, 10:24:37 PM3/9/17
to Unman, qubes...@googlegroups.com
Thanks Unman. I'm using Fedora-24 and selinux is not enabled. aliases.db is owned by root:root with rw-r--r--.  

Ted Brenner

unread,
Mar 10, 2017, 10:37:24 AM3/10/17
to Unman, qubes...@googlegroups.com
I think the source of my problem was that postfix does some initial configuration on its first launch. This requires the postfix-files file. But that didn't get copied to /usr/local/etc/postfix which is mounted over /etc/postfix. Once I added that file it launched successfully which appears to have properly set up the aliases.db file so now all appears to be well. Perhaps I'll submit a PR to update the postfix page to include copying postfix-files to /usr/local/etc/postfix.

bbrr...@gmail.com

unread,
May 22, 2017, 4:26:17 PM5/22/17
to qubes-users, un...@thirdeyesecurity.org
I've come across this too and created a PR for the docs: https://github.com/QubesOS/qubes-doc/pull/427
Reply all
Reply to author
Forward
0 new messages