Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 6th September 2012, 12:54
lazacom lazacom is offline
Junior Member
 
Join Date: Sep 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Postfix not sending mails to any outside domain except my own

Postfix is sending emails only for my domain, nemogucamisija.com. But not to gmail or any other. User however can receive emails from any mail servers (gmail, yahoo... ). Here is /var/log/maillog output:

Quote:
Sep 6 11:17:09 server02 postfix/smtpd[30377]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep 6 11:17:09 server02 postfix/proxymap[30378]: error: open /etc/postfix/mysql-virtual_mailboxes.cf: No such file or directory
Sep 6 11:17:09 server02 postfix/smtpd[30377]: connect from 109-92-11-38.dynamic.isp.telekom.rs[109.92.11.38]
Sep 6 11:17:09 server02 postfix/proxymap[30378]: error: open /etc/postfix/mysql-virtual_domains.cf: No such file or directory
Sep 6 11:17:09 server02 postfix/trivial-rewrite[30380]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/transport"
Sep 6 11:17:10 server02 postfix/master[26436]: warning: process /usr/libexec/postfix/trivial-rewrite pid 30380 exit status 1
Sep 6 11:17:10 server02 postfix/master[26436]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Sep 6 11:17:18 server02 dovecot: pop3-login: Disconnected (auth failed, 1 attempts): user=<office@nemogucamisija.com>, method=PLAIN, rip=109.121.92.53, lip=5.$
Sep 6 11:18:10 server02 postfix/trivial-rewrite[30390]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/transport"
Sep 6 11:18:11 server02 postfix/master[26436]: warning: process /usr/libexec/postfix/trivial-rewrite pid 30390 exit status 1
Sep 6 11:18:11 server02 postfix/master[26436]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Any idea? Thanks in advance!
Reply With Quote
Sponsored Links
  #2  
Old 6th September 2012, 13:24
TiTex TiTex is offline
Senior Member
 
Join Date: Aug 2011
Location: Cluj-Napoca,Romania
Posts: 125
Thanks: 0
Thanked 18 Times in 17 Posts
Send a message via Skype™ to TiTex
Default

post the output of postconf -n ... or the content of main.cf

Last edited by TiTex; 6th September 2012 at 13:31.
Reply With Quote
  #3  
Old 6th September 2012, 13:30
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

There are some config files missing.

If you use ISPConfig then download ispconfig again, unpack it and run the update.php script which is in the install folder. Choose yes when the updater asks you if the services shall be reconfigured.

If your setup is not a ispconfig server, then you might want to redo the guide that you used to setupthe server and create the missing config files manually.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 6th September 2012, 13:43
lazacom lazacom is offline
Junior Member
 
Join Date: Sep 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

postconf -n

Quote:
allow_untrusted_routing = yes
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
html_directory = no
ignore_mx_lookup_error = yes
inet_protocols = ipv4
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/man
mydestination = nemogucamisija.com, localhost, localhost.nemogucamisija.com
mydomain = nemogucamisija.com
myhostname = nemogucamisija.com
mynetworks = 127.0.0.0/8 [::1]/128
myorigin = nemogucamisija.com
newaliases_path = /usr/bin/newaliases
notify_classes = bounce, 2bounce, delay, policy, protocol, resource, software
readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_tls_security_level = none
transport_maps = /etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_uid_maps = static:5000
Yes, I have tried ISPConfig, but it could not install, so i decided not to go ISPConfig route. I instead installed webmin+virtualmin.
Reply With Quote
  #5  
Old 6th September 2012, 13:44
lazacom lazacom is offline
Junior Member
 
Join Date: Sep 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

And yes, this is postfix 2.9.4 on Ceont0s 6 x86_64, built from source (as root). Had to remove 2.6 cause of ISPConfig ...
Reply With Quote
  #6  
Old 6th September 2012, 13:54
TiTex TiTex is offline
Senior Member
 
Join Date: Aug 2011
Location: Cluj-Napoca,Romania
Posts: 125
Thanks: 0
Thanked 18 Times in 17 Posts
Send a message via Skype™ to TiTex
Default

if i'm not mistaken
Quote:
transport_maps = /etc/postfix/transport
should be
Code:
transport_maps = hash:/etc/postfix/transport
but first run this command
Code:
postmap /etc/postfix/transport
and then restart postfix
Reply With Quote
  #7  
