Hello A.,
Thursday, August 19, 2004, 1:18:26 PM, you wrote:
AK> postfixnya di chroot jail ??
Maksud di jail apa ya ? bisa kasih step by step cara jailkan postfix
pak ?
pernah baca di sini examples/chroot-setup tapi masih nggak ngerti
Setelah saya ubah chroot y menjadi n untuk rewrite
rewrite unix - - n - - trivial-rewrite
klu setting saya di master.cf
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (50)
# ==========================================================================
smtp inet n - n - - smtpd
#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n - n - - smtpd
# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628 inet n - n - - qmqpd
pickup fifo n - y 60 1 pickup
cleanup unix n - y - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - y 300 1 nqmgr
#tlsmgr fifo - - n 300 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - y - 0 bounce
defer unix - - y - 0 bounce
flush unix n - y 1000? 0 flush
smtp unix - - y - - smtp
showq unix n - y - - showq
error unix - - y - - error
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - y - - lmtp
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
# The Cyrus deliver program has changed incompatibly.
#
cyrus unix - n n - - pipe
flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail.postfix
($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
relay unix - - n - - smtp
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
proxymap unix - - n - - proxymap
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
Kemudian saya coba telnet lagi, hasilnya lebih mengembirakan
walau masih error
[EMAIL PROTECTED] root]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.hendratna.net ESMTP Postfix (2.2-20040801)
mail from:[EMAIL PROTECTED]
250 Ok
rcpt to:[EMAIL PROTECTED]
250 Ok
data
354 End data with <CR><LF>.<CR><LF>
testing
.
250 Ok: queued as E7243900A0
quit
221 Bye
Connection closed by foreign host.
Hasil errornya
Aug 19 13:39:37 jbn postfix/postfix-script: stopping the Postfix mail system
Aug 19 13:39:37 jbn postfix/master[3883]: terminating on signal 15
Aug 19 13:39:43 jbn postfix/postfix-script: starting the Postfix mail system
Aug 19 13:39:43 jbn postfix/master[4045]: daemon started -- version 2.2-20040801
Aug 19 13:39:55 jbn postfix/smtpd[4051]: connect from jbn.hendratna.net[127.0.0.1]
Aug 19 13:40:11 jbn postfix/trivial-rewrite[4053]: warning: do not list domain
hendratna.net in BOTH mydestination and virtual_mailbox_domains
Aug 19 13:40:24 jbn postfix/trivial-rewrite[4053]: warning: do not list domain
hendratna.net in BOTH mydestination and virtual_mailbox_domains
Aug 19 13:40:24 jbn postfix/smtpd[4051]: E7243900A0:
client=jbn.hendratna.net[127.0.0.1]
Aug 19 13:40:36 jbn postfix/cleanup[4055]: E7243900A0: message-id=<[EMAIL PROTECTED]>
Aug 19 13:40:36 jbn postfix/qmgr[4049]: E7243900A0: from=<[EMAIL PROTECTED]>,
size=364, nrcpt=1 (queue active)
Aug 19 13:40:36 jbn postfix/trivial-rewrite[4053]: warning: do not list domain
hendratna.net in BOTH mydestination and virtual_mailbox_domains
Aug 19 13:40:36 jbn postfix/local[4056]: E7243900A0: to=<[EMAIL PROTECTED]>,
relay=local, delay=25, status=sent (delivered to maildir)
Aug 19 13:40:36 jbn postfix/qmgr[4049]: E7243900A0: removed
Aug 19 13:40:44 jbn postfix/smtpd[4051]: disconnect from jbn.hendratna.net[127.0.0.1]
Kemudian saya coba Add mailbox baru lewat postfixadmin
hasil error
create /var/www/Maildir/tmp/1092894194.P4071.jbn.hendratna.net
Saya bingung kenapa kok larinya ke /var/www/Maildir sich
sedangkan setting apache saya untuk virtual host (dir rootnya) ada di
/opt/httpd/htdocs/postfixadmin
sedangkan untuk folder virtual mailbox saya settingkan ke
/opt/postfix/hendratna.net dengan user postfix.postfix
error lengkapnya
Aug 19 13:43:14 jbn postfix/local[4071]: 69BA7900A1: to=<[EMAIL PROTECTED]>,
relay=local, delay=0, status=bounced (maildir delivery failed: create
/var/www/Maildir/tmp/1092894194.P4071.jbn.hendratna.net: Permission denied)
Aug 19 13:43:14 jbn postfix/local[4071]: warning: maildir access problem for
UID/GID=48/48: create /var/www/Maildir/tmp/1092894194.P4071.jbn.hendratna.net:
Permission denied
Aug 19 13:43:14 jbn postfix/local[4071]: warning: perhaps you need to create the
maildirs in advance
Aug 19 13:43:14 jbn postfix/qmgr[4049]: 69BA7900A1: removed
Errornya nggak ada domain hendratna.net klu saya lihat di table domain
kok ada ya
mysql> select domain, description, active from domain;
+---------------+---------------------------+--------+
| domain | description | active |
+---------------+---------------------------+--------+
| hendratna.net | Mail Server Hendratna.net | 1 |
+---------------+---------------------------+--------+
1 row in set (0.00 sec)
[EMAIL PROTECTED] conf]# ls /etc/postfix/mysql*
/etc/postfix/mysql_virtual_alias_maps.cf
/etc/postfix/mysql_virtual_domains_maps.cf
/etc/postfix/mysql_virtual_mailbox_maps.cf
/etc/postfix/mysql_virtual_quota_maps.cf
/etc/postfix/mysql_virtual_domains_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfixdb
table = domain
select_field = description
where_field = domain
[EMAIL PROTECTED] conf]# postconf -n
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, $mydomain, mail.$mydomain,
www.$mydomain, ftp.$mydomain
mydomain = hendratna.net
myhostname = mail.hendratna.net
mynetworks = 192.168.0.0/24, 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-1.1.11/README_FILES
sample_directory = /usr/share/doc/postfix-1.1.11/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
unknown_local_recipient_reject_code = 450
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:501
virtual_mailbox_base = /opt/postfix
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 501
virtual_transport = virtual
virtual_uid_maps = static:501
Sorry kalau banyak isinya tentang error, dan setting
langkah selanjutnya apa lagi ya ?
terima kasih
--
Best regards,
ftrunbox
mailto:[EMAIL PROTECTED]