Postfix Error. Please help.

Hi All,

I would much appreciate ir if someone can help me. I have been having problems to enable my

webmin install to send email through other port other than port 25 (since my vps provider
has blocked that port).

I’ve been trying to change my postfix install to use port 465 or 587.

This is my postconf -n :

broken_sasl_auth_clients = yes command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix debug_peer_level = 2 header_checks = regexp:/etc/postfix/header_checks home_mailbox = Maildir/ html_directory = no inet_interfaces = all local_destination_concurrency_limit = 5 local_destination_recipient_limit = 300 mail_owner = postfix mailbox_command = /usr/bin/procmail mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man message_size_limit = 4240000 mime_header_checks = pcre:/etc/postfix/body_checks mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mydomain = indoku.co.id myhostname = mail.indoku.co.id mynetworks = 127.0.0.0/8 mynetworks_style = host myorigin = $mydomain newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES recipient_delimiter = + sample_directory = /usr/share/doc/postfix-2.3.3/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtp_sasl_auth_enable = yes smtp_sasl_password_maps = /etc/postfix/sasl/smtp.conf smtp_tls_note_starttls_offer = yes smtp_use_tls = yes smtpd_banner = $myhostname smtpd_client_restrictions = permit_mynetworks reject permit_inet_interfaces smtpd_helo_required = no smtpd_client_restrictions = permit_mynetworks, reject smtpd_helo_restrictions = reject_unknown_helo_hostname smtpd_sender_restrictions = reject_unknown_sender_domain smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination reject_rbl_client zen.spamhaus.org, reject_rhsbl_helo dbl.spamhaus.org, reject_rhsbl_sender dbl.spamhaus.org smtpd_data_restrictions = reject_unauth_pipelining smtpd_helo_restrictions = reject_unknown_helo_hostname smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated # reject_unauth_destination is not needed here if the mail # relay policy is specified under smtpd_relay_restrictions # (available with Postfix 2.10 and later). reject_unauth_destination reject_rbl_client zen.spamhaus.org reject_rhsbl_helo dbl.spamhaus.org reject_rhsbl_sender dbl.spamhaus.org # Block clients that speak too early. smtpd_data_restrictions = reject_unauth_pipelining smtpd_reject_unlisted_recipient = yes smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = smtpd_sasl_security_options = noanonymous noplaintext smtpd_sender_restrictions = reject_unknown_sender_domain smtpd_tls_auth_only = yes smtpd_tls_loglevel = 1 smtpd_tls_received_header = yes smtpd_tls_session_cache_timeout = 3600s smtpd_use_tls = yes soft_bounce = no tls_random_source = dev:/dev/urandom unknown_local_recipient_reject_code = 550 virtual_alias_maps = hash:/etc/postfix/virtual [root@indoku ~]#

My master.cf :

Postfix master process configuration file. For details on the format

of the file, see the master(5) manual page (command: “man 5 master”).

==========================================================================

service type private unpriv chroot wakeup maxproc command + args

(yes) (yes) (yes) (never) (100)

==========================================================================

smtp inet n - n - - smtpd
smtps inet n - n - - smtpd
-o smtpd_sasl_auth_enable=yes
-o smtpd_reject_unlisted_sender=yes
-o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
-o broken_sasl_auth_clients=yes

#submission inet n - n - - smtpd

-o smtpd_enforce_tls=yes

-o smtpd_sasl_auth_enable=yes

-o smtpd_client_restrictions=permit_sasl_authenticated,reject

#smtps inet n - n - - smtpd

-o smtpd_tls_wrappermode=yes

-o smtpd_sasl_auth_enable=yes

-o smtpd_client_restrictions=permit_sasl_authenticated,reject

#628 inet n - n - - qmqpd
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 - - smtp

When relaying mail as backup MX, disable fallback_relay to avoid MX loops

relay unix - - n - - smtp
-o fallback_relay=

-o smtp_helo_timeout=5 -o smtp_connect_timeout=5

showq unix n - n - - showq
error unix - - n - - error
retry 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

====================================================================

Interfaces to non-Postfix software. Be sure to examine the manual

pages of the non-Postfix software to find out what options it wants.

Many of the following services use the Postfix pipe(8) delivery

agent. See the pipe(8) man page for information about ${recipient}

and other message envelope options.

====================================================================

maildrop. See the Postfix MAILDROP_README file for details.

