0

I'm trying to setup an email server on a CentOS system with Postfix, Dovecot and MySQL.

I'm following this article for an Ubuntu system: https://library.linode.com/email/postfix/postfix2.9.6-dovecot2.0.19-mysql

I can connect to the server using both secure pop/imap but can't with SMTP. I have tried sending an email from root and it remains in the queue. I get the following error:

connect to osiris.innovi.com[private/dovecot-lmtp]: No such file or directory

Here's the version that's installed on my system: MySQL v5.5.36 Postfix v2.6.6 Dovecot v2.0.9

The output of postconf is as follows:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
mailbox_size_limit = 0
mydestination = localhost
myhostname = osiris.innovi.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
smtpd_recipient_restrictions = permit_sasl_authenticated permit_mynetworks
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/pki/dovecot/certs/dovecot.pem
smtpd_tls_key_file = /etc/pki/dovecot/private/dovecot.pem
smtpd_use_tls = yes
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_transport = lmtp:unix:private/dovecot-lmtp

Here's an output of the maillog when attempting to send emails:

Mar 13 10:21:58 osiris postfix/qmgr[905]: 1B57263655ED: from=<root@/etc/mailname>, size=488, nrcpt=1 (queue active)
Mar 13 10:21:58 osiris postfix/smtpd[2087]: fatal: parameter "smtpd_recipient_restrictions": specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit
Mar 13 10:21:58 osiris postfix/lmtp[2091]: 1B57263655ED: to=<[email protected]>, relay=none, delay=2221, delays=2221/0.03/0/0, dsn=4.4.1, status=deferred (connect to osiris.innovi.com[private/dovecot-lmtp]: No such file or directory)
Mar 13 10:21:59 osiris postfix/master[897]: warning: process /usr/libexec/postfix/smtpd pid 2087 exit status 1
Mar 13 10:21:59 osiris postfix/master[897]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
Mar 13 10:22:25 osiris postfix/pickup[1554]: 5383763655F0: uid=0 from=<root>
Mar 13 10:22:25 osiris postfix/cleanup[2097]: 5383763655F0: message-id=<[email protected]>
Mar 13 10:22:25 osiris postfix/qmgr[905]: 5383763655F0: from=<root@/etc/mailname>, size=488, nrcpt=1 (queue active)
Mar 13 10:22:25 osiris postfix/lmtp[2091]: 5383763655F0: to=<[email protected]>, relay=none, delay=0.02, delays=0.02/0/0/0, dsn=4.4.1, status=deferred (connect to osiris.innovi.com[private/dovecot-lmtp]: No such file or directory)

Thanks.

2
  • Can you post the output of postconf -n and the complete log lines that appear when you send mail?
    – clement
    Commented Mar 13, 2014 at 11:10
  • It seems this entry only in /etc/postfix/main.cf applies to Ubuntu/Debian systems. virtual_transport = lmtp:unix:private/dovecot-lmtp With CentOS systems you'll need to specify the following: virtual_transport = dovecot You'll also need add this entry in the /etc/postfix/master.cf file: dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient}
    – supmethods
    Commented Mar 13, 2014 at 15:15

2 Answers 2

1

It seems this entry only in /etc/postfix/main.cf applies to Ubuntu/Debian systems.

virtual_transport = lmtp:unix:private/dovecot-lmtp 

With CentOS systems you'll need to specify the following instead:

virtual_transport = dovecot

You'll also need to add this entry in the /etc/postfix/master.cf file:

 dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient}
1

According to the log, there are two problems:

  1. You should change your smtpd_recipient_restrictions and add at least one of the proposals in the log, for example:

    smtpd_recipient_restrictions = permit_sasl_authenticated permit_mynetworks reject_unauth_destination
    
  2. Your Dovecot does not seem to be listening to port 2003. You should check if netstat shows 2003 as open and change your Dovecot config accordingly.

    netstat -ntlp | grep 2003
    
1
  • in the given configuration, dovecot is supposed to be listening on the unix-domain socket <dovecot-chroot>/private/dovecot-lmtp, not on any inet socket.
    – gerhard d.
    Commented Apr 15, 2016 at 6:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .