Current time: 05-20-2024, 09:30 AM Hello There, Guest! (LoginRegister)


Post Reply 
[FreeBSD] Need solutions for a chrooted Postfix & Cron
Author Message
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #4
RE: [FreeBSD] Need solutions for a chrooted Postfix & Cron
Quote:Try

mv /usr/local/etc/sasldb2 /var/spool/postfix/usr/local/etc/sasldb2
ln -s /var/spool/postfix/usr/local/etc/sasldb2 /usr/local/etc/sasldb2
Of course! I understand - we go the other way Smile
I will try it.
Quote:Directly copying files to /var/cron/tabs is not recommended.
Correct! I did this on my Testmachine to see if this way *could* work.
In the Install-HowTo i used "crontab -e" and copy & paste.
Quote:Additionally, /var/cron/tabs/root follows the "user crontab" format (you can not specify the user as which the command will be executed).
I know about it, but the funny thing is that we only use "root" in the crons this time.
Yes - there is a /etc/crontab:
Code:
# /etc/crontab - root's crontab for FreeBSD
#
# $FreeBSD: src/etc/crontab,v 1.33.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $
#
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
#
#minute hour    mday    month   wday    who     command
#
*/5     *       *       *       *       root    /usr/libexec/atrun
#
# Save some entropy so that /dev/random can re-seed on boot.
*/11    *       *       *       *       operator /usr/libexec/save-entropy
#
# Rotate log files every hour, if necessary.
0       *       *       *       *       root    newsyslog
#
# Perform daily/weekly/monthly maintenance.
1       3       *       *       *       root    periodic daily
15      4       *       *       6       root    periodic weekly
30      5       1       *       *       root    periodic monthly
#
# Adjust the time zone if the CMOS clock keeps local time, as opposed to
# UTC time.  See adjkerntz(8) for details.
1,31    0-5     *       *       *       root    adjkerntz -a
So we should add our crons here ?

Greez BeNe
Ok, it works Smile

The trick is - you have to create two "/etc" folders!
/var/spool/postfix/etc for the system files
Code:
umask 022
mkdir /var/spool/postfix/etc
chmod 755 /var/spool/postfix/etc
cd /etc ; cp host.conf localtime services resolv.conf /var/spool/postfix/etc
/var/spool/postfix/usr/local/etc/ for the sasldb2
Code:
# mkdir -p /var/spool/postfix/usr/local/etc/
# mv /usr/local/etc/sasldb2 /var/spool/postfix/usr/local/etc/sasldb2
# ln -s /var/spool/postfix/usr/local/etc/sasldb2 /usr/local/etc/sasldb2
If i have only one of both etc-folder the sasldb2 isn´t found OR i get domain not found because of the missing resolv.conf

I´m a littebit confused now - but it works this way!
ispCP also updates the sasldb2 fine inside the chroot from extern.
But could that be with that etc-Folders ?

If so - we can create, copy and link this during the make install ?

Greez BeNe
(This post was last modified: 03-23-2010 01:18 AM by BeNe.)
03-23-2010 12:46 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [FreeBSD] Need solutions for a chrooted Postfix & Cron - BeNe - 03-23-2010 12:46 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)