Postfix Config Issue ... Ubuntu 14.04

5 posts / 0 new
Last post
#1 Fri, 09/05/2014 - 15:47
ssears

Postfix Config Issue ... Ubuntu 14.04

I am using Ubuntu 14.04 Distro and the repo install with LAMP, Webmin, Virtualmin. For some reason the Postfix install has never worked properly, I can't send or receive. It's been a number of years since I set this up and everything was manual at that time (at least 10 years ago). I am including my main.cf below

# 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/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.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.
 
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $myhostname, $mydomain, localdomain, localhost, localhost.localdomain, localhost
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
recipient_delimiter = +
virtual_alias_maps = hash:/etc/postfix/virtual
sender_bcc_maps = hash:/etc/postfix/bcc
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
allow_percent_hack = no
myorigin = $mydomain
sender_dependent_default_transport_maps = /etc/postfix/dependent
notify_classes = bounce, 2bounce, delay, resource
milter_default_action = accept
milter_protocol = 2
smtpd_milters = inet:localhost:8891
non_smtpd_milters = inet:localhost:8891
mynetworks_style = subnet

when I run telnet localhost 143 I get:

Trying ::1...
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

Here is my iptables -L -n

iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:53
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:20000
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:10000
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:443
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:80
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:993
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:143
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:995
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:110
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:20
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:21
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:53
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:587
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:25
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22
 
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
 
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

I'm pretty sure I am missing something simple but I am missing it none the less.

Any assistance would be appreciated.

Tue, 09/16/2014 - 21:07
ssears

Mail.log

Sep 16 17:43:38 webuy dovecot: imap(sam.wehirelocal): Connection closed in=57 out=946
Sep 16 17:43:55 webuy dovecot: imap-login: Login: user=<sam.wehirelocal>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=8046, secured, session=<xGn0pTUDfgB/AAAB>
Sep 16 17:43:56 webuy postfix/smtpd[8051]: connect from localhost.localdomain[127.0.0.1]
Sep 16 17:43:58 webuy postfix/trivial-rewrite[8052]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"
Sep 16 17:43:59 webuy postfix/master[6910]: warning: process /usr/lib/postfix/trivial-rewrite pid 8052 exit status 1
Sep 16 17:43:59 webuy postfix/master[6910]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup -- throttling
Sep 16 17:44:17 webuy postfix/master[6910]: warning: unix_trigger_event: read timeout for service public/pickup
Sep 16 17:44:33 webuy dovecot: imap-login: Login: user=<sam.wehirelocal>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=8188, secured, session=<e7Y2qDUDlwB/AAAB>
Sep 16 17:44:33 webuy dovecot: imap(sam.wehirelocal): Connection closed in=415 out=3722
Sep 16 17:44:59 webuy postfix/trivial-rewrite[8205]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"
Sep 16 17:45:00 webuy postfix/master[6910]: warning: process /usr/lib/postfix/trivial-rewrite pid 8205 exit status 1
Sep 16 17:45:00 webuy postfix/master[6910]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup -- throttling
Sep 16 17:45:02 webuy postfix/master[6910]: terminating on signal 15
Sep 16 17:45:02 webuy dovecot: imap(sam.wehirelocal): Connection closed in=43 out=918
Sep 16 17:45:08 webuy postfix/master[8402]: daemon started -- version 2.11.0, configuration /etc/postfix
Sep 16 17:45:08 webuy postfix/pickup[8405]: warning: D45F41C23F79: message has been queued for 3 days
Sep 16 17:45:08 webuy postfix/pickup[8405]: D45F41C23F79: uid=1001 from=<kewlmark>
Sep 16 17:45:08 webuy postfix/trivial-rewrite[8408]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"
Sep 16 17:45:09 webuy postfix/master[8402]: warning: process /usr/lib/postfix/trivial-rewrite pid 8408 exit status 1
Sep 16 17:45:09 webuy postfix/master[8402]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup -- throttling

Here is my mail.err log

Sep 16 21:40:37 webuy postfix/trivial-rewrite[16671]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"
Sep 16 21:41:38 webuy postfix/trivial-rewrite[16674]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"
Sep 16 21:42:39 webuy postfix/trivial-rewrite[16682]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"
Sep 16 21:43:40 webuy postfix/trivial-rewrite[16689]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"
Sep 16 21:44:41 webuy postfix/trivial-rewrite[16745]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"
Sep 16 21:45:42 webuy postfix/trivial-rewrite[16840]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"
Sep 16 21:46:43 webuyl postfix/trivial-rewrite[16844]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"
Sep 16 21:47:44 webuy postfix/trivial-rewrite[16846]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"
Sep 16 21:48:45 webuyl postfix/trivial-rewrite[16847]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"
Sep 16 21:49:46 webuy postfix/trivial-rewrite[16895]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"
Sep 16 21:50:48 webuy postfix/trivial-rewrite[16990]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"
Sep 16 21:51:49 webuy postfix/trivial-rewrite[16993]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"
Sep 16 21:52:50 webuy postfix/trivial-rewrite[16994]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"
Sep 16 21:53:51 webuyl postfix/trivial-rewrite[16995]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"
Sep 16 21:54:52 webuyl postfix/trivial-rewrite[17035]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"
Sep 16 21:55:53 webuy postfix/trivial-rewrite[17137]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"
Sep 16 21:56:54 webuyl postfix/trivial-rewrite[17140]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"
Sep 16 21:57:55 webuyl postfix/trivial-rewrite[17141]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"
Sep 16 21:58:56 webuy postfix/trivial-rewrite[17142]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"
Sep 16 21:59:57 webuy postfix/trivial-rewrite[17223]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/dependent"

I'm running out of ideas. Any help would be much appreciated.

Tue, 09/16/2014 - 21:22
andreychek

Howdy,

Try commenting out this line in your main.cf file:

sender_dependent_default_transport_maps = /etc/postfix/dependent

After that, restart Postfix with this command:

/etc/init.d/postfix restart

Once you do that, does Postfix work properly for you?

-Eric

Tue, 09/16/2014 - 21:35
ssears

That seemed to fix it. Thanx!!!!

Solved the last of the really big issues for me.

Fri, 02/12/2016 - 12:01
sixhammers

RESOLVED

Nature of the issue: You haven't given postfix a map/db type, it has no idea how to read the file.
Your config file reads 'sender_dependent_default_transport_maps = /etc/postfix/dependent' this is incorrect.
It should read 'transport_maps = hash:/etc/postfix/dependent'
The word hash tells postfix what database type to reference when reading this file.

Assuming the content of your transport file is correct, do the following.
1. Edit the original line to match the one above.
2. Now create the new "Transport database" by issuing the following command,
postmap hash:/etc/postfix/transport
This will create the needed database file: /etc/postfix/transport.db
3. Now restart postfix

Topic locked