Old 6th September 2012, 14:00
lazacom lazacom is offline
Junior Member
 
Join Date: Sep 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Tried, but got error:
Quote:
[root@server02 ~]# postmap /etc/postfix/transport
postmap: fatal: open database /etc/postfix/transport.db: Permission denied
Reply With Quote
  #8  
Old 6th September 2012, 15:33
lazacom lazacom is offline
Junior Member
 
Join Date: Sep 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Also, I created all missing files from first post, chown-ed them to postfixostfix, but now i got some other errors (restart postfix + mail delivery):
Quote:
Sep 6 14:28:36 server02 postfix/postfix-script[1890]: stopping the Postfix mail system
Sep 6 14:28:36 server02 postfix/master[1037]: terminating on signal 15
Sep 6 14:28:37 server02 postfix/postfix-script[1949]: warning: not owned by root: /etc/postfix/mysql-virtual_mailboxes.cf
Sep 6 14:28:37 server02 postfix/postfix-script[1950]: warning: not owned by root: /etc/postfix/transport
Sep 6 14:28:37 server02 postfix/postfix-script[1951]: warning: not owned by root: /etc/postfix/transport.db
Sep 6 14:28:37 server02 postfix/postfix-script[1953]: warning: group or other writable: /etc/postfix/./virtual.rpmsave
Sep 6 14:28:37 server02 postfix/postfix-script[1954]: warning: group or other writable: /etc/postfix/./transport
Sep 6 14:28:37 server02 postfix/postfix-script[1955]: warning: group or other writable: /etc/postfix/./mysql-virtual_transports.cf
Sep 6 14:28:37 server02 postfix/postfix-script[1956]: warning: group or other writable: /etc/postfix/./virtual.db
Sep 6 14:28:37 server02 postfix/postqueue[1972]: warning: Mail system is down -- accessing queue directly
Sep 6 14:28:38 server02 postfix/postfix-script[2033]: warning: not owned by root: /etc/postfix/mysql-virtual_mailboxes.cf
Sep 6 14:28:38 server02 postfix/postfix-script[2034]: warning: not owned by root: /etc/postfix/transport
Sep 6 14:28:38 server02 postfix/postfix-script[2035]: warning: not owned by root: /etc/postfix/transport.db
Sep 6 14:28:38 server02 postfix/postfix-script[2037]: warning: group or other writable: /etc/postfix/./virtual.rpmsave
Sep 6 14:28:38 server02 postfix/postfix-script[2038]: warning: group or other writable: /etc/postfix/./transport
Sep 6 14:28:38 server02 postfix/postfix-script[2039]: warning: group or other writable: /etc/postfix/./mysql-virtual_transports.cf
Sep 6 14:28:38 server02 postfix/postfix-script[2040]: warning: group or other writable: /etc/postfix/./virtual.db
Sep 6 14:28:38 server02 postfix/postfix-script[2055]: starting the Postfix mail system
Sep 6 14:28:38 server02 postfix/master[2056]: daemon started -- version 2.9.4, configuration /etc/postfix
Sep 6 14:28:38 server02 postfix/postfix-script[2115]: warning: not owned by root: /etc/postfix/mysql-virtual_mailboxes.cf
Sep 6 14:28:38 server02 postfix/postfix-script[2116]: warning: not owned by root: /etc/postfix/transport
Sep 6 14:28:38 server02 postfix/postfix-script[2117]: warning: not owned by root: /etc/postfix/transport.db
Sep 6 14:28:38 server02 postfix/postfix-script[2119]: warning: group or other writable: /etc/postfix/./virtual.rpmsave
Sep 6 14:28:38 server02 postfix/postfix-script[2120]: warning: group or other writable: /etc/postfix/./transport
Sep 6 14:28:38 server02 postfix/postfix-script[2121]: warning: group or other writable: /etc/postfix/./mysql-virtual_transports.cf
Sep 6 14:28:38 server02 postfix/postfix-script[2122]: warning: group or other writable: /etc/postfix/./virtual.db
Sep 6 14:28:43 server02 postfix/smtpd[2145]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep 6 14:28:43 server02 postfix/proxymap[2148]: fatal: /etc/postfix/mysql-virtual_mailboxes.cf: bad string length 0 < 1: dbname =
Sep 6 14:28:43 server02 dovecot: pop3-login: Login: user=<office.nemogucamisija>, method=PLAIN, rip=109.92.11.38, lip=5.9.223.46, mpid=2151, TLS
Sep 6 14:28:43 server02 dovecot: pop3(office.nemogucamisija): Disconnected: Logged out top=0/0, retr=0/0, del=0/17, size=117576
Sep 6 14:28:44 server02 postfix/smtpd[2145]: warning: private/proxymap socket: service dict_proxy_open: Success
Sep 6 14:28:44 server02 postfix/master[2056]: warning: process /usr/libexec/postfix/proxymap pid 2148 exit status 1
Sep 6 14:28:45 server02 postfix/proxymap[2152]: fatal: /etc/postfix/mysql-virtual_mailboxes.cf: bad string length 0 < 1: dbname =
Sep 6 14:28:46 server02 postfix/smtpd[2145]: warning: private/proxymap socket: service dict_proxy_open: Success
Sep 6 14:28:46 server02 postfix/master[2056]: warning: process /usr/libexec/postfix/proxymap pid 2152 exit status 1
Sep 6 14:28:46 server02 postfix/master[2056]: warning: /usr/libexec/postfix/proxymap: bad command startup -- throttling
Sep 6 14:30:47 server02 postfix/proxymap[2184]: fatal: /etc/postfix/mysql-virtual_mailboxes.cf: bad string length 0 < 1: dbname =
Sep 6 14:30:48 server02 postfix/smtpd[2145]: warning: private/proxymap socket: service dict_proxy_open: Success
Sep 6 14:30:48 server02 postfix/master[2056]: warning: process /usr/libexec/postfix/proxymap pid 2184 exit status 1
Sep 6 14:30:48 server02 postfix/master[2056]: warning: /usr/libexec/postfix/proxymap: bad command startup -- throttling
Sep 6 14:31:26 server02 dovecot: pop3-login: Login: user=<office.nemogucamisija>, method=PLAIN, rip=109.92.11.38, lip=5.9.223.46, mpid=2211, TLS
Sep 6 14:31:26 server02 dovecot: pop3(office.nemogucamisija): Disconnected: Logged out top=0/0, retr=0/0, del=0/17, size=117576
Sep 6 14:31:48 server02 postfix/proxymap[2214]: fatal: /etc/postfix/mysql-virtual_mailboxes.cf: bad string length 0 < 1: dbname =
Sep 6 14:31:49 server02 postfix/smtpd[2145]: warning: private/proxymap socket: service dict_proxy_open: Success
Sep 6 14:31:49 server02 postfix/master[2056]: warning: process /usr/libexec/postfix/proxymap pid 2214 exit status 1
Sep 6 14:31:49 server02 postfix/master[2056]: warning: /usr/libexec/postfix/proxymap: bad command startup -- throttling
Any way to reset settings to default or some command to rebuild config files?

