HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   Postfix/SMTP Issues ISPConfig2/Jaunty (http://www.howtoforge.com/forums/showthread.php?t=35688)

3DPeruna 30th May 2009 00:51

Postfix/SMTP Issues ISPConfig2/Jaunty
 
Built new ISPConfig2 server last night. Things seemed to be just fine. Web sites working great. Email not so much.

I've redone all of the postfix configurations on page 5 and things still aren't working. Here's what we've got:

/etc/postfix/main.cf:
Code:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = ohdweb.protospace.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = ohdweb.protospace.com,localhost.ohdweb.com,localhost.localdomain,localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

virtual_maps = hash:/etc/postfix/virtusertable

#mydestination = /etc/postfix/local-host-names
home_mailbox = Maildir/

/etc/default/saslauthd:
Code:

# Settings for saslauthd daemon
# Please read /usr/share/doc/sasl2-bin/README.Debian for details.
#

# Should saslauthd run automatically on startup? (default: no)
START=yes

# Description of this saslauthd instance. Recommended.
# (suggestion: SASL Authentication Daemon)
DESC="SASL Authentication Daemon"

# Short name of this saslauthd instance. Strongly recommended.
# (suggestion: saslauthd)
NAME="saslauthd"

# Which authentication mechanisms should saslauthd use? (default: pam)
#
# Available options in this Debian package:
# getpwent  -- use the getpwent() library function
# kerberos5 -- use Kerberos 5
# pam      -- use PAM
# rimap    -- use a remote IMAP server
# shadow    -- use the local shadow password file
# sasldb    -- use the local sasldb database file
# ldap      -- use LDAP (configuration is in /etc/saslauthd.conf)
#
# Only one option may be used at a time. See the saslauthd man page
# for more information.
#
# Example: MECHANISMS="pam"
MECHANISMS="pam"

# Additional options for this mechanism. (default: none)
# See the saslauthd man page for information about mech-specific options.
MECH_OPTIONS=""

# How many saslauthd processes should we run? (default: 5)
# A value of 0 will fork a new process for each connection.
THREADS=5

# Other options (default: -c -m /var/run/saslauthd)
# Note: You MUST specify the -m option or saslauthd won't run!
#
# WARNING: DO NOT SPECIFY THE -d OPTION.
# The -d option will cause saslauthd to run in the foreground instead of as
# a daemon. This will PREVENT YOUR SYSTEM FROM BOOTING PROPERLY. If you wish
# to run saslauthd in debug mode, please run it by hand to be safe.
#
# See /usr/share/doc/sasl2-bin/README.Debian for Debian-specific information.
# See the saslauthd man page and the output of 'saslauthd -h' for general
# information about these options.
#
# Example for postfix users: "-c -m /var/spool/postfix/var/run/saslauthd"
#OPTIONS="-c -m /var/run/saslauthd"
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"

root@ohdweb:/# tail /var/log/mail.log
Quote:

May 29 17:40:18 ohdweb pop3d: Connection, ip=[::ffff:71.217.181.229]
May 29 17:40:22 ohdweb pop3d: LOGIN, user=odw7_newel, ip=[::ffff:71.217.181.229], port=[4113]
May 29 17:40:22 ohdweb pop3d: scancur opendir("cur"): No such file or directory
May 29 17:40:39 ohdweb pop3d: Connection, ip=[::ffff:71.217.181.229]
May 29 17:40:40 ohdweb pop3d: LOGIN, user=odw7_elena, ip=[::ffff:71.217.181.229], port=[4138]
May 29 17:40:40 ohdweb pop3d: LOGOUT, user=odw7_elena, ip=[::ffff:71.217.181.229], port=[4138], top=0, retr=0, rcvd=12, sent=39, time=0
May 29 17:40:58 ohdweb postfix/cleanup[15130]: fatal: trace: remove AFF8411D83B1 log: Permission denied
May 29 17:40:58 ohdweb postfix/tlsmgr[15131]: fatal: open database /var/lib/postfix/smtp_scache.db: Permission denied
May 29 17:40:59 ohdweb postfix/master[14758]: warning: process /usr/lib/postfix/cleanup pid 15130 exit status 1
May 29 17:40:59 ohdweb postfix/master[14758]: warning: /usr/lib/postfix/cleanup: bad command startup -- throttling
root@ohdweb:/# tail /var/log/mail.warn
Quote:

May 29 17:39:58 ohdweb postfix/master[14758]: warning: process /usr/lib/postfix/cleanup pid 15041 exit status 1
May 29 17:39:58 ohdweb postfix/master[14758]: warning: /usr/lib/postfix/cleanup: bad command startup -- throttling
May 29 17:39:58 ohdweb postfix/master[14758]: warning: process /usr/lib/postfix/tlsmgr pid 15042 exit status 1
May 29 17:39:58 ohdweb postfix/master[14758]: warning: /usr/lib/postfix/tlsmgr: bad command startup -- throttling
May 29 17:40:58 ohdweb postfix/cleanup[15130]: fatal: trace: remove AFF8411D83B1 log: Permission denied
May 29 17:40:58 ohdweb postfix/tlsmgr[15131]: fatal: open database /var/lib/postfix/smtp_scache.db: Permission denied
May 29 17:40:59 ohdweb postfix/master[14758]: warning: process /usr/lib/postfix/cleanup pid 15130 exit status 1
May 29 17:40:59 ohdweb postfix/master[14758]: warning: /usr/lib/postfix/cleanup: bad command startup -- throttling
May 29 17:40:59 ohdweb postfix/master[14758]: warning: process /usr/lib/postfix/tlsmgr pid 15131 exit status 1
May 29 17:40:59 ohdweb postfix/master[14758]: warning: /usr/lib/postfix/tlsmgr: bad command startup -- throttling
root@ohdweb:/# tail /var/log/mail.err
Quote:

May 29 17:37:55 ohdweb postfix/cleanup[14976]: fatal: trace: remove A149111D83B1 log: Permission denied
May 29 17:37:55 ohdweb postfix/tlsmgr[14977]: fatal: open database /var/lib/postfix/smtp_scache.db: Permission denied
May 29 17:38:56 ohdweb postfix/cleanup[14999]: fatal: trace: remove A634A11D83B1 log: Permission denied
May 29 17:38:56 ohdweb postfix/tlsmgr[15000]: fatal: open database /var/lib/postfix/smtp_scache.db: Permission denied
May 29 17:39:57 ohdweb postfix/cleanup[15041]: fatal: trace: remove AB08E11D83B1 log: Permission denied
May 29 17:39:57 ohdweb postfix/tlsmgr[15042]: fatal: open database /var/lib/postfix/smtp_scache.db: Permission denied
May 29 17:40:58 ohdweb postfix/cleanup[15130]: fatal: trace: remove AFF8411D83B1 log: Permission denied
May 29 17:40:58 ohdweb postfix/tlsmgr[15131]: fatal: open database /var/lib/postfix/smtp_scache.db: Permission denied
May 29 17:41:59 ohdweb postfix/cleanup[15162]: fatal: trace: remove B4D5011D83B1 log: Permission denied
May 29 17:41:59 ohdweb postfix/tlsmgr[15163]: fatal: open database /var/lib/postfix/smtp_scache.db: Permission denied

If I telnet localhost 25 then ehlo localhost it hangs (and I have to kill the window).

The ISPConfig management console shows the SMTP service stopped.

till 30th May 2009 10:18

Please run:

postfix set-permissions
postfix upgrade-configuration
/etc/init.d/postfix restart

3DPeruna 31st May 2009 02:12

That got the mail server receiving mail (phew!), now to get the SMTP server up and running.

UPDATE: It's not really working. It did for a moment, then quit.

UPDATE: It worked for a few minutes (allowing some download of email), but then quit right away.

UPDATE:ISPConfig show's it online. But nothing is really working.

Giving the command:
Code:

saslauthd -a pam -n 5 -V -c -m /var/spool/postfix/var/run/saslauthd -r -d
doesn't do anything, either (except run in memory).

ehlo localhost still freezes
Quote:

postfix set-permissions
Gives a:
Code:

chown: cannot access `/usr/lib/postfix/dict_cdb.so': No such file or directory
If I su postfix set-permissions there is no error.

till 31st May 2009 10:46

Which exact error message do you get in the mail log when you try to authenticate yourself with a mail client.

3DPeruna 31st May 2009 12:44

Code:

May 31 05:31:43 ohdweb postfix/tlsmgr[29981]: fatal: open database /var/lib/postfix/smtp_scache.db: Permission denied
May 31 05:32:44 ohdweb postfix/tlsmgr[30004]: fatal: open database /var/lib/postfix/smtp_scache.db: Permission denied
May 31 05:33:45 ohdweb postfix/tlsmgr[30053]: fatal: open database /var/lib/postfix/smtp_scache.db: Permission denied
May 31 05:34:46 ohdweb postfix/tlsmgr[30077]: fatal: open database /var/lib/postfix/smtp_scache.db: Permission denied
May 31 05:35:47 ohdweb postfix/tlsmgr[30099]: fatal: open database /var/lib/postfix/smtp_scache.db: Permission denied
May 31 05:36:48 ohdweb postfix/tlsmgr[30123]: fatal: open database /var/lib/postfix/smtp_scache.db: Permission denied
May 31 05:37:49 ohdweb postfix/tlsmgr[30144]: fatal: open database /var/lib/postfix/smtp_scache.db: Permission denied
May 31 05:38:50 ohdweb postfix/tlsmgr[30167]: fatal: open database /var/lib/postfix/smtp_scache.db: Permission denied
May 31 05:39:51 ohdweb postfix/tlsmgr[30199]: fatal: open database /var/lib/postfix/smtp_scache.db: Permission denied
May 31 05:40:52 ohdweb postfix/tlsmgr[30325]: fatal: open database /var/lib/postfix/smtp_scache.db: Permission denied

mail.warn log:
Code:

May 31 05:43:56 ohdweb postfix/master[16399]: warning: /usr/lib/postfix/tlsmgr: bad command startup -- throttling
May 31 05:44:56 ohdweb postfix/tlsmgr[30425]: fatal: open database /var/lib/postfix/smtp_scache.db: Permission denied
May 31 05:44:57 ohdweb postfix/master[16399]: warning: process /usr/lib/postfix/tlsmgr pid 30425 exit status 1
May 31 05:44:57 ohdweb postfix/master[16399]: warning: /usr/lib/postfix/tlsmgr: bad command startup -- throttling
May 31 05:45:57 ohdweb postfix/tlsmgr[30446]: fatal: open database /var/lib/postfix/smtp_scache.db: Permission denied
May 31 05:45:58 ohdweb postfix/master[16399]: warning: process /usr/lib/postfix/tlsmgr pid 30446 exit status 1
May 31 05:45:58 ohdweb postfix/master[16399]: warning: /usr/lib/postfix/tlsmgr: bad command startup -- throttling
May 31 05:46:58 ohdweb postfix/tlsmgr[30478]: fatal: open database /var/lib/postfix/smtp_scache.db: Permission denied
May 31 05:46:59 ohdweb postfix/master[16399]: warning: process /usr/lib/postfix/tlsmgr pid 30478 exit status 1
May 31 05:46:59 ohdweb postfix/master[16399]: warning: /usr/lib/postfix/tlsmgr: bad command startup -- throttling


till 31st May 2009 12:47

Run:

Code:

chown postfix:postfix /var/lib/postfix/smtp_scache.db
and then restart postfix.

3DPeruna 31st May 2009 22:17

That seems to have done it! Thank you.


All times are GMT +2. The time now is 22:59.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.