Also specify in main.cf: maildrop_destination_recipient_limit=1

#maildrop unix - n n - - pipe

flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}

====================================================================

The Cyrus deliver program has changed incompatibly, multiple times.

#old-cyrus unix - n n - - pipe

flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}

====================================================================

Cyrus 2.1.5 (Amos Gouaux)

Also specify in main.cf: cyrus_destination_recipient_limit=1

cyrus unix - n n - - pipe
user=_cyrus argv=/usr/bin/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}

====================================================================

See the Postfix UUCP_README file for configuration details.

#uucp unix - n n - - pipe

flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)

====================================================================

Other external delivery methods.

#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=bsmtp argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient

#scalemail-backend unix - n n - 2 pipe

flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store

${nexthop} ${user} ${extension}

#mailman unix - n n - - pipe

flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py

${nexthop} ${user}

My Maillog :

fatal: open dictionary: expecting “type:name” form instead of "/etc/postfix/sasl/smtp.confNov 24 13:29:30 indoku postfix/postfix-script[11532]: refreshing t$
Nov 24 13:29:30 indoku postfix/master[3685]: reload – version 2.6.6, configuration /etc/postfix
Nov 24 13:29:30 indoku postfix/qmgr[11537]: 3715426D095B: from=mark@indoku.co.id, size=455, nrcpt=1 (queue active)
Nov 24 13:29:30 indoku postfix/smtp[11539]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/sasl/smtp.conf”
Nov 24 13:29:31 indoku postfix/master[3685]: warning: process /usr/libexec/postfix/smtp pid 11539 exit status 1
Nov 24 13:29:31 indoku postfix/master[3685]: warning: /usr/libexec/postfix/smtp: bad command startup – throttling
Nov 24 13:30:31 indoku postfix/smtp[11645]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/sasl/smtp.conf”
Nov 24 13:30:32 indoku postfix/master[3685]: warning: process /usr/libexec/postfix/smtp pid 11645 exit status 1
Nov 24 13:30:32 indoku postfix/master[3685]: warning: /usr/libexec/postfix/smtp: bad command startup – throttling
Nov 24 13:31:32 indoku postfix/smtp[11660]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/sasl/smtp.conf”
Nov 24 13:31:33 indoku postfix/master[3685]: warning: process /usr/libexec/postfix/smtp pid 11660 exit status 1
Nov 24 13:31:33 indoku postfix/master[3685]: warning: /usr/libexec/postfix/smtp: bad command startup – throttling
Nov 24 13:32:33 indoku postfix/smtp[11693]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/sasl/smtp.conf”
Nov 24 13:32:34 indoku postfix/master[3685]: warning: process /usr/libexec/postfix/smtp pid 11693 exit status 1
Nov 24 13:32:34 indoku postfix/master[3685]: warning: /usr/libexec/postfix/smtp: bad command startup – throttling
Nov 24 13:33:34 indoku postfix/smtp[11709]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/sasl/smtp.conf”
Nov 24 13:33:35 indoku postfix/master[3685]: warning: process /usr/libexec/postfix/smtp pid 11709 exit status 1
Nov 24 13:33:35 indoku postfix/master[3685]: warning: /usr/libexec/postfix/smtp: bad command startup – throttling
Nov 24 13:34:35 indoku postfix/smtp[11735]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/sasl/smtp.conf”
Nov 24 13:34:36 indoku postfix/master[3685]: warning: process /usr/libexec/postfix/smtp pid 11735 exit status 1
Nov 24 13:34:36 indoku postfix/master[3685]: warning: /usr/libexec/postfix/smtp: bad command startup – throttling
Nov 24 13:35:36 indoku postfix/smtp[11839]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/sasl/smtp.conf”
Nov 24 13:35:37 indoku postfix/master[3685]: warning: process /usr/libexec/postfix/smtp pid 11839 exit status 1
Nov 24 13:35:37 indoku postfix/master[3685]: warning: /usr/libexec/postfix/smtp: bad command startup – throttling
Nov 24 13:36:37 indoku postfix/smtp[11852]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/sasl/smtp.conf”
Nov 24 13:36:38 indoku postfix/master[3685]: warning: process /usr/libexec/postfix/smtp pid 11852 exit status 1
Nov 24 13:36:38 indoku postfix/master[3685]: warning: /usr/libexec/postfix/smtp: bad command startup – throttling
Nov 24 13:37:39 indoku postfix/smtp[11884]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/sasl/smtp.conf”
Nov 24 13:37:40 indoku postfix/master[3685]: warning: process /usr/libexec/postfix/smtp pid 11884 exit status 1
Nov 24 13:37:40 indoku postfix/master[3685]: warning: /usr/libexec/postfix/smtp: bad command startup – throttling
Nov 24 13:38:40 indoku postfix/smtp[11897]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/sasl/smtp.conf”
Nov 24 13:38:41 indoku postfix/master[3685]: warning: process /usr/libexec/postfix/smtp pid 11897 exit status 1
Nov 24 13:38:41 indoku postfix/master[3685]: warning: /usr/libexec/postfix/smtp: bad command startup – throttling
Nov 24 13:39:41 indoku postfix/smtp[11910]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/sasl/smtp.conf”
Nov 24 13:39:42 indoku postfix/master[3685]: warning: process /usr/libexec/postfix/smtp pid 11910 exit status 1
Nov 24 13:39:42 indoku postfix/master[3685]: warning: /usr/libexec/postfix/smtp: bad command startup – throttling
Nov 24 13:40:42 indoku postfix/smtp[11992]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/sasl/smtp.conf”
Nov 24 13:40:43 indoku postfix/master[3685]: warning: process /usr/libexec/postfix/smtp pid 11992 exit status 1
Nov 24 13:40:43 indoku postfix/master[3685]: warning: /usr/libexec/postfix/smtp: bad command startup – throttling
Nov 24 13:41:43 indoku postfix/smtp[12007]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/sasl/smtp.conf”
Nov 24 13:41:44 indoku postfix/master[3685]: warning: process /usr/libexec/postfix/smtp pid 12007 exit status 1
Nov 24 13:41:44 indoku postfix/master[3685]: warning: /usr/libexec/postfix/smtp: bad command startup – throttling
Nov 24 13:42:44 indoku postfix/smtp[12020]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/sasl/smtp.conf”
Nov 24 13:42:45 indoku postfix/master[3685]: warning: process /usr/libexec/postfix/smtp pid 12020 exit status 1
Nov 24 13:42:45 indoku postfix/master[3685]: warning: /usr/libexec/postfix/smtp: bad command startup – throttling
Nov 24 13:43:45 indoku postfix/smtp[12052]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/sasl/smtp.conf”
Nov 24 13:43:46 indoku postfix/master[3685]: warning: process /usr/libexec/postfix/smtp pid 12052 exit status 1
Nov 24 13:43:46 indoku postfix/master[3685]: warning: /usr/libexec/postfix/smtp: bad command startup – throttling
Nov 24 13:44:46 indoku postfix/smtp[12065]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/sasl/smtp.conf”
Nov 24 13:44:47 indoku postfix/master[3685]: warning: process /usr/libexec/postfix/smtp pid 12065 exit status 1
Nov 24 13:44:47 indoku postfix/master[3685]: warning: /usr/libexec/postfix/smtp: bad command startup – throttling