Last edited by lazacom; 6th September 2012 at 15:34. Reason: Not completed
Reply With Quote
  #9  
Old 6th September 2012, 15:39
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

Quote:
Any way to reset settings to default or some command to rebuild config files?
You said above in #5 that you use ispconfig and I explained in #3 how o reset the config files on a ispconfig server.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 6th September 2012, 15:50
lazacom lazacom is offline
Junior Member
 
Join Date: Sep 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

I perhaps didn't explained it right - I tried to install ISPConfig, but installation failed. Then, I uninstaled ISPConfig and deleted what left and installed webmin+virtualmin. Because some settings still was left from ISP, I removed postfix (yum remove postfix) and then build postfix 2.9.4 from source as root.

Unfortunately, server gone live, web site must be running so some switch to ISPconfig is not a option now. Is there some own postfix solution to rebuild settings, or something in webmin/virtualmin?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix/courier/Centos 6 cant send email to external email servers maxtorzito Installation/Configuration 14 7th October 2011 11:56
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail-Problema jz_ HOWTO-Related Questions 9 14th September 2011 14:31
Postfix SMTP Auth to Dovecot Not Working -- HELP! Scratchpad Server Operation 6 12th April 2011 14:29
sneaking suspicion my postfix config has gone awry mjbarfoot Installation/Configuration 7 24th August 2010 13:23
Need help get mail to work (can't recieve and apperently can't send) omega13a Installation/Configuration 19 20th August 2009 22:06


All times are GMT +2. The time now is 07:05.


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