View Full Version : Postfix/SMTP Problem
jojoaddison
4th June 2008, 03:53
Am having the following error and can't seem to put my finger on it:
postfix/master[11340]: warning: /usr/libexec/postfix/smtp: bad command startup -- throttling
postfix/smtp[11364]: fatal: chroot(/var/spool/postfix): Operation not permitted
postfix/master[11340]: warning: process /usr/libexec/postfix/smtp pid 11364 exit status
I installed Postfix, Mailscanner, Clamav, Courier on Centos 5.
Any help will be greatly appreciated.
Jojo
suchy
4th June 2008, 15:54
Can you post your postfix configuration?
jojoaddison
4th June 2008, 22:27
master.cf
smtp inet n - n - - smtpd
smtps inet n - n - - smtpd
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticate d,reject
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtpd
relay unix - - n - - smtp
-o fallback_relay=
showq unix n - n - - showq
error unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
File Edit Options Buffers Tools Help
old-cyrus unix - n n - - pipe
flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
cyrus unix - n n - - pipe
user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($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
amavis unix - - - - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
127.0.0.1:10025 inet n - - - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,rej ect
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o receive_override_options=no_unknown_recipient_chec ks,no_header_body_checks
-o smtpd_bind_address=127.0.0.1
main.cf
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
unknown_local_recipient_reject_code = 550
alias_maps = hash:/etc/aliases
header_checks = regexp:/etc/postfix/header_checks
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.3.3/samples
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
myhostname = localhost
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_path = smtpd
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over the prescribed quota."
virtual_overquota_bounce = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
qmgr_message_recipient_limit = 200
mailbox_size_limit = 5120000
mydestination = $myhostname, localhost.$mydomain, $mydomain
I don't have chroot set anywhere for postfix or smtp.
Thanks for your help
falko
5th June 2008, 18:05
Can you change
127.0.0.1:10025 inet n - - - - smtpd
to
127.0.0.1:10025 inet n - n - - smtpd
in master.cf?
If that doesn't help, what's the output of ls -la /var/spool?
jojoaddison
6th June 2008, 01:20
The problem was also with the amavis configuration which I changed from:
amavis unix - - - - 2 smtp
to:
amavis unix n - n - 2 smtp
Now clamav is refusing to start:
clamd.conf
LogFile /var/log/clamav/clamd.log
LogFileUnlock yes
LogFileMaxSize 1M
LogTime yes
LogSyslog yes
PidFile /var/run/clamav/clamd.pid
TemporaryDirectory /tmp
DatabaseDirectory /var/clamav
LocalSocket /tmp/clamd.socket
FixStaleSocket yes
TCPSocket 3310
TCPAddr 127.0.0.1
MaxConnectionQueueLength 30
StreamMaxLength 20M
MaxThreads 10
ReadTimeout 300
User clamav
AllowSupplementaryGroups yes
Debug no
ScanPE yes
ScanELF yes
DetectBrokenExecutables yes
ScanOLE2 yes
ScanMail yes
ScanArchive yes
ArchiveBlockEncrypted no
ls -la /var/
drwxr-x--- 6 amavis amavis 4096 Jun 6 02:15 amavis
drwsrwsr-t 2 clamav clamav 4096 Jun 5 04:05 clamav
lrwxrwxrwx 1 root root 10 Apr 21 02:23 mail -> spool/mail
lrwxrwxrwx 1 root root 10 Apr 21 03:25 postfix -> spool/postfix
drwxr-xr-x 25 root root 4096 Jun 6 02:15 run
drwxr-xr-x 18 root root 4096 Apr 22 08:12 spool
Starting Clam AntiVirus Daemon: LibClamAV Error: cli_loaddbdir(): Can't open directory /var/clamav
ERROR: Unable to open file or directory
I have no idea what I've done wrong, because clamav was working before I restarted.
Any help will be appreciated... Thank you.
-- Kojo
jojoaddison
6th June 2008, 03:18
Clamav start when I invoke it directly like this:
# clamd start
but fails to start when invoked liked this:
# service clamd start
thats when the error shows up.
:(I find that very strange.
:confused: Probably because I don't know or understand what is happening...
:) I got it working, but am facing another problem...
Connecting to amavis transfer refused! :mad:
Am tired for today so I will look into it tommorrow.
falko
6th June 2008, 12:46
What's the output of netstat -tap?
jojoaddison
6th June 2008, 14:21
# netstat -tap
tcp 0 0 localhost:10024 *:* LISTEN 18118/amavisd (master)
tcp 0 0 localhost:10025 *:* LISTEN 18847/master
tcp 0 0 *:smtps *:* LISTEN 18847/master
tcp 0 0 *:smtp *:* LISTEN 18847/master
tcp 0 0 *:imaps *:* LISTEN 23542/couriertcpd
tcp 0 0 *:pop3s *:* LISTEN 23554/couriertcpd
tcp 0 0 *:pop3 *:* LISTEN 23548/couriertcpd
tcp 0 0 *:imap *:* LISTEN 23535/couriertcpd
Thanks for the your help.
falko
7th June 2008, 12:35
Can you restart amavisd?
If that doesn't help: what happens if you remove all the n from the chroot column in master.cf?
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.