If someone can help me make sense of the error. Please do… thanks.

I am trying to change postfix to use port 587 or 465 instead of port 25, since
my vps provider has blocked port 25.

Thank you.

Howdy,

It looks like you have a number of non-default settings in your Postfix main.cf file, one or more of those may be contributing to the problems you’re having.

The errors I’m seeing in your logs there seem to suggest that there’s a problem with this line in your main.cf:

smtp_sasl_password_maps = /etc/postfix/sasl/smtp.conf

The “smtp_sasl_password_maps” parameter isn’t something that’s used on a typical Virtualmin system though, is that something you need?

-Eric

Hi Eric, thanks for the reply. I’ve reinstalled postfix with the original main.cf and master.cf files.

Because my ISP has block port 25 inbound and outbound. How do I configure postfix to use
port 587 and 465 port?

Thanks
Deddy

Howdy,

Well, you also don’t want the original main.cf – there’s a few changes Virtualmin makes during the install process that you’d need. But we can come back to that part later :slight_smile:

If your ISP blocks port 25 – no mail server on the Internet will be able to send you email., as they all use port 25 to communicate.

Also, for outgoing email – you won’t be able to send email directly to any mail servers on the Internet, though you could configure your mail server to relay outgoing emails through your ISP.

Before we get too far in tweaking your setup, I just wanted to make sure what I described above will work for you.

That is, if servers on the Internet can’t send email to your server, is that okay?

-Eric